Skip to content

ci: add Radar security scanning (secrets + SCA)#257

Merged
cvince merged 2 commits into
mainfrom
cvince/radar-security-scan
Jun 23, 2026
Merged

ci: add Radar security scanning (secrets + SCA)#257
cvince merged 2 commits into
mainfrom
cvince/radar-security-scan

Conversation

@cvince

@cvince cvince commented Jun 23, 2026

Copy link
Copy Markdown
Contributor

Adds a Security Scan workflow running Radar CLI — Gitleaks (secrets) and Grype (SCA) — on PRs and pushes to main. SAST is intentionally left to the existing CodeQL workflow (see below).

Behavior

  • Runs fully local: no EUREKA_AGENT_TOKEN, so no findings leave the runner.
  • Runs on ubuntu-latest (not the self-hosted CI runner) because Radar's scanners run as Docker containers.
  • Gate enforces a "no criticals/highs to main" policy via -t high: only high/critical findings fail the job; moderate/low still print to the log for triage.

Why secrets + SCA only (no Opengrep SAST)

  • Radar's Opengrep SAST overlaps the existing CodeQL coverage on this repo.
  • On a CLI whose job is to spawn processes, Opengrep's command-injection rules fire on inherent, by-design behavior (capy run running the user's own command, deploy adapters shelling to aws/wrangler, clipboard helpers, build/test tooling) rather than real vulnerabilities.
  • So Radar here adds what CodeQL does not — secret scanning and dependency/SCA — and CodeQL owns SAST.

Secret-scan allowlist

  • A repo-root .gitleaks.toml keeps the full default ruleset for shipped code (src/, bin/, scripts/) while allowlisting the tests/ tree, whose fixtures intentionally hardcode fake, credential-shaped values.
  • Verified locally against the exact gitleaks dir invocation Radar runs: 12 fixture findings to 0 with the allowlist.

Rollout: not yet a required status check — flip it in branch protection once the initial findings are triaged.

cvince added 2 commits June 23, 2026 11:48
Adds a Security Scan workflow that runs Radar CLI (EurekaDevSecOps/radarctl) —
Opengrep (SAST), Gitleaks (secrets), and Grype (SCA) — on pull requests and
pushes to main, complementing the existing CodeQL coverage.

Runs fully local (no telemetry token, nothing leaves the runner) on
ubuntu-latest, since Radar's scanners run as Docker containers. The gate uses
'-t high', so only high/critical findings fail the job; moderate/low print for
triage. A repo-root .gitleaks.toml keeps the full default secret ruleset for
shipped code (src/, bin/, scripts/) while allowlisting the tests/ tree, whose
fixtures intentionally contain fake, credential-shaped values.
The initial run surfaced 8 high-severity Opengrep SAST findings, all of them
command-injection rules firing on inherent CLI behavior — 'capy run' spawning
the user's own command, deploy adapters shelling out to aws/wrangler, clipboard
helpers, and build/test tooling. These are by-design for a local CLI, not real
vulnerabilities, and Opengrep also overlaps the existing CodeQL SAST workflow.

Drop opengrep so Radar covers what CodeQL does not — secret scanning (Gitleaks)
and dependency/SCA (Grype) — and let CodeQL own SAST.
@cvince cvince changed the title ci: add Radar security scanning (SAST + secrets + SCA) ci: add Radar security scanning (secrets + SCA) Jun 23, 2026
@cvince cvince merged commit 7c6ce2d into main Jun 23, 2026
5 checks passed
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