Skip to content

Add Go AES-GCM cipher mode detection rules - #363

Merged
n1ckl0sk0rtge merged 2 commits into
mainfrom
fix/aes-go
Jan 25, 2026
Merged

n1ckl0sk0rtge merged 2 commits into
mainfrom
fix/aes-go

Conversation

@n1ckl0sk0rtge

@n1ckl0sk0rtge n1ckl0sk0rtge commented Jan 25, 2026 •

Copy link
Copy Markdown
Contributor

Summary

  • Add detection rules for additional GCM cipher mode constructors from Go's crypto/cipher package:
    • NewGCMWithNonceSize (custom nonce size)
    • NewGCMWithRandomNonce (auto-generated nonces, Go 1.25+)
    • NewGCMWithTagSize (custom tag size)
  • Include test case for NewGCMWithNonceSize with both encrypt and decrypt functions
  • Refactor imports and remove redundant fallback resolution logic in GoDetectionEngine

Test plan

  • Run mvn test -pl go -Dtest="GoCryptoAES*" - all AES tests pass
  • Verify detection works with real Go code using the new GCM variants

🤖 Generated with Claude Code

n1ckl0sk0rtge and others added 2 commits January 25, 2026 13:03
Add support for detecting additional GCM cipher mode constructors from
Go's crypto/cipher package:
- NewGCMWithNonceSize (custom nonce size)
- NewGCMWithRandomNonce (auto-generated nonces, Go 1.25+)
- NewGCMWithTagSize (custom tag size)

Includes test case for NewGCMWithNonceSize with both encrypt and decrypt
functions demonstrating AES-GCM detection.

Co-Authored-By: Claude Opus 4.5 <[email protected]>
@n1ckl0sk0rtge
n1ckl0sk0rtge requested a review from a team as a code owner January 25, 2026 12:24
@n1ckl0sk0rtge n1ckl0sk0rtge self-assigned this Jan 25, 2026
@n1ckl0sk0rtge n1ckl0sk0rtge added the bug Something isn't working label Jan 25, 2026
@n1ckl0sk0rtge
n1ckl0sk0rtge merged commit 0c27848 into main Jan 25, 2026
@n1ckl0sk0rtge
n1ckl0sk0rtge deleted the fix/aes-go branch January 25, 2026 12:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant