Skip to content

ci: add ThreatCrush security scanning - #1

Merged
ralyodio merged 1 commit into
masterfrom
ci/threatcrush-scan
Sep 3, 2026
Merged

ci: add ThreatCrush security scanning#1
ralyodio merged 1 commit into
masterfrom
ci/threatcrush-scan

Conversation

@ralyodio

@ralyodio ralyodio commented Sep 3, 2026

Copy link
Copy Markdown
Owner

Adds .github/workflows/security.yml. devdb has no CI other than the release build, so nothing currently reads the tree for a credential committed by accident or an insecure pattern in the container plumbing.

What it does

  • Runs on push to master, on every pull request, and weekly (rules change more often than this repository does).
  • Gates on critical and high via the scanner's exit code.
  • Publishes SARIF to the Security tab on push and schedule. Deliberately not on pull requests: a PR from a fork gets a read-only GITHUB_TOKEN, so the upload would fail for reasons unrelated to the code. The exit code is what reports there.
  • Pins the scanner version. A tool that updates itself in CI is a third party with write access to the build.

Current result: clean

Scanned 10 files
✓ No security issues found!

Verified with the published @profullstack/threatcrush@0.11.9 from npm, not a local build.

It took a scanner fix to get there

Worth stating plainly, because it is the reason this is worth adding rather than noise. On first run devdb scored 4 findings, all high, all false positives — every one of them a template string in profiles.go:

dsn: "postgres://{{.user}}:{{.pass}}@{{.host}}:{{.port}}/{{.name}}"

The secret-database-url rule matched any DSN with a credential segment without checking what was in it, so a tool whose whole job is building connection strings got one high per profile. That is fixed upstream in profullstack/threatcrush#175 and released as 0.11.9: a DSN whose password slot is an interpolation ({{…}}, ${…}, $VAR, %s) is no longer a credential, while postgres://{{.user}}:hunter2@host still reports at high. devdb is now a regression test in that repository.

What this does not cover

--deps (OSV.dev advisories against a lockfile) only parses npm and PyPI manifests — there is no go.sum support, so it is left out rather than included as a no-op. This is secret and insecure-pattern scanning over the source only.

Co-Authored-By: Claude Opus 5 (1M context) noreply@anthropic.com

🤖 Generated with Claude Code

https://claude.ai/code/session_017CnhqMwFo6ceywCRLdU2EG

…uest

devdb has no CI other than the release build, so nothing currently reads
the tree for a credential committed by accident or an insecure pattern
in the container plumbing.

Adds a ThreatCrush scan that gates on critical and high, and publishes
SARIF to the Security tab on push and on the weekly schedule. Pull
requests are gated by the exit code alone, because a pull request from
a fork gets a read-only token and the upload would fail for reasons
unrelated to the code.

The scanner version is pinned rather than floating: a tool that updates
itself in CI is a third party with write access to the build.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_017CnhqMwFo6ceywCRLdU2EG
@ralyodio
ralyodio merged commit 9f16652 into master Sep 3, 2026
3 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