vuls: Index | Files

package github

import ""


Package Files


func FillGitHubSecurityAlerts Uses

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.

type SecurityAlerts Uses

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

Package github imports 12 packages (graph) and is imported by 2 packages. Updated 2019-10-15. Refresh now. Tools for package owners.