Tom Hvitved
7a9cb64e2e
Java: Treat x.matches(regexp) as a sanitizer for request forgery
2025-10-24 09:06:57 +02:00
REDMOND\brodes
08379393b3
Crypto: Fix off by one column issue in unit tests.
2025-10-22 15:50:33 -04:00
REDMOND\brodes
3561d01144
Crytpo: Trying to fix in pipeline test failure, experimentally altering a line to see if this forces the test to pass. The test is off by one column in the piepline
2025-10-22 14:16:12 -04:00
REDMOND\brodes
dd60cf9395
Crypto: Adjust output of bad mac order queries, update associated bad mac order expected results, fix erroneous change to ID for a slicing query, update model to specify elliptic curve type as a property, update associated graph test expected files, update the not_included_in_qls.expected to reflect all queries now under quantum.
2025-10-22 10:29:31 -04:00
REDMOND\brodes
ddeb42cddb
Crypto: Adding false positive to BadMacUse.java, we have no way to avoid this FP currently but should note it exists in the test case.
2025-10-21 11:04:57 -04:00
yoff
9e77e5b046
java: add test with deeper paths
...
also format test files
2025-10-21 14:02:36 +02:00
yoff
f183a7223f
java: add test for notFullyMonitored
2025-10-21 13:40:29 +02:00
yoff
de05bfbce3
java: address review comments
...
- do not use `getQualifiedName`
- use camelCase
- rework alert predicates
2025-10-21 13:25:26 +02:00
REDMOND\brodes
cc436e897d
Merge branch 'santander-java-crypto-check' of https://github.com/bdrodes/codeql into santander-java-crypto-check
2025-10-20 15:24:40 -04:00
REDMOND\brodes
354effe829
Crypto: Missing hash algorithms for HMAC operations in jca.
2025-10-20 15:24:18 -04:00
Ben Rodes
2b683c210f
Merge branch 'main' into santander-java-crypto-check
2025-10-18 17:56:43 -04:00
REDMOND\brodes
c01c060476
Crypto: more ID renaming to include "examples", fix singleton issues with ql-for-ql, use formatted test for WeakAsymmetricKeyGenSize (add post processing in the qlref), misc expected files updated (test passed locally but on rerun vscode reports failures, known bug with vscode unit tests).
2025-10-17 14:13:53 -04:00
REDMOND\brodes
540daa6df2
Crypto: weak symmetric cipher tests.
2025-10-17 13:40:15 -04:00
REDMOND\brodes
b06e05362b
Crypto: altering all query IDs in examples to have "examples" in the ID, to make clear the query is not intended for production.
2025-10-17 13:39:50 -04:00
REDMOND\brodes
b4ecb91c83
Crypto: Add missing cipher algorithms to JCA. Update node tests to account for missing cipher algorithms.
2025-10-17 13:38:47 -04:00
REDMOND\brodes
f480d90a68
Crypto: Add missing block mode JCA Models, add block mode unit tests
2025-10-17 13:13:14 -04:00
REDMOND\brodes
e12734162f
Crypto: WeakKDFKeySize tests.
2025-10-17 12:32:24 -04:00
REDMOND\brodes
628bab92fc
Crypto: Modify BadMacOrderMacOnEncryptPlaintext to be a path query that traces through any intermediate encrypt or mac to the final encrypt or mac.
2025-10-17 12:06:34 -04:00
yoff
61a3e9630f
java: rewrite conflict detection
...
- favour unary predicates over binary ones
(the natural "conflicting access" is binary)
- switch to a dual solution to trade recursion through forall for simple existentials.
Co-authored-by: Anders Schack-Mulligen <aschackmull@github.com >
2025-10-17 01:43:04 +02:00
REDMOND\brodes
5923e5cbb0
Crypto: Bad expected files in last push.
2025-10-16 15:45:27 -04:00
REDMOND\brodes
700f34e53a
Crypto: Bad Mac use tests, and fix for BadMacOrderMacOnEncryptPlaintext (barriers were blocking flow through an encrypt to a subsequent mac on the same plaintext)
2025-10-16 15:44:57 -04:00
REDMOND\brodes
b9b0037e07
Crypto: Comment todo for observed missing modeled case. Tests for weak and unknown KDF iteration count.
2025-10-16 14:07:45 -04:00
REDMOND\brodes
3f36b09b3c
Crypto: Rename tests for weak asymmetric key gen size.
2025-10-16 11:18:36 -04:00
REDMOND\brodes
d2598d4f5d
Crypto: Updating weak hash tests
2025-10-16 10:56:08 -04:00
REDMOND\brodes
4860034d41
Crypto: Weak Hash test cases update and expected file.
2025-10-16 10:40:53 -04:00
REDMOND\brodes
25599e9b4b
crypto: Update JCA model macs to take into consideration update calls (use prior pattern for signatures). Misc. bug fixes.
2025-10-15 16:25:36 -04:00
Joe Farebrother
d8b37d0cde
Review suggestions - update comments and description
2025-10-14 16:03:40 +01:00
REDMOND\brodes
7e8acd76c3
Crypto: Update WeakAsymmetricKeyGenSize to a path problem.
2025-10-13 15:48:32 -04:00
REDMOND\brodes
8b5a42328e
Crypto: Convert ReusedNonce.ql into a path problem.
2025-10-13 15:34:41 -04:00
REDMOND\brodes
76128ed8dc
Crypto: Update InsecureIVorNonce to be a path problem.
2025-10-13 15:29:57 -04:00
REDMOND\brodes
bd068c2a69
Crypto: Updating expected file for weak asymmetric key gen size.
2025-10-13 12:08:07 -04:00
REDMOND\brodes
4b241d7065
Crypto: adding initial weak hash query overhaul and tests, but no expected file yet.
2025-10-13 12:04:51 -04:00
Joe Farebrother
9cb593b020
Update tests
2025-10-13 14:51:37 +01:00
Joe Farebrother
c4781146c0
Remove experimental query and tests
2025-10-13 14:51:10 +01:00
Joe Farebrother
c799f93811
Update tests and add inline expectations
2025-10-13 14:51:04 +01:00
REDMOND\brodes
36673659ad
Crypto: Weak asymmetric key gen size fixes and test.
2025-10-10 14:49:35 -04:00
REDMOND\brodes
758759a304
Crypto: Reused nonce query updates and test updates to address false positives.
2025-10-10 12:25:31 -04:00
REDMOND\brodes
fba80870a6
Crypto: Example query reorg - moving queries of this PR into 'examples' subdirectories.
2025-10-09 09:03:00 -04:00
yoff
830f02af1f
java: fixes from the CI bots
2025-10-09 09:37:31 +02:00
yoff
096d5f2a56
java: implement SCC contraction of the call graph
...
Our monitor analysis would be fooled by cycles in the call graph,
since it required all edges on a path to a conflicting access to be either
- targetting a method where the access is monitored (recursively) or
- monitored locally, that is the call is monitored in the calling method
For access to be monitored (first case) all outgoing edges (towards an access) need
to satisfy this property. For a loop, that is too strong, only edges out of the loop
actually need to be protected. This led to FPs.
2025-10-09 09:14:16 +02:00
yoff
5b30153113
java: add Escaping query (P1)
2025-10-09 09:14:16 +02:00
yoff
328b53576a
java: add SafePublication query (P2)
2025-10-09 09:14:16 +02:00
yoff
fe487e8bf0
java: add ThreadSafe query (P3)
...
Co-authored-by: Raúl Pardo <raul.pardo@protonmail.com >
Co-authored-by: SimonJorgensenMancofi <simon.jorgensen@mancofi.dk >
Co-authored-by: Bjørnar Haugstad Jåtten <bjornjaat@hotmail.com >
2025-10-09 09:14:16 +02:00
REDMOND\brodes
f524de4afc
Crypto: Updating insecure iv/nonce to consider if an operation is known for it, and if so do not alert on non-secure random if it is tied to decryption
2025-10-08 16:27:18 -04:00
REDMOND\brodes
7a57496c54
Crypto: Missing test update.
2025-10-08 14:16:47 -04:00
REDMOND\brodes
11e81395b5
Crypto: Updated default flows to use taint tracking (this is needed to fix false positives in the unknown IV/Nonce query). Add the unknown IV/Nonce query and associated test cases. Fix unknown IV/Nonce query to focus on cases where the oepration isn't known or the operation subtype is not encrypt or wrap.
2025-10-08 14:14:17 -04:00
REDMOND\brodes
75b5a9fda8
Crypto: Update general regression test results to account for removal of JCA random source.
2025-10-08 12:55:11 -04:00
REDMOND\brodes
83ff70bcd8
Crypto: Adding tests for insecure iv or nonce. Updating generic literal sources to include array literals.
2025-10-08 12:47:58 -04:00
Anders Schack-Mulligen
18e33b193e
Merge pull request #20589 from aschackmull/java/array-entrypoint-read-taint
...
Java: Allow taint-read-steps for array sources.
2025-10-07 15:04:03 +02:00
Anders Schack-Mulligen
f0bfd7053e
Java: Add test case.
2025-10-07 13:40:44 +02:00