Repository navigation
evetest-pr: harden handling of secrets in the evetest workflow - #7022
Merged
Merged
Conversation
The suite jobs run the evetest-run-suite action and its scripts with secrets (Anthropic key, GitHub token) from the PR checkout, which may be a fork. After checking out the PR, replace that directory with the base branch's copy so the PR cannot alter the code that handles them. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com> Signed-off-by: Milan Lenco <milan@zededa.com>
milan-zededa
requested review from
eriknordmark,
rene,
shjala and
yash-zededa
as code owners
November 3, 2026 16:15
3 of 7 tasks
The "Run evetest" step exports ANTHROPIC_API_KEY and GH_TOKEN so the live-investigation watcher can use them, but the same step then runs `make -C evetest evetest`, i.e. PR-controlled code, with the same environment. Unset both once the watcher has been started; it keeps its own copy and make and everything it spawns no longer inherit them. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com> Signed-off-by: Milan Lenco <milan@zededa.com>
milan-zededa
force-pushed
the
evetest-base-run-suite
branch
from
November 3, 2026 16:39
48164e3 to
72b0275
Compare
rene
approved these changes
Nov 4, 2026
Merged
6 of 9 tasks
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.
Description
Security hardening of the
evetest-prworkflow, which handles secrets(Anthropic key, GitHub token) while running code from the PR checkout, which
may be a fork. Two commits:
evetest-run-suitefrom the base branch. After checking out the PR,replace
.github/actions/evetest-run-suite/with the base branch's copy, inboth the discover job and the suite job, so the PR cannot alter the action
and scripts (watcher,
select-tests.sh,pr-diff.sh, ...) that handle thesecrets.
makeand evetest. The "Run evetest" stepexported
ANTHROPIC_API_KEYandGH_TOKENfor the watcher, but the samestep then ran
make -C evetest evetest, i.e. PR code, with thatenvironment. Both are now unset once the watcher is started, so only the
watcher keeps them.
Limits: PR changes to
evetest-run-suiteonly take effect once merged. Theunset removes the secrets from the environment
makeinherits, but thesuite still executes PR code on the runner as the same user, so this is
defense in depth rather than isolation from a deliberately malicious PR.
How to test and validate this PR
CI workflow change only; not yet run in CI. After merge, open a PR that
modifies a file under
.github/actions/evetest-run-suite/and check in theworkflow run that the base branch's version is the one executed, and that a
failure is still analysed by the watcher (it still has its secrets).
Changelog notes
None. No user-facing changes (CI tooling only).
PR Backports
Checklist
And the last but not least:
check them.
🤖 Generated with Claude Code