mirror of
https://github.com/github/codeql.git
synced 2025-12-16 16:53:25 +01:00
Rust: Enable local threat models in tests and use active threat models for regex query
This commit is contained in:
@@ -21,7 +21,7 @@ private import codeql.rust.security.regex.RegexInjectionExtensions
|
||||
* A taint configuration for detecting regular expression injection vulnerabilities.
|
||||
*/
|
||||
module RegexInjectionConfig implements DataFlow::ConfigSig {
|
||||
predicate isSource(DataFlow::Node source) { source instanceof ThreatModelSource }
|
||||
predicate isSource(DataFlow::Node source) { source instanceof ActiveThreatModelSource }
|
||||
|
||||
predicate isSink(DataFlow::Node sink) { sink instanceof RegexInjectionSink }
|
||||
|
||||
|
||||
6
rust/ql/test/default-threat-models.model.yml
Normal file
6
rust/ql/test/default-threat-models.model.yml
Normal file
@@ -0,0 +1,6 @@
|
||||
extensions:
|
||||
- addsTo:
|
||||
pack: codeql/threat-models
|
||||
extensible: threatModelConfiguration
|
||||
data:
|
||||
- ["local", true, 0]
|
||||
@@ -6,3 +6,5 @@ dependencies:
|
||||
extractor: rust
|
||||
tests: .
|
||||
warnOnImplicitThis: true
|
||||
dataExtensions:
|
||||
- default-threat-models.model.yml
|
||||
|
||||
Reference in New Issue
Block a user