Skip to content

Support API key auth alongside the legacy webhook secret - #16

Merged
satsura merged 1 commit into
mainfrom
feat/api-key-auth
Aug 10, 2026
Merged

Support API key auth alongside the legacy webhook secret#16
satsura merged 1 commit into
mainfrom
feat/api-key-auth

Conversation

@satsura

@satsura satsura commented Aug 10, 2026

Copy link
Copy Markdown
Contributor

Summary

  • New preferred auth: K_API_URL + K_API_KEY + K_PROJECT_ID — posts to <base url>/api/v1/scan/ingest with a Bearer key, matching the tracker's normal API auth. No per-project secret to manage.
  • Legacy K_SARIF_URL + K_SARIF_SECRET still works unchanged when the new trio isn't set — no existing CI config breaks.
  • action.yml: new api-url/api-key/project-id inputs alongside url/secret.
  • .github/workflows/scan.yml: new optional secrets, config-check accepts either scheme.
  • templates/gitlab-ci.yml: job-skip rule accepts either scheme.
  • README updated for both paths.

Purely additive — nothing in production changes until a CI config actually sets the new variables.

Test plan

  • npm test — 30/30 pass (added cases for the new targetFromEnv branching and scheme precedence)
  • npm run build (tsc) clean
  • After merge: verify a real repo can scan successfully using the new trio, before migrating any of the ~65 live configs

K_API_URL/K_API_KEY/K_PROJECT_ID upload to the tracker's scan.ingest
endpoint with a Bearer key. Falls back to K_SARIF_URL/K_SARIF_SECRET
when the new trio isn't set, so existing CI configs keep working
unmodified.
@satsura
satsura merged commit 86e97a6 into main Aug 10, 2026
5 of 6 checks passed
@satsura satsura mentioned this pull request Aug 10, 2026
2 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant