Summary
Apply --redact-paths to mcts inventory --scan-all written JSON (inventory-scan-all.json), not only the default inventory path.
Problem
Validated after #87 / PR #279 implementation (2026-06-17):
- Default
mcts inventory -o inventory.json --redact-paths redacts entries[].config_path and skills[].skill_path correctly.
mcts inventory --scan-all --redact-paths is currently a complete no-op on the written file — the flag is accepted but ignored on the scan-all code path.
write_inventory_scan_all() in src/mcts/inventory/scan_all.py always writes raw entry.model_dump() and _row() config_path values with no redaction hook.
- Both top-level
entries[] and scan_results[] retain full absolute paths (e.g. /Users/.../mcp.json).
- Nested
scan_results[].report payloads may contain additional paths (deeper redaction is optional follow-up within this issue or a sub-task).
SECURITY.md states nested scan reports are not redacted but does not make clear that entries in scan-all export are also unredacted when --redact-paths is passed.
Expected Behavior
When --redact-paths is set with inventory --scan-all:
- Thread
redact_paths from cli/main.py → write_inventory_scan_all() (and/or redact before _row()).
- Redact
config_path in entries[] and scan_results[] using redact_home() / redact_entry_dict().
- Document limits for deeply nested paths inside
scan_results[].report (full deep redaction optional; minimum is row-level paths).
- Alternative (if deep redaction deferred): emit exit 2 or a clear warning when
--redact-paths is combined with --scan-all until wiring is complete.
Evidence
src/mcts/cli/main.py — scan-all branch calls write_inventory_scan_all() without redact_paths
src/mcts/inventory/scan_all.py — write_inventory_scan_all, _row()
- Repro:
mcts inventory --config-path ~/.cursor/mcp.json --scan-all --redact-paths -o out.json
# entries[].config_path and scan_results[].config_path still absolute
Impact
Users on shared machines may export full home paths despite passing --redact-paths with --scan-all.
References
Acceptance Criteria
Summary
Apply
--redact-pathstomcts inventory --scan-allwritten JSON (inventory-scan-all.json), not only the default inventory path.Problem
Validated after #87 / PR #279 implementation (2026-06-17):
mcts inventory -o inventory.json --redact-pathsredactsentries[].config_pathandskills[].skill_pathcorrectly.mcts inventory --scan-all --redact-pathsis currently a complete no-op on the written file — the flag is accepted but ignored on the scan-all code path.write_inventory_scan_all()insrc/mcts/inventory/scan_all.pyalways writes rawentry.model_dump()and_row()config_pathvalues with no redaction hook.entries[]andscan_results[]retain full absolute paths (e.g./Users/.../mcp.json).scan_results[].reportpayloads may contain additional paths (deeper redaction is optional follow-up within this issue or a sub-task).SECURITY.mdstates nested scan reports are not redacted but does not make clear thatentriesin scan-all export are also unredacted when--redact-pathsis passed.Expected Behavior
When
--redact-pathsis set withinventory --scan-all:redact_pathsfromcli/main.py→write_inventory_scan_all()(and/or redact before_row()).config_pathinentries[]andscan_results[]usingredact_home()/redact_entry_dict().scan_results[].report(full deep redaction optional; minimum is row-level paths).--redact-pathsis combined with--scan-alluntil wiring is complete.Evidence
src/mcts/cli/main.py— scan-all branch callswrite_inventory_scan_all()withoutredact_pathssrc/mcts/inventory/scan_all.py—write_inventory_scan_all,_row()Impact
Users on shared machines may export full home paths despite passing
--redact-pathswith--scan-all.References
mcts inventoryreads local MCP configs without consent gate #87 — closed via default inventory privacy controlslocal/issue-87-pr-279-validation.mdAcceptance Criteria
--redact-pathsthreads through scan-all CLI →write_inventory_scan_allentries[].config_pathredacted in scan-all JSON when flag setscan_results[].config_pathredacted when flag setSECURITY.md,docs/scanning/inventory.md) state scan-all redaction scope accuratelyinventory --scan-all --redact-paths -oasserts~/prefixes, no full home path leakreportpath redaction or documented out-of-scope