Skip to content

[SECURITY] Optional consent gate for mcts inventory auto-discovery #287

@hello-args

Description

@hello-args

Summary

Add an optional explicit consent gate for mcts inventory auto-discovery, mirroring live/fuzz (probe/consent.py).

Problem

Issue #87 is satisfied by SECURITY.md documentation (not a consent flag) plus --paths-only, --config-path, and --redact-paths (PR #279). Default mcts inventory still auto-discovers and parses home-directory configs without an interactive or env-var opt-in.

This issue tracks optional hardening for enterprises that want live/fuzz-style opt-in beyond #87.

Expected Behavior

  • --i-understand-inventory-risk flag on mcts inventory
  • CI bypass via MCTS_INVENTORY_OK=1 (consistent with MCTS_LIVE_OK)
  • Gate applies when auto-discovery runs (default, --scan, --scan-all, analyzers)
  • Exempt: --paths-only, --config-path (explicit user scope)
  • Exit code 2 without consent; document in SECURITY.md, docs/platform/cli.md, docs/scanning/inventory.md

Evidence

  • src/mcts/probe/consent.py — live/fuzz consent pattern
  • src/mcts/cli/main.pyinventory command has no consent check

Impact

Enterprise users may want opt-in before any config parse. Breaking change if made default without migration period.

Recommendation

Implement src/mcts/inventory/consent.py parallel to probe/consent.py. Defer until after #87 / PR #279 merges.

References

Acceptance Criteria

  • Consent module + CLI flag + env bypass
  • Clear exit 2 message
  • Documented exemptions for --paths-only and --config-path
  • Tests for granted/denied paths

Metadata

Metadata

Assignees

No one assigned

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions