Skip to content

refactor(rules): deduplicate hardcoded-secret regex across languages #274

@Darkroom4364

Description

@Darkroom4364

The hardcoded secret detection regex is copy-pasted across 9 language rule files with silent divergence — PHP's version drops `auth`, `credential`, and `private_?key` from the pattern.

  • Extract the keyword list and regex builder into a shared module (e.g. `src/rules/common.rs`)
  • Each language file calls the shared builder, optionally extending with language-specific patterns
  • Add a test that asserts all languages match the same base keyword set

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions