🔧 Remove Em Dash from unicode check#74
Merged
Merged
Conversation
Remove the Em Dash (U+2014) entry from the unicode character detection list as it is redundant with existing dash detection rules.
WalkthroughRemoved the Em Dash (e28094:2014) pattern from the harmful Unicode patterns detection list in a single file. This prevents Em Dash characters from being flagged as harmful threats in Unicode validation checks while preserving all other detection patterns and functionality. Changes
Estimated code review effort🎯 1 (Trivial) | ⏱️ ~3 minutes Poem
🚥 Pre-merge checks | ✅ 2 | ❌ 1❌ Failed checks (1 inconclusive)
✅ Passed checks (2 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches
🧪 Generate unit tests (beta)
📝 Coding Plan
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Greptile Summary
This PR removes the Em Dash (U+2014) entry from the
harmful_patternsarray in the Unicode Security Scanner. While the PR description states this "eliminates redundancy with existing dash detection rules," theis_common_unicode()function referenced is actually a skip-filter (used with--exclude-common), not a detection mechanism. Removing U+2014 fromharmful_patternsmeans Em Dash will no longer be detected at all."e28094:2014:Em Dash (looks like double hyphen)"from theharmful_patternsarrayis_common_unicode()function, which is now unreachable for U+2014 since it's no longer inharmful_patternsConfidence Score: 3/5
is_common_unicode()function is a filter, not a detection rule. This warrants author clarification before merging.check-for-unicode/run.sh— verify whether dropping Em Dash detection is the intended behaviorImportant Files Changed
is_common_unicode()is a skip-filter, not a detection mechanism. This change fully removes Em Dash detection.Flowchart
%%{init: {'theme': 'neutral'}}%% flowchart TD A[Iterate harmful_patterns] --> B{Is character in allowlist?} B -- Yes --> C[Skip] B -- No --> D{--exclude-emojis && is_emoji?} D -- Yes --> C D -- No --> E{--exclude-common && is_common_unicode?} E -- Yes --> C E -- No --> F[Search file for hex pattern] F --> G{Pattern found?} G -- Yes --> H[Report finding] G -- No --> C style A fill:#f9f,stroke:#333 style E fill:#ff9,stroke:#333 style H fill:#f66,stroke:#333 subgraph "Em Dash After This PR" I["U+2014 NOT in harmful_patterns"] --> J["Never enters detection loop"] J --> K["Never detected regardless of flags"] endPrompt To Fix All With AI
Last reviewed commit: 56cc66a