Skip to content

fix(config): rules_engine section defaults enabled to true - #639

Merged
ajianaz merged 1 commit into
developfrom
fix/rules-engine-enabled-default-638
Oct 9, 2026
Merged

ajianaz merged 1 commit into
developfrom
fix/rules-engine-enabled-default-638

Conversation

@ajianaz

@ajianaz ajianaz commented Oct 9, 2026

Copy link
Copy Markdown
Collaborator

What

RulesSection.enabled now defaults to true (serde default) and is only serialised when false, so a rules_engine: section that sets other keys keeps the built-in rule engine on. enabled: false still disables it and survives a serialise/deserialise round trip.

Why

rules_engine: { max_findings: 0 } (the documented way to raise the cap, #624) silently disabled every built-in rule because the section's enabled defaulted to false and overwrote the default (#638). Seen as a missed sec-hardcoded-secret finding with a one-key config.

Testing

New tests: section with only max_findings keeps rules on; enabled: false disables and round-trips. fmt, clippy -D warnings, full suite 2x green (1148). Binary: with rules_engine: {max_findings: 0} the builtin rule flags password = "abc" + "defgh12345"; with enabled: false it does not.

Closes #638

🤖 Generated with Claude Code

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
@ajianaz
ajianaz merged commit ba10cfc into develop Oct 9, 2026
14 checks passed
@ajianaz
ajianaz deleted the fix/rules-engine-enabled-default-638 branch October 16, 2026 00:43
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.

fix(config): a rules_engine section without enabled: true silently disables the built-in rules

1 participant