Skip to content

llm: Route GitHub Packages credential through $GITHUB_ENV in SDK-eval workflow - #7268

Merged
SaintPatrck merged 1 commit into
mainfrom
llm/fix-sdk-eval-token-propagation
Aug 14, 2026
Merged

llm: Route GitHub Packages credential through $GITHUB_ENV in SDK-eval workflow#7268
SaintPatrck merged 1 commit into
mainfrom
llm/fix-sdk-eval-token-propagation

Conversation

@SaintPatrck

Copy link
Copy Markdown
Contributor

🎟️ Tracking

#7267 — the SDK-eval workflow's compile-verification step failed to authenticate against GitHub Packages on that PR.

📔 Objective

The compile-verification step in the SDK-eval workflow 401'd resolving com.bitwarden:sdk-android, even though the job's GITHUB_TOKEN carries packages:read identical to the working build.yml/test.yml setup. claude-code-action's CLI-launching step shadows the calling workflow's env, per its own action.yml, so GITHUB_TOKEN set on the outer step never reached the Gradle process Claude's Bash tool spawned. Routing the token through $GITHUB_ENV propagates it past that shadowing, matching how every other workflow in this repo already passes this token.

… workflow

PR #7267's compile-verification step 401'd resolving com.bitwarden:sdk-android
even though the job's GITHUB_TOKEN carries packages:read, identical to the
permissions/token setup build.yml and test.yml use successfully for the same
package. The difference is that this workflow runs gradle through Claude's
Bash tool inside claude-code-action's composite action, whose CLI-launching
step's own env: block shadows the calling workflow's job-level env — the
action's own action.yml documents this and directs callers to $GITHUB_ENV.
GITHUB_TOKEN set on the outer step's env: never reached the subprocess.

Route the token through a prior step writing to $GITHUB_ENV instead, which
propagates it past the shadowing and matches how test.yml, build.yml, and
sdlc-sdk-update.yml already pass this same token.
@SaintPatrck SaintPatrck added the ai-review Request a Claude code review label Aug 14, 2026
@github-actions github-actions Bot added the t:llm Change Type - LLM related change (e.g. CLAUDE.md files) label Aug 14, 2026
@github-actions

github-actions Bot commented Aug 14, 2026

Copy link
Copy Markdown
Contributor

🤖 Bitwarden Claude Code Review

Overall Assessment: APPROVE

Reviewed the single-file change to .github/workflows/sdlc-sdk-update-evaluate.yml, which moves GITHUB_TOKEN off the claude-code-action step's env: block and into $GITHUB_ENV via a preceding step, so the Gradle process spawned inside the action can resolve com.bitwarden:sdk-android from GitHub Packages. Confirmed settings.gradle.kts:33 reads the credential via System.getenv("GITHUB_TOKEN"), that the job already grants packages: read, and that the new step carries the same steps.gate.outputs.skip == 'false' guard as every other step in the job. The token is the same auto-masked secrets.GITHUB_TOKEN the action already receives by default, it is written through an intermediate env: variable with a quoted redirect rather than inline interpolation, and it stays scoped to this job — so the change does not widen the credential's blast radius, and the push step's app-token git credentials are unaffected. This matches how build.yml, test.yml, and sdlc-sdk-update.yml already surface this token to Gradle.

Code Review Details

No findings.

@codecov

codecov Bot commented Aug 14, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 86.25%. Comparing base (9444b5f) to head (e3e429f).

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #7268   +/-   ##
=======================================
  Coverage   86.25%   86.25%           
=======================================
  Files         891      891           
  Lines       65294    65294           
  Branches     9808     9808           
=======================================
  Hits        56320    56320           
  Misses       5472     5472           
  Partials     3502     3502           
Flag Coverage Δ
app-data 17.87% <ø> (ø)
app-ui-auth-tools 18.76% <ø> (ø)
app-ui-platform 16.41% <ø> (ø)
app-ui-vault 27.32% <ø> (ø)
authenticator 6.09% <ø> (ø)
lib-core-network-bridge 4.10% <ø> (ø)
lib-data-ui 1.20% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@SaintPatrck
SaintPatrck marked this pull request as ready for review August 14, 2026 15:30
@SaintPatrck
SaintPatrck requested a review from a team as a code owner August 14, 2026 15:30
@SaintPatrck
SaintPatrck added this pull request to the merge queue Aug 14, 2026
Merged via the queue into main with commit 1e67c10 Aug 14, 2026
29 of 33 checks passed
@SaintPatrck
SaintPatrck deleted the llm/fix-sdk-eval-token-propagation branch August 14, 2026 15:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ai-review Request a Claude code review t:llm Change Type - LLM related change (e.g. CLAUDE.md files)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants