tune: credit env-reviewer gate, read-only token, and pre-checkout-staged sibling actions#30
Open
north-echo wants to merge 1 commit into
Open
tune: credit env-reviewer gate, read-only token, and pre-checkout-staged sibling actions#30north-echo wants to merge 1 commit into
north-echo wants to merge 1 commit into
Conversation
…ged sibling actions Three mitigation-aware tuning fixes that eliminate a class of false-positive criticals on properly-hardened pull_request_target/workflow_run pipelines: - FG-016 now credits a read-only (read-all) or empty token with no secrets in scope, mirroring FG-001's ReadOnlyToken/NoCredentialExec handling. Fork code running under plain `pull_request` with a read-only token is normal CI, not a secret-exfil pwn request. - FG-016 gains localActionStagedBeforeForkCheckout: a `uses: ./../<dir>/...` action that escapes the workspace and is staged by a run step BEFORE the untrusted checkout is trusted by construction (actions/checkout cannot write to a `..`-escaping sibling dir). This is GitHub's recommended "copy trusted scripts out of the checkout" hardening idiom. - FG-008 and FG-001 apply a one-level downgrade (critical->high) when the executing job declares an `environment:`, which may carry required-reviewer protection that pauses fork PRs for manual approval. Protection rules aren't visible in the workflow YAML, so this is a conservative downgrade, not a suppression. Adds 3 synthetic fixtures and 4 test functions. Full suite + self-scan green. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01NsA3oSPb5utBAKAjRVas6R
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.
Summary
Three mitigation-aware tuning fixes that eliminate a class of false-positive critical findings on properly-hardened
pull_request_target/workflow_runpipelines. All emerged from a deep triage of a heavily-hardened flagship repo where 15 raw criticals were confirmed (statically + at runtime via environment-protection and run-history APIs) to be false positives.Changes
read-all) or empty token with no secrets in scope, mirroring FG-001'sReadOnlyToken/NoCredentialExechandling. Fork code running under plainpull_requestwith a read-only token is normal CI, not a secret-exfil pwn request → downgrade to info.localActionStagedBeforeForkCheckout: auses: ./../<dir>/...action that escapes the workspace and is staged by a run step before the untrusted checkout is trusted by construction (actions/checkoutcannot write to a..-escaping sibling dir). This is GitHub's recommended "copy trusted scripts out of the checkout" hardening idiom.environment:, which may carry required-reviewer protection that pauses fork PRs for manual approval. Protection rules aren't visible in the workflow YAML, so this is a conservative downgrade, not a suppression — the finding is still surfaced for a triager to verify reviewers.Testing
TestCheckLocalActionUntrustedCheckout_ReadOnlyToken,_StagedSiblingDir,TestCheckOIDC_EnvironmentGated,TestCheckPwnRequest_EnvironmentGated).CGO_ENABLED=0 go test ./...green;fluxgate scan .self-scan clean.🤖 Generated with Claude Code
https://claude.ai/code/session_01NsA3oSPb5utBAKAjRVas6R