fix(llm-security): YAML/workflow parser divergence — block scalars + bare if: (#32,#33,#43)
#33 the frontmatter parser collected a block-scalar body (description: |) but did not skip it, so an indented name:/allowed_tools: inside the body re-matched as a top-level key and overrode the real values TRG-shadow and permission checks depend on; the parser now consumes block-scalar bodies as opaque content. #32 block-scalar headers carrying indentation/chomping indicators (|2, >-, |-2) were not recognized, so their bodies never reached the run: injection sink; now matched via a proper indicator/chomping regex. #43 the B4 actor auth-bypass detector inspected only braced ${{ }} expressions, missing the canonical bare 'if: github.actor == ...' form (Synacktiv Dependabot-spoof false negative); bare if: expressions now emit a synthetic event the detector reads. Suite 2004/0. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01TcQyMTQfyrsAapaCMPxTtQ
This commit is contained in:
parent
207385fbbe
commit
b224e18b42
8 changed files with 244 additions and 7 deletions
14
tests/fixtures/workflows/.github/workflows/auth-bypass-bare-if.yml
vendored
Normal file
14
tests/fixtures/workflows/.github/workflows/auth-bypass-bare-if.yml
vendored
Normal file
|
|
@ -0,0 +1,14 @@
|
|||
name: dependabot trust check (bare if — Synacktiv 2023)
|
||||
on:
|
||||
pull_request_target:
|
||||
branches: [main]
|
||||
|
||||
jobs:
|
||||
auto-merge:
|
||||
runs-on: ubuntu-latest
|
||||
if: github.actor == 'dependabot[bot]'
|
||||
steps:
|
||||
- name: Checkout PR
|
||||
uses: actions/checkout@v4
|
||||
- name: Approve
|
||||
run: gh pr review --approve
|
||||
13
tests/fixtures/workflows/.github/workflows/tp-block-scalar-indent.yml
vendored
Normal file
13
tests/fixtures/workflows/.github/workflows/tp-block-scalar-indent.yml
vendored
Normal file
|
|
@ -0,0 +1,13 @@
|
|||
name: issue triage (block scalar with indentation indicator)
|
||||
on:
|
||||
pull_request_target:
|
||||
branches: [main]
|
||||
|
||||
jobs:
|
||||
triage:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Echo title
|
||||
run: |2
|
||||
echo "Issue title:"
|
||||
echo "${{ github.event.issue.title }}"
|
||||
Loading…
Add table
Add a link
Reference in a new issue