File tree Expand file tree Collapse file tree 1 file changed +3
-0
lines changed
python/ql/src/Security/CWE-798 Expand file tree Collapse file tree 1 file changed +3
-0
lines changed Original file line number Diff line number Diff line change @@ -18,6 +18,7 @@ import semmle.python.dataflow.new.TaintTracking
1818import semmle.python.filters.Tests
1919private import semmle.python.dataflow.new.internal.DataFlowDispatch as DataFlowDispatch
2020private import semmle.python.dataflow.new.internal.Builtins:: Builtins as Builtins
21+ private import semmle.python.frameworks.data.ModelsAsData
2122
2223bindingset [ char, fraction]
2324predicate fewer_characters_than ( StringLiteral str , string char , float fraction ) {
@@ -80,6 +81,8 @@ class HardcodedValueSource extends DataFlow::Node {
8081
8182class CredentialSink extends DataFlow:: Node {
8283 CredentialSink ( ) {
84+ this = ModelOutput:: getASinkNode ( "credentials-hardcoded" ) .asSink ( )
85+ or
8386 exists ( string name |
8487 name .regexpMatch ( getACredentialRegex ( ) ) and
8588 not name .matches ( "%file" )
You can’t perform that action at this time.
0 commit comments