Skip to content

Conversation

@script3r
Copy link
Owner

@script3r script3r commented Dec 26, 2025

  • Const evals
  • Dedup specificity

Note

Introduces inventory-focused improvements to detection and output.

  • Dedup specificity: New same-line dedupe prefers more specific identifiers (e.g., RSA-PKCS1 over RSA, ECDSA-P256 over ECDSA), reducing duplicate/generic hits
  • Local constant resolution: Evaluates in-file constants (numeric and string) to capture key sizes and algorithm choices (e.g., RSA key sizes, AES-GCM mode names)
  • Fixture updates: Refreshes expected results across C/C++ (OpenSSL, MbedTLS, libsodium), Go, Java, Python, PHP, Objective-C, Swift, and Tink; includes added findings, refined identifiers, and minor ordering changes (library assets often emitted after algorithms)
  • Docs: Adds DESIGN.md with pipeline, data model, and dedupe policy; updates README to emphasize inventory-first design and link to the design doc

Written by Cursor Bugbot for commit 6f9fab4. This will update automatically on new commits. Configure here.

@script3r script3r merged commit 2dedae1 into main Dec 26, 2025
2 checks passed
@script3r script3r deleted the feature/const branch December 26, 2025 16:25
Copy link

@cursor cursor bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This PR is being reviewed by Cursor Bugbot

Details

You are on the Bugbot Free tier. On this plan, Bugbot will review limited PRs each billing cycle.

To receive Bugbot reviews on all of your PRs, visit the Cursor dashboard to activate Pro and start your 14-day free trial.

@@ -1,2 +1,3 @@
{"assetType": "library", "evidence": {"column": 1, "line": 1}, "identifier": "OpenSSL (PHP)", "path": "FIXME"}
{"assetType": "algorithm", "evidence": {"column": 15, "line": 7}, "identifier": "AES-GCM", "metadata": {"keySize": 256, "primitive": "symmetric"}, "path": "FIXME"}
{"assetType": "algorithm", "evidence": {"column": 16, "line": 11}, "identifier": "AES-GCM", "metadata": {"keySize": 256, "primitive": "symmetric"}, "path": "FIXME"}
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

PHP test expects wrong keySize for AES-128-GCM const

The expected test output specifies keySize: 256 for line 11, but the source code uses const AES_GCM_CIPHER = 'aes-128-gcm' which should result in keySize: 128. The cipher string explicitly specifies 128-bit AES, not 256-bit. This incorrect test expectation will mask a bug where the const eval for PHP string values isn't correctly extracting the key size from the resolved cipher algorithm name.

Additional Locations (1)

Fix in Cursor Fix in Web

{"assetType": "algorithm", "evidence": {"column": 16, "line": 62}, "identifier": "AES", "metadata": {"primitive": "symmetric"}, "path": "FIXME"}
{"assetType": "algorithm", "evidence": {"column": 16, "line": 66}, "identifier": "AES", "metadata": {"primitive": "symmetric"}, "path": "FIXME"}
{"assetType": "algorithm", "evidence": {"column": 13, "line": 71}, "identifier": "AES", "metadata": {"primitive": "symmetric"}, "path": "FIXME"}
{"assetType": "algorithm", "evidence": {"column": 10, "line": 46}, "identifier": "AES-CBC", "metadata": {"primitive": "symmetric"}, "path": "FIXME"}
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Test expects inconsistent dedup for AES mode variants

The expected test output has inconsistent dedup behavior. On lines where AES-GCM is detected, generic AES is correctly removed per the documented dedup policy. However, on lines with AES-CBC, AES-CTR, AES-OFB, or AES-CFB, both the generic AES and the specific mode variant are kept. This violates the policy in DESIGN.md which states that when a more specific variant starting with the generic identifier plus - is present, the generic identifier should be dropped. The test expectations will pass despite incorrect dedup behavior for non-GCM modes.

Additional Locations (1)

Fix in Cursor Fix in Web

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