Share a Snyk report
Snyk finds the advisory. The expensive part is what comes after: deciding whether the vulnerable path is reachable, whether the major-version bump is worth it this sprint, and who owns it. That decision is made once and lost immediately, because CI keeps the finding and throws away the reasoning.
snyk-to-html already renders a readable artifact. The missing piece is a
place where the artifact and the reasoning live together.
Publish it
snyk test --json > snyk.json || true
npx snyk-to-html -i snyk.json -o snyk.html
curl -fsS -X PATCH \
"https://commareports.com/api/v1/reports/$COMMA_REPORT_ID" \
-H "Authorization: Bearer $COMMA_API_TOKEN" \
-H "Content-Type: application/json" \
-d "$(jq -n --rawfile html snyk.html \
--arg title "Snyk — api — $(date +%F)" \
'{title: $title, html: $html}')"
|| true because snyk test exits non-zero when it finds something, which
is the run you want published. One report id per project, PATCHed on every
scan, gives you a stable URL and a revision history.