File tree Expand file tree Collapse file tree 1 file changed +16
-1
lines changed
Expand file tree Collapse file tree 1 file changed +16
-1
lines changed Original file line number Diff line number Diff line change @@ -170,7 +170,7 @@ SECURITY_GOVULN_PACKAGES := $(filter-out ./scripts,$(TEST_PACKAGES))
170170testall :
171171 $(GOTEST ) -count=1 $(TEST_PACKAGES )
172172
173- .PHONY : security-govulncheck security-govulncheck-json security-osv security-gitleaks security-semgrep security-dependabot security-triage
173+ .PHONY : security-govulncheck security-govulncheck-json security-osv security-gitleaks security-semgrep security-dependabot security-gh-secret-scanning security- triage
174174
175175# Run Go vulnerability analysis for reachable vulnerabilities.
176176security-govulncheck :
@@ -277,6 +277,21 @@ security-dependabot:
277277 --paginate > " $$ dated_report" ; \
278278 echo " Wrote $$ dated_report"
279279
280+ # Pull secret scanning alerts via GitHub API and emit a dated JSON artifact under security_issues/.
281+ security-gh-secret-scanning :
282+ @command -v $(GH ) > /dev/null 2>&1 || { \
283+ echo " gh not found. Install from https://cli.github.com/" ; \
284+ exit 1; \
285+ }
286+ @mkdir -p security_issues
287+ @dated_report=" security_issues/gh-secret-scanning-live-review-$( shell date +%d-%m-%Y) .json" ; \
288+ $(GH ) api \
289+ -H " Accept: application/vnd.github+json" \
290+ -H " X-GitHub-Api-Version: 2022-11-28" \
291+ /repos/$(GH_REPO ) /secret-scanning/alerts \
292+ --paginate > " $$ dated_report" ; \
293+ echo " Wrote $$ dated_report"
294+
280295# Regenerate machine-readable and markdown triage artifacts from the latest OSV report.
281296security-triage : security-osv
282297 @python3 scripts/extract_osv_report.py \
You can’t perform that action at this time.
0 commit comments