Skip to content

feat(scanner): emit Actions poll analyzer findings without double-count - #1152

Draft
seonghobae wants to merge 2 commits into
feat/actions-poll-structural-analyzer-1087from
feat/actions-poll-analyzer-emit-1087
Draft

feat(scanner): emit Actions poll analyzer findings without double-count#1152
seonghobae wants to merge 2 commits into
feat/actions-poll-structural-analyzer-1087from
feat/actions-poll-analyzer-emit-1087

Conversation

@seonghobae

Copy link
Copy Markdown
Contributor

Successor of #1133 / G-06 / issue #1087. This stacked slice hooks classify_poll_loops into production _scan_file for GitHub Actions workflows and merges regex plus analyzer hits by (rule_id, file) so the packaged #1088 corpus is not double-counted.

This pull request does not Close #1087 or #1088. It does not Close #1133.

What this adds

  • Production _scan_file also runs the structural poll-loop classifier on .github/workflows/*.{yml,yaml}
  • Finding rule IDs remain github-actions-transport-only-poll-bound and github-actions-transport-failure-budget-poll-bound
  • Deterministic merge keyed by (rule_id, file): if regex and analyzer would both report the same identity, emit once
  • Analyzer-only positives that regex adjacency misses: split while/do helper loops, reversed comparisons, unreachable fail-closed exits, quoted decoys next to a real poll
  • Quoted/comment/heredoc-only text stays negative; the historical fixed fixture stays negative for both IDs
  • Unconditional top-level break/exit/return remains a finite success-path terminator so existing security(actions): detect transport-only verdict poll bounds #1088 regex tests still pass
  • Regex YAML is unchanged

Verification

  • Historical vulnerable fixture: _scan_file count of github-actions-transport-only-poll-bound is 1
  • Historical fixed fixture: both poll-bound IDs absent
  • Focused tests: tests/test_actions_poll_analyzer_emit.py, tests/test_actions_poll_structural_analyzer.py, and the existing security(actions): detect transport-only verdict poll bounds #1088 poll regex corpus
  • appguardrail_core/actions_poll_analyzer.py remains 100% statement and branch coverage

Pin production _scan_file contracts for analyzer-only helper loops,
reversed comparisons, unreachable exits, and split while/do polls so
regex adjacency misses become findings without a third detector ID.
Hook classify_poll_loops into production _scan_file for GitHub Actions
workflows and merge by (rule_id, file) so the packaged #1088 identities
emit once. Split while/do helper loops, reversed comparisons, and
unreachable exits that regex adjacency misses now surface; quoted text
and success-path break/exit stay finite.
@coderabbitai

coderabbitai Bot commented Sep 7, 2026

Copy link
Copy Markdown

Important

Draft PR not reviewed

Draft PRs are not automatically reviewed by default.

  • Trigger a manual review

To automatically review draft PRs, update your CodeRabbit configuration:

reviews:
  auto_review:
    drafts: true

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

seonghobae added a commit that referenced this pull request Sep 7, 2026
Summary:
- Snapshot 15:28 UTC records Draft #1151 `822ca12` on #1150 and
  Draft #1152 `255cfd8` on #1133.
- `_scan_file` emits poll analyzer findings once per (rule_id, file).
- Deceptive read-only descriptions fail closed when inventory shows
  write or egress.

Rationale:
- #999 is the single writer of the product-technical gap baseline.
- G-06 emission waited on #1133 exact-head coverage SUCCESS.

Tests:
- documentation-only; evidence lives on #1151 (1560/1560) and #1152
  (417/417 analyzer statements)
seonghobae added a commit that referenced this pull request Sep 7, 2026
Refresh the single-writer gap baseline from live exact-head evidence:
Draft #1155 on #1154, and G-06 #1152 hosted coverage SUCCESS.
Relates to #1099.
@seonghobae seonghobae added enhancement New feature or request priority: medium Normal-priority or P2 work labels Sep 8, 2026 — with ChatGPT Codex Connector
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request priority: medium Normal-priority or P2 work

Projects

Status: Backlog

Development

Successfully merging this pull request may close these issues.

1 participant