Skip to content

Conversation

@54J4N
Copy link

@54J4N 54J4N commented Jan 12, 2026

Previously, the rule had a critical bug where it would:

  1. Create unsafe regex from user input (potential regex injection)
  2. Search entire file text instead of checking against known API subjects
  3. Use wrong logic (parts.length < 3) that gave meaningless results

Now:

  • Use configured subject list instead of file search
  • Escape regex special characters for safety
  • Handle multi-word subjects properly
  • Add configuration validation
  • Fix AST traversal with safety limits

BREAKING CHANGE: Configuration now requires 'subjects' array

Previously, the rule had a critical bug where it would:
1. Create unsafe regex from user input (potential regex injection)
2. Search entire file text instead of checking against known API subjects
3. Use wrong logic (parts.length < 3) that gave meaningless results

Now:
- Use configured subject list instead of file search
- Escape regex special characters for safety
- Handle multi-word subjects properly
- Add configuration validation
- Fix AST traversal with safety limits

BREAKING CHANGE: Configuration now requires 'subjects' array
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants