Repository navigation
feat(gha-audit): flag a static cloud key where OIDC would do (AWS, GCP, Azure) - #1128
Merged
sandstream merged 6 commits intoNov 27, 2026
Merged
Conversation
A job that passes a stored AWS key pair to configure-aws-credentials, sets AWS_ACCESS_KEY_ID/AWS_SECRET_ACCESS_KEY from secrets in env, gives google-github-actions/auth credentials_json, or gives azure/login creds now gets a row. The suggestion names the provider's OIDC inputs, asks for id-token: write on that job only, and links the provider's guide. Found by kit-research#239. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
Docker image built, scanned, and smoke-tested in CI. The PR image is local to this run and is not published. |
…-sync-p6fg9a-gha-static-cloud-keys # Conflicts: # docs/COMMANDS.md
|
Docker image built, scanned, and smoke-tested in CI. The PR image is local to this run and is not published. |
Keep both gha-audit rules: write-all (#1124) and static cloud keys. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
Docker image built, scanned, and smoke-tested in CI. The PR image is local to this run and is not published. |
|
Docker image built, scanned, and smoke-tested in CI. The PR image is local to this run and is not published. |
|
Docker image built, scanned, and smoke-tested in CI. The PR image is local to this run and is not published. |
sandstream
deleted the
claude/web-kit-status-sync-p6fg9a-gha-static-cloud-keys
branch
November 27, 2026 15:29
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
kit had no row for a long-lived cloud key used where the provider accepts GitHub's OIDC token. The research note's deploy workflow passes
aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }}and the secret key toaws-actions/configure-aws-credentials. kit named the key pair only inside the install-scripts row.A new rule,
src/gha-static-cloud-keys.ts, wired intoauditWorkflow, flags these per job:aws-actions/configure-aws-credentialsgivenaws-access-key-id/aws-secret-access-key; orenv:settingAWS_ACCESS_KEY_ID/AWS_SECRET_ACCESS_KEYfrom${{ secrets.* }}role-to-assumegoogle-github-actions/authgivencredentials_jsonworkload_identity_provider(+service_account)azure/logingivencredsclient-id,tenant-id,subscription-id, nocredsThe row is
static <cloud> key on job <id> (<file>). An AWS key in the workflow-levelenv:givesworkflow-level static AWS key (<file>). Every suggestion says to grantid-token: writeon that job only (not workflow-wide), to trust only this repository and branch on the provider side, to delete the stored key, and it links the provider's guide. Severity is medium, under OWASP CICD-SEC-6 (Insufficient Credential Hygiene).It is the pair to the existing
id-tokenrows. Those flag OIDC granted where nothing uses it. This one flags a stored key where OIDC would do. Once the fix is applied,src/gha-id-token.tsalready counts all three actions as OIDC users, so the job-scopedid-token: writewill not be flagged as unused.Vendor docs, quoted in the fixture comments of
src/gha-static-cloud-keys.test.ts:Before / after
On the note's
deploy.yml(configure-aws-credentials with the key pair, thenaws s3 syncwith the same keys inenv):Before (main): unpinned-action rows,
workflow-level id-token: write, andinstall scripts run with credentials: job deploy … holds secrets AWS_ACCESS_KEY_ID, AWS_SECRET_ACCESS_KEY. Nothing about OIDC.After: the same rows, plus
The tests cover the AWS action input, AWS env at step and workflow level (quoted and unquoted), GCP
credentials_jsonand Azurecreds(withAzure/loginin mixed case). They also cover what must not flag: each provider's OIDC form, acreds:input on an unrelated action, and a commented-out key. On main the test cannot load, because the module does not exist. The CLI output above is the behavioural before.Limits (said here, not hidden)
with: { creds: … }) is not seen.GOOGLE_APPLICATION_CREDENTIALSorAZURE_CREDENTIALSused without the action is not flagged.Docs
The
kit gha-auditrow indocs/COMMANDS.mddescribes the rule. Fragment:changes/gha-static-cloud-keys.md. No path in.github/kit-protected-paths.jsonis touched, because the fixtures are test strings and not.github/files. The branch therefore has noprotected-prefix.Scope notes
kit gha-auditline indocs/COMMANDS.md. Whichever merges second needs a rebase of that one line.Found by kit-research#239 (
docs/research/linkedin-batch-2026-11-27-vs-kit.md, GitHub hardening table: "OIDC instead of stored cloud secrets: No row").Generated by Claude Code