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 {
3030 }
3131}
3232
33- private module CommandInjectionConfig implements DataFlow:: ConfigSig {
33+ module CommandInjectionConfig implements DataFlow:: ConfigSig {
3434 predicate isSource ( DataFlow:: Node source ) { source instanceof Source }
3535
3636 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 {
8888 *
8989 * Such checks are ineffective in the `NotNormalized` state.
9090 */
91- private module PathInjectionConfig implements DataFlow:: StateConfigSig {
91+ module PathInjectionConfig implements DataFlow:: StateConfigSig {
9292 class FlowState = DataFlow:: FlowState ;
9393
9494 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 {
3535 }
3636}
3737
38- private module UnsafeShellCommandConstructionConfig implements DataFlow:: ConfigSig {
38+ module UnsafeShellCommandConstructionConfig implements DataFlow:: ConfigSig {
3939 predicate isSource ( DataFlow:: Node source ) { source instanceof Source }
4040
4141 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 {
3939 }
4040}
4141
42- private module UnsafeUnpackConfig implements DataFlow:: ConfigSig {
42+ module UnsafeUnpackConfig implements DataFlow:: ConfigSig {
4343 predicate isSource ( DataFlow:: Node source ) {
4444 // A source coming from a remote location
4545 source instanceof RemoteFlowSource
Original file line number Diff line number Diff line change 11missingAnnotationOnSink
22testFailures
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 |
163failures
Original file line number Diff line number Diff line change 11import python
22import experimental.dataflow.TestUtil.DataflowQueryTest
33import experimental.Security.UnsafeUnpackQuery
4- import FromLegacyConfiguration < UnsafeUnpackingConfig >
4+ import FromTaintTrackingConfig < UnsafeUnpackConfig >
Original file line number Diff line number Diff line change 11import python
22import experimental.dataflow.TestUtil.DataflowQueryTest
33import semmle.python.security.dataflow.PathInjectionQuery
4- import FromLegacyConfiguration < Configuration >
4+ import FromTaintTrackingStateConfig < PathInjectionConfig >
Original file line number Diff line number Diff line change 11import python
22import experimental.dataflow.TestUtil.DataflowQueryTest
33import semmle.python.security.dataflow.CommandInjectionQuery
4- import FromLegacyConfiguration < Configuration >
4+ import FromTaintTrackingConfig < CommandInjectionConfig >
Original file line number Diff line number Diff line change 11import python
22import experimental.dataflow.TestUtil.DataflowQueryTest
33import 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