Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func FillGitHubSecurityAlerts ¶
func FillGitHubSecurityAlerts(r *models.ScanResult, owner, repo, token string) (nCVEs int, err error)
FillGitHubSecurityAlerts access to owner/repo on GitHub and fetch scurity alerts of the repository via GitHub API v4 GraphQL and then set to the given ScanResult. https://help.github.com/articles/about-security-alerts-for-vulnerable-dependencies/
Types ¶
type SecurityAlerts ¶
type SecurityAlerts struct { Data struct { Repository struct { URL string `json:"url,omitempty"` VulnerabilityAlerts struct { PageInfo struct { EndCursor string `json:"endCursor,omitempty"` HasNextPage bool `json:"hasNextPage,omitempty"` StartCursor string `json:"startCursor,omitempty"` } `json:"pageInfo,omitempty"` Edges []struct { Node struct { ID string `json:"id,omitempty"` ExternalIdentifier string `json:"externalIdentifier,omitempty"` ExternalReference string `json:"externalReference,omitempty"` FixedIn string `json:"fixedIn,omitempty"` AffectedRange string `json:"affectedRange,omitempty"` PackageName string `json:"packageName,omitempty"` DismissReason string `json:"dismissReason,omitempty"` DismissedAt time.Time `json:"dismissedAt,omitempty"` } `json:"node,omitempty"` } `json:"edges,omitempty"` } `json:"vulnerabilityAlerts,omitempty"` } `json:"repository,omitempty"` } `json:"data,omitempty"` }
SecurityAlerts has detected CVE-IDs, PackageNames, Refs
Click to show internal directories.
Click to hide internal directories.