File tree Expand file tree Collapse file tree 1 file changed +40
-0
lines changed
rust/ql/lib/codeql/rust/security Expand file tree Collapse file tree 1 file changed +40
-0
lines changed Original file line number Diff line number Diff line change 1+ /**
2+ * Provides classes and predicates for reasoning about cleartext logging
3+ * of sensitive information vulnerabilities.
4+ */
5+
6+ import rust
7+ private import codeql.rust.dataflow.DataFlow
8+ private import codeql.rust.dataflow.internal.DataFlowImpl
9+ private import codeql.rust.security.SensitiveData
10+
11+ /**
12+ * Provides default sources, sinks and barriers for detecting cleartext logging
13+ * vulnerabilities, as well as extension points for adding your own.
14+ */
15+ module CleartextLogging {
16+ /**
17+ * A data flow source for cleartext logging vulnerabilities.
18+ */
19+ abstract class Source extends DataFlow:: Node { }
20+
21+ /**
22+ * A data flow sink for cleartext logging vulnerabilities.
23+ */
24+ abstract class Sink extends DataFlow:: Node { }
25+
26+ /**
27+ * A barrier for cleartext logging vulnerabilities.
28+ */
29+ abstract class Barrier extends DataFlow:: Node { }
30+
31+ /**
32+ * Sensitive data, considered as a flow source.
33+ */
34+ private class SensitiveDataAsSource extends Source instanceof SensitiveData { }
35+
36+ /** A sink for logging from model data. */
37+ private class ModelsAsDataSinks extends Sink {
38+ ModelsAsDataSinks ( ) { exists ( string s | sinkNode ( this , s ) and s .matches ( "log-injection%" ) ) }
39+ }
40+ }
You can’t perform that action at this time.
0 commit comments