fix: credit read-only token (FG-001) and parent-relative trusted action dirs#29
Merged
Merged
Conversation
…on dirs
Two FG-001/016 precision fixes from triaging cilium/cilium (a heavily
hardened CNCF project the scanner over-flagged):
- Read-only-token mitigation: a pull_request_target/issue_comment/
workflow_run job that runs fork code with a read-only GITHUB_TOKEN
(`read-all` or all-`read` scopes) and references no secrets has nothing
to exfiltrate and can't write — cap at low. Empty `permissions: {}`
still fully suppresses to info (jobHasNoToken); read-only is the softer
jobHasReadOnlyToken → cap-at-low. Adds severityRank helper.
- localActionUnderTrustedCheckout now handles parent-relative action
paths (`./../<dir>/...`), taking the first real path segment as the
checkout dir — so an action loaded from a sibling trusted-ref checkout
isn't flagged.
Reduced cilium's critical/high count materially (FG-001 workflow_run
critical→high via read-only cap; several FG-016 cleared). Note: cilium
still has residual FG-016/FG-008 findings from a separate fork-checkout-
to-subdir pattern not addressed here — needs a dedicated pass.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
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.
Two FG-001/016 precision fixes from triaging cilium/cilium (heavily hardened CNCF project, over-flagged):
read-allor all-readscopes) and no secrets can't write and has nothing to exfiltrate → cap at low. Empty{}still fully suppresses to info; read-only is the softer cap-at-low.localActionUnderTrustedCheckoutnow handles./../<dir>/...paths (sibling trusted-ref checkout).Materially reduced cilium's critical/high count. Residual: cilium still has FG-016/FG-008 findings from a separate fork-checkout-to-subdir pattern not covered here — flagged for a dedicated pass. Tests added, suite green.
🤖 Generated with Claude Code