Skip to content

ci: Keep GITHUB_TOKEN off disk when checking out PR code - #673

Open
mariiapisarenko wants to merge 1 commit into
mainfrom
harden-fork-pr-checkout
Open

ci: Keep GITHUB_TOKEN off disk when checking out PR code #673
mariiapisarenko wants to merge 1 commit into
mainfrom
harden-fork-pr-checkout

Conversation

@mariiapisarenko

@mariiapisarenko mariiapisarenko commented Aug 13, 2026

Copy link
Copy Markdown
Collaborator

What

Adds persist-credentials: false to both PR-head checkouts in os-extension-test.yml. These check out fork-controlled code in a job that holds vault secrets, and actions/checkout otherwise leaves the token in .git/config where the Maven build could read it.

Why

Part of TECHOPS-525.
Minimal, non-breaking defense-in-depth behind the caller's environment gate.

@mariiapisarenko
mariiapisarenko requested a review from a team as a code owner August 13, 2026 15:12
@coderabbitai

coderabbitai Bot commented Aug 13, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro Plus

Run ID: 06c8e300-59b2-410e-ab71-5b65f3a09a3c

📥 Commits

Reviewing files that changed from the base of the PR and between 991cd0a and 2699635.

📒 Files selected for processing (1)
  • .github/workflows/os-extension-test.yml

📝 Walkthrough

Walkthrough

The workflow disables persisted Git credentials in the build and unit-test checkout steps. Comments document the defense-in-depth rationale.

Changes

Checkout credential handling

Layer / File(s) Summary
Secure workflow checkouts
.github/workflows/os-extension-test.yml
Build and unit-test checkout steps set persist-credentials: false and include explanatory comments.

Estimated code review effort: 1 (Trivial) | ~5 minutes

Mergeability Score: ⚪ Minimal · up to 26996

The workflow now avoids persisting GITHUB_TOKEN credentials during fork-controlled checkouts, with no actionable merge-blocking risk remaining after normal checks.

Suggested reviewers: jandroav, sayalim0412

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly and concisely identifies the primary CI security change: preventing GITHUB_TOKEN persistence during PR code checkout.
Description check ✅ Passed The description directly explains the checkout changes, security purpose, affected workflow, and related tracking issue.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch harden-fork-pr-checkout

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

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.

1 participant