Repository navigation
fix(rules): ignore bash scripts under RUNNER_TEMP in untrusted_checkout_exec - #461
Tyagiquamar wants to merge 2 commits into
Conversation
…ut_exec Steps that run shell scripts from RUNNER_TEMP are not executing checked-out workspace code. Suppress untrusted_checkout_exec when the run step references paths under RUNNER_TEMP, fixing false positives such as agentic workflow activation jobs (fixes boostsecurityio#457). Signed-off-by: Abhipsita-coder <76418226+Abhipsita-coder@users.noreply.github.com>
c0b060a to
21a37e2
Compare
|
Sorry, but CI fails. Some tests do not pass @Tyagiquamar |
…e list The regression fixture lives under testdata, so the workflow inventory test has to include its path. Signed-off-by: Tyagiquamar <Tyagiquamar@users.noreply.github.com>
|
Added
|
|
@fproulx-boostsecurity The failure in that That path is in the expected list as of |
Problem
untrusted_checkout_execreports a finding when a workflow checks out code and later runsbash .../*.sh, even when the script lives underRUNNER_TEMP(runner-provisioned tooling), not the checked-out workspace. See #457.Root cause
The rule matches any
.shinvocation in run steps after an untrusted checkout. It does not distinguish workspace paths from\/\paths.Solution
Add a guard so run steps whose script path references
RUNNER_TEMPare excluded fromuntrusted_checkout_execcommand matching. Document the behavior in the rule page.Tests
Docker
golang:1.26-bookworm:go test ./scanner -run TestRunnerTempScriptNotFlaggedAsUntrustedCheckoutExec -count=1(pass)Issue
Fixes #457
Compatibility
No API changes. Narrows findings (fewer false positives) for workflows that execute scripts from
RUNNER_TEMP.