Skip to content

fix: credit read-only token (FG-001) and parent-relative trusted action dirs#29

Merged
north-echo merged 1 commit into
mainfrom
fix/readonly-token-and-parent-path
Jul 18, 2026
Merged

fix: credit read-only token (FG-001) and parent-relative trusted action dirs#29
north-echo merged 1 commit into
mainfrom
fix/readonly-token-and-parent-path

Conversation

@north-echo

Copy link
Copy Markdown
Owner

Two FG-001/016 precision fixes from triaging cilium/cilium (heavily hardened CNCF project, over-flagged):

  • Read-only-token mitigation — a privileged-trigger job that runs fork code with a read-only GITHUB_TOKEN (read-all or all-read scopes) 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.
  • Parent-relative trusted action dirslocalActionUnderTrustedCheckout now 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

…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>
@north-echo
north-echo merged commit bfc788f into main Jul 18, 2026
1 check passed
@north-echo
north-echo deleted the fix/readonly-token-and-parent-path branch July 18, 2026 02:59
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