Repository navigation
fix(public-tree): no setup-mode preamble or internal MCP service in the tree, and a guard - #32
Conversation
…he tree, and a guard Four files carried a preamble naming the internal setup mode; each now says it is owned by this repository's maintainers (or, for the onboarding proposal and the scorecard, says who wrote it). .mcp.json no longer names our own MCP service, and the scorecard drops its platform run id. bin/check-public-tree (bash) guards the tree as a "Public tree" step in the unconditional `checks` job, which the required `ci` gate grades: no internal host on our domain, no private repository or bare private tracker reference, 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. --self-test proves each rule fires and pins the workflow's exact wiring. Closes #30 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 — 7 file(s), 4 finding(s).
Critical 0 · Major 0 · Minor 4 · Nit 0
Removes the setup-mode preamble, an internal MCP endpoint and a run id from tracked files, and adds a bash guard to CI that scans the tracked files for private names. Low risk.
| File | Findings |
|---|---|
.github/workflows/ci.yml |
1 minor |
bin/check-public-tree |
3 minor |
- test files were not shown to the reviewer — this diff touched no path recognised as a test, so no assertion was available to read the change against
🤖 developerz.ai review — automated, running on your model and your box. What is this?
| done | ||
| echo "check-public-tree: read $read of ${#files[@]} tracked files, $(wc -l < "$words_file" | tr -d ' ') private words" >&2 | ||
| [[ $read -ge $min_tracked ]] || { echo "check-public-tree: read only $read tracked files" >&2; exit 1; } | ||
| [[ $failures -eq 0 ]] || { echo "check-public-tree: $failures finding(s); rule per file, value withheld" >&2; exit 1; } |
There was a problem hiding this comment.
minor · maintainability Every failure branch (lines 109, 119, 125, 128, 143, 144) prints a cause but no runnable fix: command, so an agent with a red run has no recovery command to paste (kb:review/learnings lesson 1). Add a fix: line to each, e.g. fix: bash bin/check-public-tree after editing the named files, or the command that sets the missing env var.
|
Address review findings on #32
Queued — waiting for a free box. 🤖 developerz.ai, an automated agent, not a human — developerz-ai[bot] |
…, fix: lines Review on #32: the guard is now a bin/check step (`public-tree`), and CI runs `bin/check --only checks --only public-tree` with the secret, so a contributor's bin/check grades what CI grades; raw.githubusercontent.com and api.github.com/repos paths count as repository references; a tracked path is checked like its content; every failure prints a fix: line. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
All four addressed in
|
…root check_test.rb pins bin/check's ordered steps; public-tree is now part of that contract (and of the two comments that list the steps). The guard compares resolved paths (`pwd -P`), so a checkout under a symlinked directory is not mistaken for another tree. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
There was a problem hiding this comment.
Review summary — 6 file(s), 4 finding(s).
Critical 0 · Major 0 · Minor 4 · Nit 0
This increment moves the public-tree guard into bin/check as its own step, so CI and contributors run the same command. It also extends the repo regex to raw/API GitHub URLs, scans file paths and adds fix: lines.
| File | Findings |
|---|---|
.github/workflows/release.yml |
1 minor |
bin/check |
1 minor |
bin/check-public-tree |
2 minor |
4 non-blocking finding(s) below major (no thread on a re-review — only blocking findings open threads)
.github/workflows/release.yml:197minor · security The releasebuildjob'sbin/check(release.yml:211-212) sets neitherPUBLIC_TREE_PRIVATE_WORDSnorPUBLIC_TREE_PRIVATE_WORDS_REQUIRED. A tag cut from a commit that never ran ci.yml on this repository therefore passes the release gate without the private-word check. Pass both env lines on th…bin/check:589minor · bug Thepublic-treestep now runs in every contributor'sbin/check. On stock macOS/bin/bash3.2, the self-test's${p1^^}(bin/check-public-tree:85) is a bad substitution andmapfile(:129) does not exist, so the pre-push gate goes red on an unchanged tree. Make the script check…bin/check-public-tree:136minor · security The path scan at lines 145-149 runs after thecontinueguards at lines 136-137, so the check never reads the name of some tracked files. Those are empty files (vendor/<private-repo>/.keep), binary files (<private-word>.png) and symlinks or other non-regular entries, andgit ls-filesstill p…bin/check-public-tree:145minor · test The new path scan is never exercised.--self-testonly callsviolationson fixture text and exits at line 116, so you could delete lines 145-149 or pass$fullinstead of$pathand every self-test andbin/checktest would stay green (kb:review/learnings lesson 2). Move the path rule into a…
🤖 developerz.ai review — automated, running on your model and your box. What is this?
|
CI passed. PR is ready to merge when the gates pass. 🤖 Posted by developerz.ai — an automated agent, not a human. |
|
CI passed, review approved, all findings addressed. Ready to merge. 🤖 Posted by developerz.ai — an automated agent, not a human. |
…, release gated Review on #32: `${x^^}` and `mapfile` are gone (stock macOS bash 3.2 runs the self-test and the scan); a tracked entry's path is checked even when its content is not read (empty, binary, symlink), through one scan_entry function the self-test exercises with an empty file named after a private word; release.yml's bin/check passes the secret and requires it. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
All four addressed in
|
There was a problem hiding this comment.
Review summary — 2 file(s), 1 finding(s).
Critical 0 · Major 0 · Minor 1 · Nit 0
One gap in the guard: it skips tracked symlinks, so a symlink's target text gets published without being scanned. The secret only reaches a temp file and is never printed.
1 non-blocking finding(s) below major (no thread on a re-review — only blocking findings open threads)
bin/check-public-tree:73minor · securityscan_entryreturns early for symlinks, but Git stores a symlink's target string as public blob content. A tracked symlink pointing at/home/alice/<private-repo>or a private-word path therefore passes green, and before this diff-fat least scanned the target file. Before the regular-file che…
- test files were not shown to the reviewer — this diff touched no path recognised as a test, so no assertion was available to read the change against
🤖 developerz.ai review — automated, running on your model and your box. What is this?
Review on #32: Git publishes a tracked symlink's target string as its blob, so a link pointing into someone's home or at a private name was published unchecked. scan_entry now checks the target; the self-test links to a home path and requires the finding. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
Fixed in |
There was a problem hiding this comment.
Review summary — 1 file(s), 0 finding(s).
Extends bin/check-public-tree to scan a tracked symlink's target text, which Git publishes as the blob's content, and adds a self-test case that fails if that check is removed. Low risk: the new branch runs before the regular-file test and the existing path and content checks are unchanged.
- test files were not shown to the reviewer — this diff touched no path recognised as a test, so no assertion was available to read the change against
🤖 developerz.ai review — automated, running on your model and your box. What is this?
Closes #30.
What changes
.claude/skills/verify-change/SKILL.mdand the three.dz/files): each now says it is owned by this repository's maintainers..mcp.json: our own MCP service removed;sentry-mcpandcodegraphstay. Scorecard: the platform run id line is gone.bin/check-public-tree(new; bash, no dependencies), run as a "Public tree" step in the unconditionalchecksjob, which the requiredcigate grades, so docs-only PRs run it too. It readsgit ls-files, proves it read itself, and fails on an internal host on our domain, a private repository or bare private tracker reference, someone's home directory, the setup mode's name, or a private word. A CODEOWNERS@org/teamis not a repository. A failure names the file and the rule, never the value.--self-testproves each rule fires, including on a 200 KB file with the match on line 1 (no SIGPIPE false pass underpipefail). It also pins CI's exact env lines: commenting one out or weakening the condition fails it.PUBLIC_TREE_PRIVATE_WORDSsecret, never from the tree (fragments joined in a public file are the word: db-mcp-gateway#350). The workflow step 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
bin/check-public-tree --self-testread 326 of 326 tracked files, 2 private words, greenmain's tree.mcp.jsonactionlintmain)The values are deliberately not repeated here.
🤖 Generated with Claude Code