mirror of
https://github.com/github/codeql.git
synced 2025-12-23 04:06:37 +01:00
Refactor Revocation checking
This commit is contained in:
@@ -13,8 +13,8 @@
|
||||
|
||||
import java
|
||||
import RevocationCheckingLib
|
||||
import DataFlow::PathGraph
|
||||
import DisabledRevocationCheckingFlow::PathGraph
|
||||
|
||||
from DataFlow::PathNode source, DataFlow::PathNode sink, DisabledRevocationCheckingConfig config
|
||||
where config.hasFlowPath(source, sink)
|
||||
from DisabledRevocationCheckingFlow::PathNode source, DisabledRevocationCheckingFlow::PathNode sink
|
||||
where DisabledRevocationCheckingFlow::flowPath(source, sink)
|
||||
select source.getNode(), source, sink, "This disables revocation checking."
|
||||
|
||||
@@ -5,16 +5,16 @@ import DataFlow
|
||||
/**
|
||||
* A taint-tracking configuration for disabling revocation checking.
|
||||
*/
|
||||
class DisabledRevocationCheckingConfig extends TaintTracking::Configuration {
|
||||
DisabledRevocationCheckingConfig() { this = "DisabledRevocationCheckingConfig" }
|
||||
|
||||
override predicate isSource(DataFlow::Node source) {
|
||||
exists(BooleanLiteral b | b.getBooleanValue() = false | source.asExpr() = b)
|
||||
module DisabledRevocationCheckingConfig implements DataFlow::ConfigSig {
|
||||
predicate isSource(DataFlow::Node source) {
|
||||
source.asExpr().(BooleanLiteral).getBooleanValue() = false
|
||||
}
|
||||
|
||||
override predicate isSink(DataFlow::Node sink) { sink instanceof SetRevocationEnabledSink }
|
||||
predicate isSink(DataFlow::Node sink) { sink instanceof SetRevocationEnabledSink }
|
||||
}
|
||||
|
||||
module DisabledRevocationCheckingFlow = TaintTracking::Global<DisabledRevocationCheckingConfig>;
|
||||
|
||||
/**
|
||||
* A sink that disables revocation checking,
|
||||
* i.e. calling `PKIXParameters.setRevocationEnabled(false)`
|
||||
|
||||
Reference in New Issue
Block a user