Skip to content

PycaHash rules were implemented but never wired into PythonDetectionRules#456

Closed
Arijit429 wants to merge 2 commits into
cbomkit:mainfrom
Arijit429:fix/python-hash-rules-not-registered
Closed

PycaHash rules were implemented but never wired into PythonDetectionRules#456
Arijit429 wants to merge 2 commits into
cbomkit:mainfrom
Arijit429:fix/python-hash-rules-not-registered

Conversation

@Arijit429
Copy link
Copy Markdown

PycaHash.java covers 17 hash algorithms (SHA1, SHA2, SHA3, SHAKE, MD5,
BLAKE2b/s, SM3, Prehashed) but was never added to PythonDetectionRules.java.
Hash detection was completely inactive for Python as a result.

Added the import and wired PycaHash.rules() into the Stream.of() in
PythonDetectionRules.java alongside the other rule sets.

Arijit429 added 2 commits May 23, 2026 09:40
…prevent false positives

Signed-off-by: Arijit429 <arijitdeb1203@gmail.com>
Signed-off-by: Arijit429 <arijitdeb1203@gmail.com>
@Arijit429 Arijit429 requested a review from a team as a code owner May 29, 2026 13:21
@san-zrl
Copy link
Copy Markdown
Contributor

san-zrl commented May 29, 2026

This PR breaks the tests. See https://github.com/cbomkit/sonar-cryptography/actions/runs/26639691947/job/78533213376?pr=456. You can build locally via

mvn clean package

@Arijit429
Copy link
Copy Markdown
Author

This PR breaks the tests. See https://github.com/cbomkit/sonar-cryptography/actions/runs/26639691947/job/78533213376?pr=456. You can build locally via

mvn clean package

Reverting this — PycaHash is intentionally used only as a depending
detection rule inside other rules, not as a standalone top-level rule.
Adding it to PythonDetectionRules breaks 14 existing tests. Closing this PR.

@Arijit429 Arijit429 closed this May 29, 2026
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.

2 participants