Repository navigation
fix(public-tree): a full guard with secret-held words, and three leaks it found - #80
Conversation
…s it found The platform's onboarding put our own MCP service back into .mcp.json (#48); the guard had no host rule, so it passed. The guard also joined two fragments into the private CI provider's name, publishing it. And the .deb maintainer address was on a private product's domain; a path from the platform agent's machine sat in .dz/onboarding/base-audit.md. tests/public_tree.rs is now the full guard the sibling repositories use: no internal host on our domain (.mcp.json scanned), no private repository or bare tracker reference, no home path (this package's own service user excepted), no setup-mode name, and none of the private words, which come from the PUBLIC_TREE_PRIVATE_WORDS CI secret, required on this repository's own runs. A test pins CI's exact wiring. The .deb maintainer is admin@developerz.ai. Closes #79 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 — 5 file(s), 1 finding(s).
Critical 0 · Major 0 · Minor 1 · Nit 0
Each guard rule has a test that fails if the rule breaks, and the CI secret wiring is pinned. The scan loop now panics on a tracked file missing from the working tree, which the old guard skipped on purpose.
- 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?
|
Address review findings on #80
Queued — waiting for a free box. 🤖 developerz.ai, an automated agent, not a human — developerz-ai[bot] |
|
Ready — CI green, all guards passed, no risk signals. The redesigned guard now reads private words from the secret (never assembling fragments), each rule is proven by test, and the 🤖 Posted by developerz.ai — an automated agent, not a human. |
Review on #80: an unstaged `rm` made std::fs::read panic, so the pre-commit gate failed every commit until the deletion was staged (the old guard skipped that case). NotFound is now skipped; any other read error still fails. 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).
This increment applies the earlier finding: the public-tree guard now skips a tracked file that was deleted from the working tree but not yet staged, and any other read error still panics. The change is low risk and the fix is correct.
- 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?
|
All gates pass — CI green, no risk signals. Ready for auto-merge. 🤖 Posted by developerz.ai — an automated agent, not a human. |
Closes #79. Follows #47.
What changes
.mcp.json: our own MCP service removed again (the platform's onboarding re-added it in Establish the AI-first base for developerz-ai/mcp-ssh #48);sentry-mcpandcodegraphstay.tests/public_tree.rsis now the full guard the sibling repositories use (db-mcp-gateway#353's design). It refuses an internal host on our domain (.mcp.jsonincluded), a private repository or bare private tracker reference, a home path (this package's ownmcp-sshservice user excepted), the setup mode's name, and a private word. Each rule is proven to fire; a failure names the file and the rule, never the value.PUBLIC_TREE_PRIVATE_WORDSsecret. The guard no longer joins fragments into a value.ci.yml'scargo test --lockedstep passes the secret and setsPUBLIC_TREE_PRIVATE_WORDS_REQUIRED=1on this repository's own runs; forks and Dependabot skip with a notice. A test pins the exact env lines. The secret is set.Cargo.toml: the.debmaintainer isadmin@developerz.ai..dz/onboarding/base-audit.md: the agent-machine path in a build log line is replaced with<checkout>.Verification
In a
rust:latestcontainer on the pinned toolchain (1.100.0):cargo fmt --check,cargo clippy --locked --all-targets -- -D warningscargo test --test public_treepublic-tree guard read 175 of 186 tracked files, 3 private words, greencargo test --locked(whole suite)dev_scripts::check_runs_the_gate_from_the_repo_rootfails the same way onmainin a bare container (it runsbin/check)The values are deliberately not repeated here.
🤖 Generated with Claude Code