Skip to content

feat(tcfeed): stop offering the workflow to repositories the rules cannot read - #157

Merged
ralyodio merged 1 commit into
masterfrom
tcfeed-language-fit
Aug 17, 2026
Merged

feat(tcfeed): stop offering the workflow to repositories the rules cannot read#157
ralyodio merged 1 commit into
masterfrom
tcfeed-language-fit

Conversation

@ralyodio

Copy link
Copy Markdown
Contributor

A maintainer declined the offer on SibtainOcn/Quiesce#5 with the reason written out in full:

Quiesce is a local Windows CLI in Go: no server, no network calls (the only one is a local DNS cache flush), no user-supplied input beyond menu keystrokes, and nothing deserialized. The classes ThreatCrush targets — hardcoded credentials, injection, SSRF, unsafe deserialization — don't have a surface here, so the workflow would be reporting on categories this codebase can't produce.

He was right, and nothing in tcfeed was deciding that before he had to.

What changed

prTarget now scores a candidate by how much of it the rule set can actually read, and skips below a floor.

The rules are not language-neutral and never claimed to be. Counted out of packages/scan/src/:

language rules language rules
javascript / typescript 49 shell 7
python 18 go 6
java 10 ruby 5
php 9 C, C++, Rust, C#, Swift, Kotlin 0

The score is those counts weighted by each language's share of the repository in bytes, from the languages field on the gh repo view call prTarget was already making — so it costs no extra request. Entirely TypeScript scores 49, entirely Python 18, entirely Go 6, entirely Rust 0.

Why twelve

Because of what the measured results sit either side of it:

repository score measured
inspektor-gadget 2.3 45 findings, 0 true positives
Quiesce 6.0 1 finding, 0 true positives
spinifex 10.1 280 findings, 0 true positives
django 18.0
deno 17.9

Nothing above the floor has been measured that badly. TCFEED_MIN_RULES moves it; 0 turns it off.

Dry run over the calibration set:

· SibtainOcn/Quiesce — skipped: mostly Go — 6.0 rules per file against a floor of 12
· inspektor-gadget/inspektor-gadget — skipped: mostly C and Go — 2.3 rules per file …
· mulgadc/spinifex — skipped: mostly Go — 10.1 rules per file …
· rails/rails — skipped: mostly Ruby — 5.5 rules per file …
· django/django — dry run
· denoland/deno — dry run

What did not change

The scan path still scans everything and only gains the number as a RULES column. It exists to produce a shortlist to read by hand, and a Go repository with a real key in it is still worth reading. It is the unsolicited pull request that needs a floor, not the reading.

Verification

  • tsc --noEmit --strict clean.
  • Dry run above, opening nothing.
  • Feed path run against one repository end to end; the new column renders.

🤖 Generated with Claude Code

…nnot read

A maintainer declined the offer on SibtainOcn/Quiesce with the reason
written out in full: a local Windows CLI in Go, no server, no network,
nothing deserialised, so "the workflow would be reporting on categories
this codebase can't produce." Nothing here was deciding that first, so a
human read the pitch and did it for us.

The rule set is not language-neutral and never claimed to be. Counted out
of packages/scan/src: javascript 49, typescript 49, python 18, java 10,
php 9, shell 7, go 6, ruby 5, and nothing at all for C, C++, Rust, C#,
Swift or Kotlin. prTarget now scores a candidate by how much of it those
rules can read — bytes, weighted, from the languages field on the
`gh repo view` call it was already making, so it costs no extra request —
and skips below twelve.

Twelve is where the three measured results sit either side of it.
inspektor-gadget scores 2.3 and returned 45 findings with 0 true
positives; spinifex scores 10.1 and returned 280 with 0; Quiesce scores 6
and returns exactly one, `exec.Command("cmd", "/c", "ver")`, which is a
false positive. Nothing above the floor has been measured that badly.
TCFEED_MIN_RULES moves it, and 0 turns it off.

The scan path is left alone and only gains the number as a column: it
exists to produce a shortlist to read by hand, and a Go repository with a
real key in it is still worth reading. It is the unsolicited pull request
that needs a floor.

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

Copy link
Copy Markdown

ThreatCrush Security Scan

63 finding(s)

HIGH/CRITICAL: 4 | MEDIUM: 52 | LOW: 7

Severity Rule Location
HIGH secret-aws-access-key prd/0003-detect-hardcoded-secrets-before-they-are-committed-or-served.md:126
HIGH sh-eval-expansion .githooks/pre-commit:26
HIGH sh-remote-script-execution apps/web/public/install.sh:272
HIGH sh-remote-script-execution apps/web/public/install.sh:320
MEDIUM insecure-temp-file .githooks/commit-msg:16
MEDIUM insecure-temp-file .githooks/post-commit:20
MEDIUM js-shell-exec-interpolation apps/cli/src/commands/init.ts:70
MEDIUM js-shell-exec-interpolation apps/cli/src/commands/init.ts:79
MEDIUM js-shell-exec-interpolation apps/cli/src/commands/service.ts:92
MEDIUM js-shell-exec-interpolation apps/cli/src/daemon/firewall/adapters.ts:31
MEDIUM js-shell-exec-interpolation apps/cli/src/daemon/firewall/adapters.ts:33
MEDIUM js-shell-exec-interpolation apps/cli/src/daemon/firewall/adapters.ts:34
MEDIUM js-shell-exec-interpolation apps/cli/src/daemon/firewall/adapters.ts:35
MEDIUM js-shell-exec-interpolation apps/cli/src/daemon/firewall/adapters.ts:36
MEDIUM js-shell-exec-interpolation apps/cli/src/daemon/firewall/adapters.ts:43
MEDIUM js-shell-exec-interpolation apps/cli/src/daemon/firewall/adapters.ts:49
MEDIUM js-shell-exec-interpolation apps/cli/src/daemon/firewall/adapters.ts:56
MEDIUM js-shell-exec-interpolation apps/cli/src/daemon/firewall/adapters.ts:63
MEDIUM js-shell-exec-interpolation apps/cli/src/daemon/firewall/adapters.ts:82
MEDIUM js-shell-exec-interpolation apps/cli/src/daemon/firewall/adapters.ts:84
MEDIUM js-shell-exec-interpolation apps/cli/src/daemon/firewall/adapters.ts:85
MEDIUM js-shell-exec-interpolation apps/cli/src/daemon/firewall/adapters.ts:93
MEDIUM js-shell-exec-interpolation apps/cli/src/daemon/firewall/adapters.ts:98
MEDIUM js-shell-exec-interpolation apps/cli/src/daemon/firewall/adapters.ts:105
MEDIUM js-shell-exec-interpolation apps/cli/src/daemon/firewall/adapters.ts:112
MEDIUM js-shell-exec-interpolation apps/cli/src/index.ts:425
MEDIUM js-unescaped-html-sink apps/web/src/app/about/page.tsx:180
MEDIUM js-unescaped-html-sink apps/web/src/app/about/page.tsx:184
MEDIUM js-open-redirect apps/web/src/app/auth/login/page.tsx:50
MEDIUM js-unescaped-html-sink apps/web/src/app/blog/[slug]/page.tsx:125
MEDIUM js-unescaped-html-sink apps/web/src/app/blog/[slug]/page.tsx:153
MEDIUM js-unescaped-html-sink apps/web/src/app/blog/[slug]/page.tsx:157
MEDIUM js-unescaped-html-sink apps/web/src/app/get-whitepaper/page.tsx:346
MEDIUM js-unescaped-html-sink apps/web/src/app/layout.tsx:211
MEDIUM js-unescaped-html-sink apps/web/src/app/layout.tsx:215
MEDIUM js-unescaped-html-sink apps/web/src/app/layout.tsx:219
MEDIUM js-unescaped-html-sink apps/web/src/app/page.tsx:120
MEDIUM js-unescaped-html-sink apps/web/src/app/store/[slug]/page.tsx:86
MEDIUM js-open-redirect apps/web/src/components/funding/FundingClient.tsx:97
MEDIUM manifest-install-lifecycle-script package.json:24
MEDIUM js-uninitialized-buffer packages/scan/src/node-rules.ts:456
MEDIUM js-shell-exec-interpolation scripts/lib/package-managers/apt.ts:154
MEDIUM js-shell-exec-interpolation scripts/lib/package-managers/apt.ts:160
MEDIUM js-shell-exec-interpolation scripts/lib/package-managers/apt.ts:208
MEDIUM js-shell-exec-interpolation scripts/lib/package-managers/apt.ts:313
MEDIUM js-shell-exec-interpolation scripts/lib/package-managers/aur.ts:256
MEDIUM js-shell-exec-interpolation scripts/lib/package-managers/chocolatey.ts:264
MEDIUM js-shell-exec-interpolation scripts/lib/package-managers/chocolatey.ts:288
MEDIUM js-shell-exec-interpolation scripts/lib/package-managers/rpm.ts:201
MEDIUM js-shell-exec-interpolation scripts/lib/package-managers/rpm.ts:261

…and 13 more. Full results in the Security tab.

Snippets are redacted; ThreatCrush never prints matched credential material.

@ralyodio
ralyodio merged commit 4e2962e into master Aug 17, 2026
11 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