Skip to content

Commit

Permalink
Narrowed structural differences between Versions of Architecture tests
Browse files Browse the repository at this point in the history
  • Loading branch information
Markus Paulsen committed Nov 26, 2024
1 parent 6cb9ec1 commit 79c9c17
Showing 1 changed file with 27 additions and 18 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -73,24 +73,33 @@ public String writeArchitectureTestCase() {
public void executeArchitectureTestCase(CallGraph callGraph, JavaClasses javaClasses) {
try {
switch (this.javaArchitectureTestCaseSupported) {
case FILESYSTEM_INTERACTION -> JavaWalaSecurityTestCaseCollection
.noFileSystemAccess(callGraph);
case NETWORK_CONNECTION -> JavaWalaSecurityTestCaseCollection
.noNetworkAccess(callGraph);
case THREAD_CREATION -> JavaWalaSecurityTestCaseCollection
.noThreadManipulation(callGraph);
case COMMAND_EXECUTION -> JavaWalaSecurityTestCaseCollection
.noCommandExecution(callGraph);
case PACKAGE_IMPORT -> JavaWalaSecurityTestCaseCollection
.restrictPackageImport(javaClasses, allowedPackages);
case REFLECTION -> JavaWalaSecurityTestCaseCollection
.noReflection(callGraph);
case TERMINATE_JVM -> JavaWalaSecurityTestCaseCollection
.noJVMTermination(callGraph);
case SERIALIZATION -> JavaWalaSecurityTestCaseCollection
.noSerialization(callGraph);
case CLASS_LOADING -> JavaWalaSecurityTestCaseCollection
.noClassLoading(callGraph);
case FILESYSTEM_INTERACTION ->
JavaWalaSecurityTestCaseCollection
.noFileSystemAccess(callGraph);
case NETWORK_CONNECTION ->
JavaWalaSecurityTestCaseCollection
.noNetworkAccess(callGraph);
case THREAD_CREATION ->
JavaWalaSecurityTestCaseCollection
.noThreadManipulation(callGraph);
case COMMAND_EXECUTION ->
JavaWalaSecurityTestCaseCollection
.noCommandExecution(callGraph);
case PACKAGE_IMPORT ->
JavaWalaSecurityTestCaseCollection
.restrictPackageImport(javaClasses, allowedPackages);
case REFLECTION ->
JavaWalaSecurityTestCaseCollection
.noReflection(callGraph);
case TERMINATE_JVM ->
JavaWalaSecurityTestCaseCollection
.noJVMTermination(callGraph);
case SERIALIZATION ->
JavaWalaSecurityTestCaseCollection
.noSerialization(callGraph);
case CLASS_LOADING ->
JavaWalaSecurityTestCaseCollection
.noClassLoading(callGraph);
default -> throw new SecurityException(localized("security.common.unsupported.operation", this.javaArchitectureTestCaseSupported));
}
} catch (AssertionError e) {
Expand Down

0 comments on commit 79c9c17

Please sign in to comment.