add symm to the single config; still seems to work

This commit is contained in:
Jami Cogswell
2022-10-12 08:51:22 -04:00
parent 29de0c6748
commit 01c2a8cbba
3 changed files with 28 additions and 15 deletions

View File

@@ -1,8 +1,8 @@
import java
import TestUtilities.InlineExpectationsTest
import semmle.code.java.security.InsufficientKeySizeQuery
import DataFlow::PathGraph
//import DataFlow::PathGraph // Note: importing this messes up tests - adds edges and nodes to actual file...
class InsufficientKeySizeTest extends InlineExpectationsTest {
InsufficientKeySizeTest() { this = "InsufficientKeySize" }
@@ -11,12 +11,12 @@ class InsufficientKeySizeTest extends InlineExpectationsTest {
override predicate hasActualResult(Location location, string element, string tag, string value) {
tag = "hasInsufficientKeySize" and
exists(DataFlow::PathNode source, DataFlow::PathNode sink |
exists(AsymmetricKeyTrackingConfiguration config1 | config1.hasFlowPath(source, sink))
or
exists(KeyTrackingConfiguration config1 | config1.hasFlowPath(source, sink))
|
//or
// exists(AsymmetricNonECKeyTrackingConfiguration config1 | config1.hasFlowPath(source, sink)) or
// exists(AsymmetricECKeyTrackingConfiguration config2 | config2.hasFlowPath(source, sink)) or
exists(SymmetricKeyTrackingConfiguration config3 | config3.hasFlowPath(source, sink))
|
//exists(SymmetricKeyTrackingConfiguration config3 | config3.hasFlowPath(source, sink))
sink.getNode().getLocation() = location and
element = sink.getNode().toString() and
value = ""