Skip to content

feat(tcfeed): refresh open requests to the current pack - #123

Merged
ralyodio merged 1 commit into
masterfrom
worktree-tcfeed-refresh
Aug 13, 2026
Merged

feat(tcfeed): refresh open requests to the current pack#123
ralyodio merged 1 commit into
masterfrom
worktree-tcfeed-refresh

Conversation

@ralyodio

Copy link
Copy Markdown
Contributor

Refs #120. The half of #122 that missed the merge — check --refresh was pushed to that branch after it was squashed, so TCFEED_PR_STANDING landed on master and refreshOne did not.

The 24 open requests are already fixed — I ran this before the merge — but the tool that fixed them is not in the tree, so it cannot be run again after the next pack change. This restores it.

Why it exists

The pack is read live from sh1pt so a corrected workflow reaches repositories. That was only ever true of requests not yet sent. 33 went out carrying npm install -g "…@latest", the pack was fixed an hour later, and all 24 still open kept showing the defective version to anyone who looked.

Three reviewers found it independently:

  • SonarCloud — failed a quality gate, githubactions:S8543

  • CodeRabbit — scored a request 🟡 Moderate for "an unpinned scanner with access to a write-scoped job"

  • GlassHaven/Haven#532 — declined on exactly that ground:

    whoever can publish that package can run code in this repository's CI from that point on, forever, without a further PR

    while noting the project hash-pins 13 tarballs in its ffmpeg stack alone. That is a maintainer applying their own published bar to us and finding us under it.

What it does

tcfeed check --refresh rewrites both pack files on every open request to whatever the pack currently renders, and reports already current when there is nothing to do — safe to run after any pack change without churning commits.

Written against the contents API rather than a clone: the open requests include seastar and lightning, and cloning a kernel-sized repository to rewrite two files under .github is minutes of transfer for a diff that fits on a screen. It also cannot carry anything else along by accident, which on somebody else's review is the more important half.

One detail worth flagging for review: the contents API wraps its base64 at 60 columns, so the newlines have to be stripped before decoding. Without that the decoded string never equals the file on disk and every run rewrites both files forever.

Verified

tsc --strict --noEmit clean. Run against all 24 open requests before the merge — 22 updated, 2 already current:

$ tcfeed check --refresh
· ElementsProject/lightning — updated threatcrush-scan.yml
· stamparm/maltrail — updated threatcrush-scan.yml
  ... 20 more ...
· NeptuneHub/AudioMuse-AI — already current
· scylladb/seastar — already current

Independently re-verified afterwards by decoding the file straight from each fork — 24/24 carry the pinned spec, --ignore-scripts and persist-credentials: false, with no @latest anywhere:

$ gh api .../ralyodio/lightning/contents/...threatcrush-scan.yml | base64 -d | grep 'npm install -g'
            if npm install -g --ignore-scripts "@profullstack/threatcrush@0.11.0"; then

Idempotency checked by running twice on the same repo: the second run reports already current and pushes nothing.

🤖 Generated with Claude Code

The pack is read live from sh1pt precisely so a corrected workflow reaches
repositories, and that was only ever true of requests not yet sent.
Thirty-three went out carrying `npm install -g "…@latest"`, the pack was
fixed an hour later, and all twenty-four still open kept showing the
defective version to anyone who looked at them.

Three reviewers found it independently, which is as clear a signal as this
gets. SonarCloud failed a quality gate on it (githubactions:S8543).
CodeRabbit scored a request Moderate for "an unpinned scanner with access
to a write-scoped job". Haven's maintainer declined on exactly that
ground — "whoever can publish that package can run code in this
repository's CI from that point on, forever, without a further PR" — while
noting the project hash-pins thirteen tarballs in its ffmpeg stack alone.
That is a maintainer applying their own published bar to us and finding us
under it.

`check --refresh` rewrites the two files on every open request to whatever
the pack currently renders, and says "already current" when there is
nothing to do, so it can be run after any pack change without churning
commits.

Written against the contents API rather than a clone: the open requests
include seastar and lightning, and cloning a kernel-sized repository to
rewrite two files under .github is minutes of transfer for a diff that
fits on a screen. It also cannot carry anything else along by accident,
which on somebody else's review is the more important half.

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

Copy link
Copy Markdown

ThreatCrush Security Scan

67 finding(s)

HIGH/CRITICAL: 11 | MEDIUM: 55 | LOW: 1

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
HIGH secret-generic-credential modules/spend-guard/config/example.conf.toml:13
HIGH secret-generic-credential modules/spend-guard/README.md:84
HIGH secret-generic-credential PRD.md:268
HIGH tls-verification-disabled prd/0004-find-dangerous-code-patterns-without-pretending-to-be-a-compiler.md:121
HIGH tls-verification-disabled prd/0004-find-dangerous-code-patterns-without-pretending-to-be-a-compiler.md:122
HIGH sh-remote-script-execution scripts/smoke-test.sh:46
HIGH sh-remote-script-execution scripts/smoke-test.sh:47
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:88
MEDIUM js-shell-exec-interpolation apps/cli/src/commands/service.ts:111
MEDIUM sql-template-interpolation apps/cli/src/core/state.ts:121
MEDIUM sql-template-interpolation apps/cli/src/core/state.ts:125
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:419
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:107
MEDIUM js-open-redirect apps/web/src/components/funding/FundingClient.tsx:97
MEDIUM manifest-install-lifecycle-script package.json:24

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

Snippets are redacted; ThreatCrush never prints matched credential material.

@ralyodio
ralyodio merged commit 356fd45 into master Aug 13, 2026
11 checks passed
@ralyodio
ralyodio deleted the worktree-tcfeed-refresh branch August 13, 2026 14:09
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