@@ -67,6 +67,7 @@ type GithubIntegration struct {
6767 assetRepository core.AssetRepository
6868 assetVersionRepository core.AssetVersionRepository
6969 componentRepository core.ComponentRepository
70+ licenseRiskRepository core.LicenseRiskRepository
7071
7172 orgRepository core.OrganizationRepository
7273 projectRepository core.ProjectRepository
@@ -87,6 +88,7 @@ func NewGithubIntegration(db core.DB) *GithubIntegration {
8788 projectRepository := repositories .NewProjectRepository (db )
8889 orgRepository := repositories .NewOrgRepository (db )
8990 firstPartyVulnRepository := repositories .NewFirstPartyVulnerabilityRepository (db )
91+ licenseRiskRepository := repositories .NewLicenseRiskRepository (db )
9092
9193 frontendURL := os .Getenv ("FRONTEND_URL" )
9294 if frontendURL == "" {
@@ -106,6 +108,7 @@ func NewGithubIntegration(db core.DB) *GithubIntegration {
106108 componentRepository : componentRepository ,
107109 projectRepository : projectRepository ,
108110 orgRepository : orgRepository ,
111+ licenseRiskRepository : licenseRiskRepository ,
109112
110113 githubClientFactory : func (repoID string ) (githubClientFacade , error ) {
111114 return NewGithubClient (installationIDFromRepositoryID (repoID ))
@@ -574,6 +577,12 @@ func (githubIntegration *GithubIntegration) HandleEvent(event any) error {
574577 return err
575578 }
576579 vuln = & v
580+ case models .VulnTypeLicenseRisk :
581+ v , err := githubIntegration .licenseRiskRepository .Read (vulnID )
582+ if err != nil {
583+ return err
584+ }
585+ vuln = & v
577586 }
578587
579588 orgSlug , err := core .GetOrgSlug (event .Ctx )
@@ -604,6 +613,12 @@ func (githubIntegration *GithubIntegration) HandleEvent(event any) error {
604613 return err
605614 }
606615 vuln = & v
616+ case models .VulnTypeLicenseRisk :
617+ v , err := githubIntegration .licenseRiskRepository .Read (ev .VulnID )
618+ if err != nil {
619+ return err
620+ }
621+ vuln = & v
607622 }
608623
609624 if vuln .GetTicketID () == nil {
0 commit comments