Skip to content

Commit 9af2d02

Browse files
committed
Rust: Add the new sinks to stats.
1 parent 952e417 commit 9af2d02

File tree

2 files changed

+4
-1
lines changed

2 files changed

+4
-1
lines changed

rust/ql/src/queries/summary/Stats.qll

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ private import codeql.rust.controlflow.internal.CfgConsistency as CfgConsistency
1111
private import codeql.rust.dataflow.internal.DataFlowConsistency as DataFlowConsistency
1212
private import codeql.rust.security.SqlInjectionExtensions
1313
private import codeql.rust.security.CleartextLoggingExtensions
14+
private import codeql.rust.security.HardcodedCryptographicValueExtensions
1415

1516
/**
1617
* Gets a count of the total number of lines of code in the database.
@@ -62,6 +63,8 @@ string getAQuerySinkKind(DataFlow::Node n) {
6263
n instanceof SqlInjection::Sink and result = "SqlInjection"
6364
or
6465
n instanceof CleartextLogging::Sink and result = "CleartextLogging"
66+
or
67+
n instanceof HardcodedCryptographicValue::Sink and result = "HardcodedCryptographicValue"
6568
}
6669

6770
/**

rust/ql/test/query-tests/diagnostics/SummaryStats.expected

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
| Macro calls - resolved | 8 |
1515
| Macro calls - total | 9 |
1616
| Macro calls - unresolved | 1 |
17-
| Taint edges - number of edges | 1471 |
17+
| Taint edges - number of edges | 1475 |
1818
| Taint reach - nodes tainted | 0 |
1919
| Taint reach - per million nodes | 0 |
2020
| Taint sinks - cryptographic operations | 0 |

0 commit comments

Comments
 (0)