mirror of
https://github.com/github/codeql.git
synced 2026-06-23 21:57:01 +02:00
Rust: Make the Seed case a tiny bit more realistic.
This commit is contained in:
@@ -7,6 +7,6 @@
|
||||
| test.rs:74:9:74:23 | ...::new(...) | HashingAlgorithm MD5 WEAK |
|
||||
| test.rs:133:26:133:40 | ...::new(...) | HashingAlgorithm MD5 WEAK |
|
||||
| test.rs:156:26:156:40 | ...::new(...) | HashingAlgorithm MD5 WEAK |
|
||||
| test.rs:176:13:176:23 | ...::new(...) | EncryptionAlgorithm SEED |
|
||||
| test.rs:176:13:176:24 | ...::new(...) | EncryptionAlgorithm SEED |
|
||||
| test.rs:199:22:199:32 | ...::new(...) | HashingAlgorithm SHA1 WEAK |
|
||||
| test.rs:211:13:211:35 | ...::compute(...) | HashingAlgorithm MD5 WEAK inputs:1 |
|
||||
|
||||
@@ -165,15 +165,15 @@ struct Seed {
|
||||
}
|
||||
|
||||
impl Seed {
|
||||
fn new() -> Self {
|
||||
fn new(seed_value: u64) -> Self {
|
||||
Seed { }
|
||||
}
|
||||
}
|
||||
|
||||
fn test_seed() {
|
||||
// this will be misrecognized as a use of the SEED algorithm, but being a strong
|
||||
// algorithm there is no query result anyway.
|
||||
let _ = Seed::new(); // $ Alert[rust/summary/cryptographic-operations]
|
||||
// algorithm and not sensitive data, there is no query result anyway.
|
||||
let _ = Seed::new(0); // $ Alert[rust/summary/cryptographic-operations]
|
||||
}
|
||||
|
||||
// ---
|
||||
|
||||
Reference in New Issue
Block a user