Skip to content

fix(ci): SAST actually scans the code + drop deprecated flaky semgrep action#930

Merged
ruvnet merged 1 commit into
mainfrom
fix/sast-scan-path-and-deprecated-semgrep
Jun 3, 2026
Merged

fix(ci): SAST actually scans the code + drop deprecated flaky semgrep action#930
ruvnet merged 1 commit into
mainfrom
fix/sast-scan-path-and-deprecated-semgrep

Conversation

@ruvnet
Copy link
Copy Markdown
Owner

@ruvnet ruvnet commented Jun 3, 2026

Two real problems in the SAST job (security-scan.yml)

1. It scanned a non-existent path — silent no-op.
bandit -r src/ and semgrep … src/ target the repo-root src/, but the Python code moved to archive/v1/src/ (64 .py files) when the runtime was rewritten in Rust. So the security scan matched nothing. (It's also why recent runs logged Path does not exist: bandit-results.sarif.) Fixed both to archive/v1/src/.

2. Deprecated + redundant + flaky semgrep step.
The returntocorp/semgrep-action@v1 step pulled returntocorp/semgrep-agent:v1 from Docker Hub on every run — which intermittently timed out and turned the check red (e.g. on #929) — and the action is EOL. It was also redundant: the pip semgrep --sarif step is what actually feeds GitHub Security; the action only pushed to the Semgrep cloud app (SEMGREP_APP_TOKEN). Removed it and folded its p/docker + p/kubernetes rulesets into the pip semgrep command, so ruleset coverage is preserved with no Docker pull.

Net effect

  • SAST now scans the real Python code instead of nothing.
  • No more Docker-Hub-pull flake on this check.
  • Same SARIF → GitHub Security upload; same rule coverage.

Job stays continue-on-error: true (non-gating). YAML validated; corrected path confirmed to contain 64 .py files.

🤖 Generated with claude-flow

… action

Two real problems in the Static Application Security Testing job:

1. **It scanned a path that no longer exists.** `bandit -r src/` and
   `semgrep … src/` pointed at the repo-root `src/`, but the Python code
   moved to `archive/v1/src/` (64 .py files) when the runtime was rewritten
   in Rust. So the SAST scan matched nothing — a silent no-op (this is also
   why `bandit-results.sarif` was "Path does not exist" on recent runs).
   Fixed both to `archive/v1/src/`.

2. **Deprecated + redundant + flaky semgrep step.** The
   `returntocorp/semgrep-action@v1` step pulled `returntocorp/semgrep-agent:v1`
   from Docker Hub every run (intermittently timing out → red check, e.g. on
   #929) and is EOL. It was redundant: the pip `semgrep --sarif` step is what
   feeds GitHub Security; the action only pushed to the Semgrep cloud app via
   SEMGREP_APP_TOKEN. Removed it and folded its `p/docker` + `p/kubernetes`
   rulesets into the pip semgrep command, so coverage is preserved with no
   Docker pull.

The job stays `continue-on-error: true` (non-gating). YAML validated.

Co-Authored-By: claude-flow <ruv@ruv.net>
@ruvnet ruvnet merged commit d9e87e1 into main Jun 3, 2026
20 checks passed
@ruvnet ruvnet deleted the fix/sast-scan-path-and-deprecated-semgrep branch June 3, 2026 09:18
ruvnet added a commit that referenced this pull request Jun 3, 2026
Per the CLAUDE.md pre-merge checklist (item 5, "Add entry under
[Unreleased]"), several recently-merged PRs landed without CHANGELOG
entries. Backfilling the user/operator-facing ones — most importantly the
MAT triage safety fix:

- #926 (Security/safety): survivor with a heartbeat never triaged Deceased
- #918: per-node HA devices report each node's own presence/motion
- #919: actionable --model load diagnostic (refs #894)
- #920: --export-rvf no longer silently produces a placeholder model
- #929 (Security): bearer scheme matched case-insensitively (RFC 6750)

CI-internal fixes (#925 rust-cache, #930 SAST) are intentionally omitted —
they don't change product behavior. Docs-only.
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