Skip to content

fix: exclude log rule from general scanning to prevent duplicates#19

Merged
HallyAus merged 1 commit intomainfrom
claude/issue-17-20260208-1035
Feb 8, 2026
Merged

fix: exclude log rule from general scanning to prevent duplicates#19
HallyAus merged 1 commit intomainfrom
claude/issue-17-20260208-1035

Conversation

@HallyAus
Copy link
Owner

@HallyAus HallyAus commented Feb 8, 2026

Resolves #17 - Double-up of items found

The R080LogContainsSecret rule was being included in the general rules list, causing it to run on all files during regular and environment file scanning, not just log files. This resulted in:

  1. Duplicate detections of the same secret on the same line
  2. Non-log files incorrectly labeled as "Secret in log"
  3. Files like googlecloud.json being scanned multiple times by different rules, creating separate findings with different contexts

Changes:

  • Removed R080LogContainsSecret from get_all_rules() return list
  • Added documentation explaining why it's excluded
  • The rule is now only used by scanner._scan_logs() for actual log files

This ensures the log rule only runs on log files via the dedicated log scanner, significantly reducing duplicate findings and preventing misleading "Secret in log" labels on non-log files.

Resolves #17 - Double-up of items found

The R080LogContainsSecret rule was being included in the general rules
list, causing it to run on all files during regular and environment file
scanning, not just log files. This resulted in:

1. Duplicate detections of the same secret on the same line
2. Non-log files incorrectly labeled as "Secret in log"
3. Files like googlecloud.json being scanned multiple times by different
   rules, creating separate findings with different contexts

Changes:
- Removed R080LogContainsSecret from get_all_rules() return list
- Added documentation explaining why it's excluded
- The rule is now only used by scanner._scan_logs() for actual log files

This ensures the log rule only runs on log files via the dedicated
log scanner, significantly reducing duplicate findings and preventing
misleading "Secret in log" labels on non-log files.

Co-authored-by: HallyAus <[email protected]>
@HallyAus HallyAus merged commit 5a21bdb into main Feb 8, 2026
1 check passed
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.

Double-up of items found

1 participant