Description
Deterministic security rules (sec-hardcoded-secret, sec-sql-concat, sec-tls-disabled, sec-hardcoded-url) match against their own pattern definitions in src/engine/rules/builtin.rs and test fixtures in src/engine/rules/mod.rs.
Findings from full codebase review
builtin.rs:20 — sec-sql-concat matches the regex pattern string itself
builtin.rs:38 — sec-tls-disabled matches the pattern string itself
rules/mod.rs:419 — sec-hardcoded-secret matches test fixture password = "super_secret_123"
rules/mod.rs:436 — sec-hardcoded-url matches test fixture http://example.com
All are false positives.
Expected Behavior
- Rule files (
**/rules/**) should be excluded from rule scanning by default
- Test files (
**/tests/**, **/*_test.rs) should be excluded or have lower severity
Fix
Add default exclude patterns to each builtin rule, or add a global exclude_source_files config.
Description
Deterministic security rules (sec-hardcoded-secret, sec-sql-concat, sec-tls-disabled, sec-hardcoded-url) match against their own pattern definitions in
src/engine/rules/builtin.rsand test fixtures insrc/engine/rules/mod.rs.Findings from full codebase review
builtin.rs:20— sec-sql-concat matches the regex pattern string itselfbuiltin.rs:38— sec-tls-disabled matches the pattern string itselfrules/mod.rs:419— sec-hardcoded-secret matches test fixturepassword = "super_secret_123"rules/mod.rs:436— sec-hardcoded-url matches test fixturehttp://example.comAll are false positives.
Expected Behavior
**/rules/**) should be excluded from rule scanning by default**/tests/**,**/*_test.rs) should be excluded or have lower severityFix
Add default exclude patterns to each builtin rule, or add a global
exclude_source_filesconfig.