Skip to content

fix(attestation): avoid logging the raw federated OIDC token - #3732

Merged
matiasinsaurralde merged 1 commit into
mainfrom
matias/sec-611-redact-oidc-token-logs
Oct 27, 2026
Merged

matiasinsaurralde merged 1 commit into
mainfrom
matias/sec-611-redact-oidc-token-logs

Conversation

@matiasinsaurralde

Copy link
Copy Markdown
Contributor

Summary

The GitHub OIDC runner used by the attestation crafter wrote the raw federated identity token to its debug logs while requesting and verifying it. With debug logging enabled, that short-lived identity token could end up in CI job logs.

This change removes the token value from those debug log lines so it is no longer written to the logs. The token is still used for the actual verification.

See also:

Masking is also exact-string match on GitHub-hosted runners, so it does not help self-hosted runners, other CI systems, or logs exported to external collectors.

The GitHub OIDC runner printed the raw federated identity token at debug level while requesting and verifying it, so it could end up in CI job logs. Drop the token value from those debug lines and cover the behaviour with tests.

Signed-off-by: Matías Insaurralde <matias@chainloop.dev>
@chainloop-platform

chainloop-platform Bot commented Oct 27, 2026 •

Copy link
Copy Markdown
Contributor

PR validation — ✅ 3 passing

Status Policy Material Messages
✅ Passed pr-min-approvals pr-info -
✅ Passed pr-description-required pr-info -
✅ Passed pr-user-story-linked pr-info -

View attestation ↗

AI Session Checks — ⚠️ no AI session found

Missing AI Coding Sessions

This organization requires every PR to be backed by a Chainloop Trace AI coding session, and none was found for this one.

Please make sure the AI coding session evidence has been sent by the Chainloop CLI, or add the skip-ai-session label to this PR to bypass this check.

Learn more about Chainloop Trace.

Security Checks — ⚠️ 1 failing

⚠️ secret-scan — 1 failing

Status Policy Messages
⚠️ Failed secrets-detection Gitleaks secret detected a98cd47:pkg/attestation/crafter/runners/oidc/github_leak_test.go:generic-api-key:34, secret: REDACTED...)

✅ sast-scan

Status Policy Messages
✅ Passed owasp-top10-2025 -
✅ Passed cwe-top25 -
✅ Passed sast -
✅ Passed cwe-top26-40-cusp -
Scans not applied (3)
Scan Reason
vulnerability-scan no manifest/lockfile changed
github-actions-scan no workflow files changed
iac-scan no IaC files changed

View attestation ↗

Security context

✅ Nothing this change touches has a recorded security-fix history.

View in Chainloop ↗ · How this works ↗


Powered by Chainloop and Chainloop Trace

@matiasinsaurralde
matiasinsaurralde requested a review from a team October 27, 2026 03:10

@cubic-dev-ai cubic-dev-ai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No issues found across 2 files

View guided diff | Re-trigger cubic

@matiasinsaurralde
matiasinsaurralde merged commit e8bfa2c into main Oct 27, 2026
15 of 17 checks passed
@matiasinsaurralde
matiasinsaurralde deleted the matias/sec-611-redact-oidc-token-logs branch October 27, 2026 10:26
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.

2 participants