Repository navigation
fix(attestation): avoid logging the raw federated OIDC token - #3732
Merged
Merged
Conversation
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>
Contributor
PR validation — ✅ 3 passing
AI Session Checks —
|
| Status | Policy | Messages |
|---|---|---|
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 |
Security context
✅ Nothing this change touches has a recorded security-fix history.
View in Chainloop ↗ · How this works ↗
Powered by Chainloop and Chainloop Trace
migmartri
approved these changes
Oct 27, 2026
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.
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.