mirror of
https://github.com/github/codeql.git
synced 2026-01-15 15:34:49 +01:00
Merge branch 'main' into aegilops/polyfill-io-compromised-script
This commit is contained in:
@@ -18,6 +18,7 @@ import semmle.python.dataflow.new.TaintTracking
|
||||
import semmle.python.filters.Tests
|
||||
private import semmle.python.dataflow.new.internal.DataFlowDispatch as DataFlowDispatch
|
||||
private import semmle.python.dataflow.new.internal.Builtins::Builtins as Builtins
|
||||
private import semmle.python.frameworks.data.ModelsAsData
|
||||
|
||||
bindingset[char, fraction]
|
||||
predicate fewer_characters_than(StringLiteral str, string char, float fraction) {
|
||||
@@ -80,6 +81,11 @@ class HardcodedValueSource extends DataFlow::Node {
|
||||
|
||||
class CredentialSink extends DataFlow::Node {
|
||||
CredentialSink() {
|
||||
exists(string s | s.matches("credentials-%") |
|
||||
// Actual sink-type will be things like `credentials-password` or `credentials-username`
|
||||
this = ModelOutput::getASinkNode(s).asSink()
|
||||
)
|
||||
or
|
||||
exists(string name |
|
||||
name.regexpMatch(getACredentialRegex()) and
|
||||
not name.matches("%file")
|
||||
|
||||
4
python/ql/src/change-notes/2024-06-28-cred-hardcoded.md
Normal file
4
python/ql/src/change-notes/2024-06-28-cred-hardcoded.md
Normal file
@@ -0,0 +1,4 @@
|
||||
---
|
||||
category: minorAnalysis
|
||||
---
|
||||
* Adding Python support for Hardcoded Credentials as Models as Data
|
||||
Reference in New Issue
Block a user