Conversation
…ata fetches The binary-download check flagged rubygems/configure-rubygems-credentials (transitively pulled in by rubygems/release-gem) for two OIDC token-exchange files that use HttpClient.postJson against RubyGems.org. The response there is a credential, not a binary — the *Json variants of @actions/http-client auto-parse the body as JSON, so the file is a pure data fetch and should be exempt under the existing _file_is_pure_data_fetch heuristic. Adds postJson/getJson/putJson/patchJson/delJson/requestJson to the data-parse markers, plus three regression tests including the exact PR #789 shape and a guard test confirming a real binary extraction in the same file still disables the exemption.
7 tasks
kpumuk
approved these changes
May 2, 2026
dave2wave
reviewed
May 2, 2026
| const url = `${server}/api/v1/oidc/trusted_publisher/exchange_token` | ||
| const res = await http.postJson(url, {jwt: webIdentityToken}, {}) | ||
| return res.result | ||
| } |
Member
There was a problem hiding this comment.
Is the plan to handle each of the OIDC / Trusted publishing actions as they upgrade and fail?
Also, it would be good to think about tagging these as it is important to identify all of the Trusted publishing actions that PMCs are using.
dave2wave
reviewed
May 2, 2026
| # delJson/requestJson) auto-parse the response body as JSON. Reaching for | ||
| # these is an explicit "treat the response as structured data" signal | ||
| # — typical of OIDC/RPC token-exchange calls, not binary downloads. | ||
| re.compile(r"\.(?:get|post|put|patch|del|request)Json\s*\("), |
Member
There was a problem hiding this comment.
This handles other generic OIDC token exchanges?
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
verifycheck on Add rubygems/release-gem to allowlist #789 (rubygems/release-gem) failed on a false positive: it transitively scannedrubygems/configure-rubygems-credentials@bc6dd217...(composite action → node20 helper) and flagged two OIDC token-exchange files that POST a JWT to${server}/api/v1/oidc/...via@actions/http-client'spostJson. The response there is a short-lived credential validated through a Zod schema — not a binary or executable._file_is_pure_data_fetchheuristic (verify-action-build: skip binary-download check for pure data fetches #775) by recognizing the*Jsonfamily (postJson/getJson/putJson/patchJson/delJson/requestJson) as data-parse markers. These methods auto-parse the response body as JSON, so reaching for them is an explicit "consume as structured data" signal.tc.extractTar/fs.writeFile/exec.exec/chmod +x/ etc., the exemption still does not apply.Test plan
pytest tests/verify_action_build/test_security.py -q— 78/78 pass, including 3 new tests:test_postJson_token_exchange_exempted— mirrors the exact PR Add rubygems/release-gem to allowlist #789 shape (HttpClient.postJson → OIDC exchange).test_getJson_alone_exempts— sibling getJson.test_postJson_with_extract_in_same_file_not_exempt— guard: agetJsonnext totc.downloadTool+tc.extractTarkeeps both flagged.Generated-by: Claude Opus 4.7 (1M context)