Skip to content

Rename SAST workflow to Code Review - #4

Merged
matej merged 2 commits into
mainfrom
matej/code-review-workflow
Feb 4, 2026
Merged

Rename SAST workflow to Code Review#4
matej merged 2 commits into
mainfrom
matej/code-review-workflow

Conversation

@matej

@matej matej commented Feb 4, 2026

Copy link
Copy Markdown
Member
  • Rename sast.yml to code-review.yml
  • Update workflow and job names to reflect general code review
  • Remove push trigger (only PRs and manual dispatch)
  • Remove exclude-directories and run-every-commit options

matej and others added 2 commits February 4, 2026 10:27
- Rename sast.yml to code-review.yml
- Update workflow and job names to reflect general code review
- Remove push trigger (only PRs and manual dispatch)
- Remove exclude-directories and run-every-commit options

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Update test to use current finding format (category field directly
instead of metadata.vulnerability_type) and expected output.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
@matej
matej merged commit 2706d17 into main Feb 4, 2026
2 checks passed
@matej
matej deleted the matej/code-review-workflow branch February 4, 2026 15:53
matej added a commit that referenced this pull request Jul 29, 2026
Both reviews independently confirmed several weaknesses in the previous
commit; all valid findings are addressed here.

Security (GitHub #1/#2, Codex F8):
- Replace the bypassable Bash denylist with an allowlist: the review
  subprocess may only run read-only git commands (diff/log/show/status/
  blame); everything else (python, node, openssl, arbitrary binaries)
  is denied in headless mode. Network tools stay denylisted as defense
  in depth.
- Remove credentials persisted by actions/checkout from .git/config
  before the scan step, so the review subprocess cannot read the
  workflow token (env stripping alone did not cover this).
- Reword README to describe defense-in-depth honestly instead of
  claiming egress is blocked.

Correctness (GitHub #3/#4/#5/#6, Codex F1/F2/F3/F5/F9):
- Diff packing now keeps fetching later pages until the character
  budget is genuinely exhausted; an oversized file on page 1 no longer
  hides every file on pages 2+.
- The filter-prompt window now grows outward from the finding line, so
  the char cap can never truncate away the very line being validated;
  focus lines beyond EOF clamp to the end of the file.
- API validation now pings the configured model instead of a hardcoded
  one - a misconfigured/retired CLAUDE_MODEL is caught up front instead
  of silently failing open on every finding (plus a loud warning when
  all validation calls fail).
- Reactions short-circuit is stricter: only an exact two-seed summary
  skips the fetch; single thumbs (possible human reaction after seed
  failure) and null counters are fetched safely.

Review quality (GitHub #7/#8, Codex F6/F7/F10):
- Dedup no longer suppresses findings whose previous thread is outdated
  (position: null) and only matches bot-authored comments; suppressed
  duplicates are listed in the review summary so they stay
  discoverable.
- Comment pagination degrades gracefully on mid-pagination API errors
  (e.g. GitHub's 3,000-file cap) instead of aborting the run; a page-1
  failure still surfaces as an error.
- The prompt's borderline-finding guidance now reflects whether the
  downstream Claude filter is actually enabled at runtime, instead of
  assuming it.
- The injection guardrail no longer demands a HIGH finding for inert
  prompt-injection strings in test fixtures/docs; it asks for judgment
  and intent-matched severity.

Tests: 243 Python + 28 JS passing (6 new Python tests, 1 new JS test,
dedup mocks updated for live-position/bot-author semantics).

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
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