Skip to content

verify-action-build: treat Authorization: token/Bearer headers as data-fetch signal#851

Merged
potiuk merged 1 commit into
mainfrom
verify-action-build-axios-auth-header-exemption
May 18, 2026
Merged

verify-action-build: treat Authorization: token/Bearer headers as data-fetch signal#851
potiuk merged 1 commit into
mainfrom
verify-action-build-axios-auth-header-exemption

Conversation

@potiuk
Copy link
Copy Markdown
Member

@potiuk potiuk commented May 17, 2026

Summary

  • manusa/actions-setup-minikube@v2.17.0 has a thin axios wrapper in src/github.js that fetches GitHub release metadata. The file is a transport-layer helper (no data-parse markers, no binary-handling markers) so _file_is_pure_data_fetch didn't exempt it and the axios() call landed in the unverified-download list.
  • An Authorization header with token or Bearer is an unambiguous "authenticated API call" signal — public release-asset downloads from S3 / CDN / GitHub Releases don't use bearer auth. Add it to _JS_DATA_PARSE_PATTERNS so transport-layer API helpers stop firing.
  • Real binary handlers in the same file still trip _JS_BINARY_HANDLE_PATTERNS and override the exemption — test asserts this.

Surfaced while triaging #848.

Test plan

  • Regression fixture using the verbatim src/github.js from manusa/actions-setup-minikube@v2.17.0.
  • Negative test: same file plus tc.downloadTool + tc.extractTar → both downloads still flagged.
  • uv run pytest utils/tests/ — 273 passed.
  • prek run --all-files — clean.

…fetch

manusa/actions-setup-minikube@v2.17.0 has a thin axios wrapper in
src/github.js that fetches GitHub release metadata as JSON:

  return axios({method: 'GET', ...options, url, headers});

The file is a transport-layer helper — no data-parse markers, no
binary-handling markers — so `_file_is_pure_data_fetch` didn't
exempt it and the axios call landed in the unverified-download list.

Authorization headers with `token ` or `Bearer ` prefixes are an
unambiguous "authenticated API call" signal: public release-asset
downloads from S3 / CDN / GitHub Releases don't use bearer auth.
Add that as a data-parse marker so transport-layer API helpers stop
producing false positives.  Real binary handlers in the same file
still trip `_JS_BINARY_HANDLE_PATTERNS` and override the exemption.

Surfaced while triaging #848.

Generated-by: Claude Opus 4.7 (1M context)
@potiuk potiuk requested review from dfoulks1 and ppkarwasz as code owners May 17, 2026 16:47
@potiuk potiuk requested a review from dave2wave May 17, 2026 19:59
Copy link
Copy Markdown
Member

@ppkarwasz ppkarwasz left a comment

Choose a reason for hiding this comment

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

LGTM

@potiuk potiuk merged commit b54d4ee into main May 18, 2026
8 checks passed
@potiuk potiuk deleted the verify-action-build-axios-auth-header-exemption branch May 18, 2026 09:02
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