config-audit/tests/snapshots/v5.0.0/fix-cli.json
Kjell Tore Guttormsen bec3f45329 fix(permissions): param-aware DIS dead-allow + CNF conflict matching
The DIS scanner collapsed Tool(param) rules to the bare tool name, so
Agent(model:opus) deny + Agent(model:sonnet) allow (and the same for
WebFetch(domain:...)) were flagged as dead config — a false positive now
that CC 2.1.178 matches Tool(param:value) and 2.1.172 adds domain rules.
The conflict-detector shared the blind spot from the other side: a
wildcard deny like WebFetch(domain:*) did not cover a
WebFetch(domain:good.com) allow, so a genuine cross-scope conflict was
missed (false negative).

New shared scanners/lib/permission-rules.mjs:
- parseRule / paramMatches (glob)
- dominates(deny, allow) -> DIS dead-allow (deny fully covers allow)
- rulesIntersect(a, b)   -> CNF cross-scope conflict (match sets intersect)

DIS now delegates to dominates; conflict-detector :156 delegates to
rulesIntersect. A bare deny still covers all params, so true positives
are preserved (Bash deny + Bash(npm:*) allow still flagged).

Re-seeded the marketplace-medium snapshots: the false-positive CA-DIS
finding (Read(src/**) allow + Read(./.env) deny) is correctly gone. This
changes snapshot CONTENT only — envelope schema is unchanged, so --json
and --raw stay byte-stable.

Full suite: 837/837 green (+25). self-audit PASS, A(100)/A(97).
2026-06-18 13:06:20 +02:00

124 lines
4.6 KiB
JSON

{
"planned": [],
"applied": [],
"failed": [],
"verified": [],
"regressions": [],
"manual": [
{
"findingId": "CA-CML-001",
"title": "Missing recommended sections",
"file": "/Users/ktg/repos/ktg-plugin-marketplace/config-audit/tests/fixtures/marketplace-medium/CLAUDE.md",
"recommendation": "Add sections for: Project overview, Architecture"
},
{
"findingId": "CA-GAP-001",
"title": "No custom skills or commands",
"file": null,
"recommendation": "Create project-specific skills in .claude/skills/ or commands in .claude/commands/ to automate repetitive workflows."
},
{
"findingId": "CA-GAP-002",
"title": "Settings only at one scope",
"file": null,
"recommendation": "Use all 3 settings scopes: ~/.claude/settings.json (user), .claude/settings.json (project), .claude/settings.local.json (local/personal)."
},
{
"findingId": "CA-GAP-003",
"title": "No path-scoped rules",
"file": null,
"recommendation": "Create .claude/rules/*.md with paths: frontmatter to apply rules only to matching files."
},
{
"findingId": "CA-GAP-004",
"title": "Low hook diversity",
"file": null,
"recommendation": "Use hooks across 3+ events (e.g., SessionStart, PreToolUse, Stop) for comprehensive automation."
},
{
"findingId": "CA-GAP-005",
"title": "No custom subagents",
"file": null,
"recommendation": "Create custom agents in .claude/agents/ or ~/.claude/agents/ with specialized tools and model selection."
},
{
"findingId": "CA-GAP-006",
"title": "No model configuration",
"file": null,
"recommendation": "Set model preferences in settings.json (model, modelOverrides) for cost/quality optimization."
},
{
"findingId": "CA-GAP-007",
"title": "No status line configured",
"file": null,
"recommendation": "Configure statusLine in settings.json to show context window usage, cost, and model info."
},
{
"findingId": "CA-GAP-008",
"title": "No custom keybindings",
"file": null,
"recommendation": "Create ~/.claude/keybindings.json to customize keyboard shortcuts (e.g., bind chat:newline to Shift+Enter)."
},
{
"findingId": "CA-GAP-009",
"title": "Using default output style",
"file": null,
"recommendation": "Try \"Explanatory\" or \"Learning\" output styles, or create custom styles in .claude/output-styles/."
},
{
"findingId": "CA-GAP-010",
"title": "No worktree workflow",
"file": null,
"recommendation": "Use --worktree for parallel feature development. Configure worktree.symlinkDirectories for node_modules."
},
{
"findingId": "CA-GAP-011",
"title": "No advanced skill frontmatter",
"file": null,
"recommendation": "Use disable-model-invocation, context:fork, or argument-hint in skill frontmatter for better control."
},
{
"findingId": "CA-GAP-012",
"title": "No subagent isolation",
"file": null,
"recommendation": "Use isolation: worktree in agent frontmatter for safe parallel development."
},
{
"findingId": "CA-GAP-013",
"title": "No dynamic skill context",
"file": null,
"recommendation": "Use !`command` syntax in skills to inject dynamic context (e.g., !`git branch --show-current`)."
},
{
"findingId": "CA-GAP-014",
"title": "No autoMode classifier",
"file": null,
"recommendation": "Configure autoMode in user/local settings with environment context and allow/deny rules."
},
{
"findingId": "CA-GAP-015",
"title": "No custom plugin",
"file": null,
"recommendation": "Package reusable skills, agents, and hooks as a Claude Code plugin with .claude-plugin/plugin.json."
},
{
"findingId": "CA-GAP-016",
"title": "No managed settings",
"file": null,
"recommendation": "Use managed-settings.json for organization-wide policy enforcement."
},
{
"findingId": "CA-GAP-017",
"title": "No LSP plugins",
"file": null,
"recommendation": "Add .lsp.json for real-time code intelligence from language servers."
},
{
"findingId": "CA-TOK-001",
"title": "High MCP tool-schema budget on server \"memory\"",
"file": ".mcp.json",
"recommendation": "Install the package locally (so detect-mcp-tool-count can read its manifest), or run the server once and cache its tools/list response under ~/.claude/config-audit/mcp-cache/<name>.json. See knowledge/cache-telemetry-recipe.md."
}
],
"backupId": null
}