Skip to content

fix: treat empty --only as run no rules - #42

Merged
royalpinto007 merged 4 commits into
AgentPostmortem:mainfrom
sharadvc:cursor/fix-only-empty-flag-af91
Sep 12, 2026
Merged

fix: treat empty --only as run no rules#42
royalpinto007 merged 4 commits into
AgentPostmortem:mainfrom
sharadvc:cursor/fix-only-empty-flag-af91

Conversation

@sharadvc

Copy link
Copy Markdown
Contributor

Summary

--only \"\" now enables allowlist mode with an empty list (run no rules) instead of ignoring the flag and running everything. Distinguishes “no --only” from “--only present but empty” via enforceEnabledRules.

Test plan

  • npm test — engine + CLI cases for empty --only

Fixes #26

sharadvc and others added 4 commits September 12, 2026 14:09
Treat an explicit --only flag (including an empty value) as a rule
allowlist. An empty allowlist runs zero rules. Distinguish that from the
default config where enabledRules is unset for filtering.

Fixes AgentPostmortem#26.

Co-authored-by: Sharad. <sharadvc@users.noreply.github.com>
@royalpinto007
royalpinto007 merged commit 2a7fe1a into AgentPostmortem:main Sep 12, 2026
4 checks passed
@github-actions

Copy link
Copy Markdown

Nice work @sharadvc, this is merged.

Good, focused change. Exactly the kind of thing MCP-audit needs.

If MCP-audit is useful to you, a star goes a long way.

Happy to see more from you whenever you have the time.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

--only "" runs all rules instead of none

2 participants