Skip to content

[release/3.x] Also mask the GitHub OIDC ID token in jfrog-oidc-token.sh - #2346

Merged
anton-107 merged 1 commit into
release/3.xfrom
anton/mask-oidc-id-token-3.x
Nov 24, 2026
Merged

anton-107 merged 1 commit into
release/3.xfrom
anton/mask-oidc-id-token-3.x

Conversation

@anton-107

@anton-107 anton-107 commented Nov 24, 2026 •

Copy link
Copy Markdown
Contributor

Changes

release/3.x counterpart of #2345 (main); the commit cherry-picked cleanly.

Follow-up to #2291 and #2334, which mask the JFrog access token. jfrog-oidc-token.sh still never masks ID_TOKEN, the GitHub OIDC token it exchanges for the JFrog token. The ID token is short-lived and audience-scoped, but it is still a bearer credential for that exchange, so it should be masked as well.

  • jfrog-oidc-token.sh: right after the ID token is fetched, fail with a clear message if it is empty or null (same check as the existing one for ACCESS_TOKEN), then mask it with ::add-mask::. The check runs first, so ::add-mask:: never gets an empty value.
  • tests/secret-masking.sh: the regression test already stubs the OIDC response with a fake ID token. It now also asserts that the job log contains ::add-mask::<id token>. The token is never written to $GITHUB_ENV or an rc file, so the existing sink-based ordering check does not apply to it; this adds only a presence assertion, next to the existing one for the JFrog token.

Tracked as DECO-29704 (follow-up to SEC-35859).

Tests

  • bash .github/scripts/tests/secret-masking.sh passes on this branch.
  • Checked locally that the test fails if the new ::add-mask:: line is removed from jfrog-oidc-token.sh.
  • Checked locally, with a stubbed curl, that the script exits 1 with FAIL: Could not extract GitHub OIDC ID token when the OIDC response is empty, {} or {"value": null}.

This pull request and its description were written by Isaac.

jfrog-oidc-token.sh masks the JFrog access token but not the GitHub OIDC
ID token it exchanges for it. Fail clearly if the ID token is empty or
null, the same way the script already checks the access token, then mask
it with ::add-mask:: before it is used. The secret masking regression
test now also asserts that the ID token is masked.

Co-authored-by: Isaac <no-reply@databricks.com>
@rugpanov

Copy link
Copy Markdown
Contributor

🤖 Integration tests ✅ passed for 4ec90b7c.
View run

@anton-107
anton-107 marked this pull request as ready for review November 24, 2026 15:51
@anton-107
anton-107 merged commit 6430632 into release/3.x Nov 24, 2026
12 checks passed

This branch was previously deployed

1 inactive deployment
test-trigger-is — 4ec90b7c Deployed Nov 24, 2026 by anton-107 via Trigger Tests #2598
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.

3 participants