Skip to content

Add reuse nonce test for java #20258

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

bdrodes
Copy link
Contributor

@bdrodes bdrodes commented Aug 20, 2025

Add a reuse nonce test for existing nonce reuse experimental query.

@bdrodes bdrodes requested a review from a team as a code owner August 20, 2025 17:24
@Copilot Copilot AI review requested due to automatic review settings August 20, 2025 17:24
@github-actions github-actions bot added the Java label Aug 20, 2025
Copy link
Contributor

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This PR adds a test case for the experimental nonce reuse detection query in Java. The test validates the query's ability to identify cryptographic nonce reuse vulnerabilities.

  • Adds comprehensive test scenarios demonstrating both vulnerable and secure nonce usage patterns
  • Creates test infrastructure with query reference and expected results
  • Covers multiple nonce reuse patterns including cross-function reuse and same-function reuse

Reviewed Changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated 1 comment.

File Description
Test.java Test file with various nonce usage scenarios including vulnerable reuse patterns and secure implementations
NonceReuse.qlref Query reference file pointing to the experimental nonce reuse detection query
NonceReuse.expected Expected test results defining the nonce reuse violations the query should detect

You can also share your feedback on Copilot code review for a chance to win a $100 gift card. Take the survey.

@@ -0,0 +1 @@
experimental/quantum/Analysis/ReusedNonce.ql

Check warning

Code scanning / CodeQL

Query test without inline test expectations Warning test

Query test does not use inline test expectations.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant