From 467845bea4f42536f84ccbba32efd63c58f1a28a Mon Sep 17 00:00:00 2001 From: nikkely Date: Wed, 28 Sep 2022 20:40:19 +0900 Subject: [PATCH] fix: fix query --- detector/github.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/detector/github.go b/detector/github.go index a45db73900..c97f741340 100644 --- a/detector/github.go +++ b/detector/github.go @@ -29,7 +29,7 @@ func DetectGitHubSecurityAlerts(r *models.ScanResult, owner, repo, token string, // TODO Use `https://github.com/shurcooL/githubv4` if the tool supports vulnerabilityAlerts Endpoint // Memo : https://developer.github.com/v4/explorer/ const jsonfmt = `{"query": - "query { repository(owner:\"%s\", name:\"%s\") { url vulnerabilityAlerts(first: %d, %s) { pageInfo { endCursor hasNextPage startCursor } edges { node { id dismissReason dismissedAt securityVulnerability{ package { name ecosystem } severity vulnerableVersionRange firstPatchedVersion { identifier } } securityAdvisory { description ghsaId permalink publishedAt summary updatedAt withdrawnAt origin severity references { url } identifiers { type value } } } } } } } "}` + "query { repository(owner:\"%s\", name:\"%s\") { url vulnerabilityAlerts(first: %d, states:[OPEN], %s) { pageInfo { endCursor hasNextPage startCursor } edges { node { id dismissReason dismissedAt securityVulnerability{ package { name ecosystem } severity vulnerableVersionRange firstPatchedVersion { identifier } } securityAdvisory { description ghsaId permalink publishedAt summary updatedAt withdrawnAt origin severity references { url } identifiers { type value } } } } } } } "}` after := "" for {