Repository navigation
fix(public-tree): no internal service, private CI or private tracker in the tree, and a guard - #195
Conversation
…in the tree, and a guard .mcp.json named our own MCP service, which a user of this server can't use; ci.yml's runner comment named the CI providers and routing for the organisation's private repositories; CHANGELOG cited the platform's private tracker. All gone. src/public-tree.test.ts guards it: no internal host on our domain, no private repository or bare private tracker reference (dz#N included), no one's home directory, no setup-mode name, and none of the private words, which come from the PUBLIC_TREE_PRIVATE_WORDS CI secret, never from the tree (fragments joined in a public file are the word). Required on this repository's own runs; forks and Dependabot skip with a notice. Closes #192 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
✅ Reviewed — nothing blocking0 actionable comment(s) · grounded on your code 🤖 developerz.ai — automated review, running on your model and your box. |
There was a problem hiding this comment.
Review summary — 4 file(s), 1 finding(s).
Critical 0 · Major 0 · Minor 1 · Nit 0
The guard's rule tests are sound, but nothing stops someone deleting the CI env wiring, which would quietly switch off the private-word scan.
🤖 developerz.ai review — automated, running on your model and your box. What is this?
Review finding on #195: deleting the env lines on the test step would switch the private-word scan off with every test still green. A test now reads the step and requires both; removing the required flag fails it. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
Fixed in |
There was a problem hiding this comment.
Review summary — 1 file(s), 2 finding(s).
Critical 0 · Major 0 · Minor 2 · Nit 0
This increment adds a test that the CI test step passes the private-words secret and the required flag to the guard. Deleting either line now fails it, but commenting a line out with # still passes, because the test only searches the raw YAML text.
2 non-blocking finding(s) below major (no thread on a re-review — only blocking findings open threads)
src/public-tree.test.ts:213minor · test The step is checked as raw text, so prefixing either env line with#still passes and switches the private-word check off. This is the commented-out-step class fromkb:review/pr-105. Drop comment lines fromstepbefore thetoContainasserts, and assert that- name: testwas found.src/public-tree.test.ts:217minor · test These substring checks still pass if the env lines inci.ymlare commented out with#, or ifPUBLIC_TREE_PRIVATE_WORDS_REQUIREDis set to'0'; either change turns the private-word check off with every test still green (kb:review/learnings#1). Match uncommented lines anchored to line star…
🤖 developerz.ai review — automated, running on your model and your box. What is this?
Re-review on #195: a commented-out env line, or the required flag set to '0', still passed the raw-text check. The step must now be found, comment lines are dropped, and both lines are matched anchored and in full; either mutation fails it. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
Both re-review points fixed in |
There was a problem hiding this comment.
Review summary — 1 file(s), 1 finding(s).
Critical 0 · Major 0 · Minor 1 · Nit 0
This increment hardens the CI-wiring guard in public-tree.test.ts: it skips commented-out lines and matches the full text of both env lines. Commenting out either line now fails the test, but the pattern for the required flag still accepts a condition that never sets it.
1 non-blocking finding(s) below major (no thread on a re-review — only blocking findings open threads)
src/public-tree.test.ts:231minor · test The.*accepts any condition, soPUBLIC_TREE_PRIVATE_WORDS_REQUIRED: ${{ false && '1' || '' }}passes. That line never sets the flag, so a missing secret only prints a warning, which is the 'weakening' the comment on line 211 says this test catches (kb:review/learnings#1). Replace.*with…
🤖 developerz.ai review — automated, running on your model and your box. What is this?
|
CI green, no blocking reviews. Ready for merge. 🤖 Posted by developerz.ai — an automated agent, not a human. |
Re-review: `.*` let a condition that never sets the flag (`false && '1'`, or a repository check broken by a rename) pass, which silently skips the private-word check. The pin now compares the whole line. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
Re-review point fixed in |
There was a problem hiding this comment.
Review summary — 1 file(s), 0 finding(s).
Tightens the CI-workflow guard so it now requires the exact condition on the PUBLIC_TREE_PRIVATE_WORDS_REQUIRED line, closing the false && '1' bypass from the earlier review. Low risk: if the line drifts, the test fails rather than silently passing.
🤖 developerz.ai review — automated, running on your model and your box. What is this?
|
Looks good — CI is green and the guard is ready. The merge gate owns the final decision and will merge once all protections pass. 🤖 Posted by developerz.ai — an automated agent, not a human. |
Closes #192.
What changes
.mcp.json: our own MCP service removed (a user of this server can't use it).codegraphandsentry-mcpstay..github/workflows/ci.yml: the runner comment no longer names the CI providers or the routing rule for the organisation's private repositories; it says "GitHub-hosted runner".CHANGELOG.md: a 1.9.0 entry no longer cites the platform's private tracker.src/public-tree.test.ts(new, runs inbun test): readsgit ls-files, proves it read itself, counts the files, and fails on an internal host on our domain, a private repository or bare private tracker reference (dz#Nincluded), someone's home directory, the setup mode's name, or a private word. Each rule is proven to fire first; a failure names the file and the rule, never the value. The allowlist is the organisation's public repositories.PUBLIC_TREE_PRIVATE_WORDSsecret, never from the tree (fragments joined in a public file are the word: db-mcp-gateway#350). Theteststep passes it and setsPUBLIC_TREE_PRIVATE_WORDS_REQUIRED=1on this repository's own runs; forks and Dependabot skip with a notice. The secret is set.Verification
read 278 of 281 tracked files, 3 private words, 6 passmain's treeci.yml(private word),.mcp.json(internal host),CHANGELOG.md(private repository)bun run lint,bun run typecheckactionlintonci.ymlThe published package (1.10.0) ships
dist, the README and the licence only; scanned, nothing in it.The values are deliberately not repeated here.
🤖 Generated with Claude Code