File tree Expand file tree Collapse file tree 9 files changed +8
-21
lines changed
lib/semmle/python/security/dataflow
src/experimental/Security
experimental/query-tests/Security/CWE-022-UnsafeUnpacking
CWE-078-UnsafeShellCommandConstruction Expand file tree Collapse file tree 9 files changed +8
-21
lines changed Original file line number Diff line number Diff line change @@ -30,7 +30,7 @@ deprecated class Configuration extends TaintTracking::Configuration {
30
30
}
31
31
}
32
32
33
- private module CommandInjectionConfig implements DataFlow:: ConfigSig {
33
+ module CommandInjectionConfig implements DataFlow:: ConfigSig {
34
34
predicate isSource ( DataFlow:: Node source ) { source instanceof Source }
35
35
36
36
predicate isSink ( DataFlow:: Node sink ) { sink instanceof Sink }
Original file line number Diff line number Diff line change @@ -88,7 +88,7 @@ class NormalizedUnchecked extends DataFlow::FlowState {
88
88
*
89
89
* Such checks are ineffective in the `NotNormalized` state.
90
90
*/
91
- private module PathInjectionConfig implements DataFlow:: StateConfigSig {
91
+ module PathInjectionConfig implements DataFlow:: StateConfigSig {
92
92
class FlowState = DataFlow:: FlowState ;
93
93
94
94
predicate isSource ( DataFlow:: Node source , FlowState state ) {
Original file line number Diff line number Diff line change @@ -35,7 +35,7 @@ deprecated class Configuration extends TaintTracking::Configuration {
35
35
}
36
36
}
37
37
38
- private module UnsafeShellCommandConstructionConfig implements DataFlow:: ConfigSig {
38
+ module UnsafeShellCommandConstructionConfig implements DataFlow:: ConfigSig {
39
39
predicate isSource ( DataFlow:: Node source ) { source instanceof Source }
40
40
41
41
predicate isSink ( DataFlow:: Node sink ) { sink instanceof Sink }
Original file line number Diff line number Diff line change @@ -39,7 +39,7 @@ class AllTarfileOpens extends API::CallNode {
39
39
}
40
40
}
41
41
42
- private module UnsafeUnpackConfig implements DataFlow:: ConfigSig {
42
+ module UnsafeUnpackConfig implements DataFlow:: ConfigSig {
43
43
predicate isSource ( DataFlow:: Node source ) {
44
44
// A source coming from a remote location
45
45
source instanceof RemoteFlowSource
Original file line number Diff line number Diff line change 1
1
missingAnnotationOnSink
2
2
testFailures
3
- | UnsafeUnpack.py:19:59:19:71 | Comment # $result=BAD | Missing result:result=BAD |
4
- | UnsafeUnpack.py:34:52:34:64 | Comment # $result=BAD | Missing result:result=BAD |
5
- | UnsafeUnpack.py:48:50:48:62 | Comment # $result=BAD | Missing result:result=BAD |
6
- | UnsafeUnpack.py:52:50:52:62 | Comment # $result=BAD | Missing result:result=BAD |
7
- | UnsafeUnpack.py:66:50:66:62 | Comment # $result=BAD | Missing result:result=BAD |
8
- | UnsafeUnpack.py:87:42:87:54 | Comment # $result=BAD | Missing result:result=BAD |
9
- | UnsafeUnpack.py:105:55:105:67 | Comment # $result=BAD | Missing result:result=BAD |
10
- | UnsafeUnpack.py:112:56:112:68 | Comment # $result=BAD | Missing result:result=BAD |
11
- | UnsafeUnpack.py:120:71:120:83 | Comment # $result=BAD | Missing result:result=BAD |
12
- | UnsafeUnpack.py:142:54:142:66 | Comment # $result=BAD | Missing result:result=BAD |
13
- | UnsafeUnpack.py:167:75:167:90 | Comment # $result=BAD | Missing result:result=BAD |
14
- | UnsafeUnpack.py:176:64:176:76 | Comment # $result=BAD | Missing result:result=BAD |
15
- | UnsafeUnpack.py:201:47:201:59 | Comment # $result=BAD | Missing result:result=BAD |
16
3
failures
Original file line number Diff line number Diff line change 1
1
import python
2
2
import experimental.dataflow.TestUtil.DataflowQueryTest
3
3
import experimental.Security.UnsafeUnpackQuery
4
- import FromLegacyConfiguration < UnsafeUnpackingConfig >
4
+ import FromTaintTrackingConfig < UnsafeUnpackConfig >
Original file line number Diff line number Diff line change 1
1
import python
2
2
import experimental.dataflow.TestUtil.DataflowQueryTest
3
3
import semmle.python.security.dataflow.PathInjectionQuery
4
- import FromLegacyConfiguration < Configuration >
4
+ import FromTaintTrackingStateConfig < PathInjectionConfig >
Original file line number Diff line number Diff line change 1
1
import python
2
2
import experimental.dataflow.TestUtil.DataflowQueryTest
3
3
import semmle.python.security.dataflow.CommandInjectionQuery
4
- import FromLegacyConfiguration < Configuration >
4
+ import FromTaintTrackingConfig < CommandInjectionConfig >
Original file line number Diff line number Diff line change 1
1
import python
2
2
import experimental.dataflow.TestUtil.DataflowQueryTest
3
3
import semmle.python.security.dataflow.UnsafeShellCommandConstructionQuery
4
- import FromLegacyConfiguration < Configuration >
4
+ import FromTaintTrackingConfig < UnsafeShellCommandConstructionConfig >
You can’t perform that action at this time.
0 commit comments