Skip to content

Commit

Permalink
Add german translation for the wala security test cases
Browse files Browse the repository at this point in the history
  • Loading branch information
sarpsahinalp committed Dec 15, 2024
1 parent c7725c1 commit b00652d
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 13 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,6 @@
import com.ibm.wala.ipa.callgraph.CGNode;
import com.ibm.wala.ipa.callgraph.CallGraph;
import com.ibm.wala.shrike.shrikeCT.InvalidClassFileException;
import com.ibm.wala.ssa.IR;
import com.ibm.wala.ssa.SSAInstruction;
import com.ibm.wala.ssa.SymbolTable;
import com.tngtech.archunit.core.domain.JavaClasses;
import de.tum.cit.ase.ares.api.architecture.java.FileHandlerConstants;
import de.tum.cit.ase.ares.api.architecture.java.archunit.JavaArchUnitTestCaseCollection;
Expand Down Expand Up @@ -64,16 +61,14 @@ private static void createNoClassShouldHaveMethodRule(
return;
}
try {
String sb = "'" + ruleName + "'\r\n" +
"Method <" +
reachableNodes.getLast().getMethod().getSignature() +
"> calls method <" +
reachableNodes.get(reachableNodes.size() - 2).getMethod().getSignature() +
"> in (" + reachableNodes.getLast().getMethod().getDeclaringClass().getName().getClassName().toString() + ".java:" + reachableNodes.getLast().getMethod().getSourcePosition(0).getFirstLine() +
") accesses <" +
reachableNodes.getFirst().getMethod().getSignature();

throw new AssertionError(sb);
throw new AssertionError(localize("security.architecture.method.call.message",
ruleName,
reachableNodes.getLast().getMethod().getSignature(),
reachableNodes.get(reachableNodes.size() - 2).getMethod().getSignature(),
reachableNodes.getLast().getMethod().getDeclaringClass().getName().getClassName().toString(),
reachableNodes.getLast().getMethod().getSourcePosition(0).getFirstLine(),
reachableNodes.getFirst().getMethod().getSignature()
));
} catch (InvalidClassFileException e) {
throw new SecurityException(localize("security.architecture.invalid.class.file"));
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,7 @@ security.architecture.manipulate.threads=Manipulates threads
security.architecture.package.import=Imports forbidden packages
security.architecture.serialize=Serializes objects
security.architecture.class.loading=Manipulates the loading of classes
security.architecture.method.call.message=%s\r\nMethod <%s> calls method <%s> in (%s.java:%d) accesses <%s>

# Ares Code Creation
security.settings.error=Security configuration error: The class for the specific security test case settings could not be found. Ensure the class name is correct and the class is available at runtime.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,7 @@ security.architecture.manipulate.threads=Manipuliert Threads
security.architecture.package.import=Importiert verbotene Pakete
security.architecture.serialize=Serialisiert Objekte
security.architecture.class.loading=Manipuliert das Laden von Klassen
security.architecture.method.call.message='%s'\r\nMethode <%s> ruft Methode <%s> in (%s.java:%d) auf und greift auf <%s> zu

# Ares Code Creation
security.settings.error=Sicherheitskonfigurationsfehler: Die Klasse für die spezifischen Sicherheitstestfalleinstellungen konnte nicht gefunden werden. Stellen Sie sicher, dass der Klassenname korrekt ist und die Klasse zur Laufzeit verfügbar ist.
Expand Down

0 comments on commit b00652d

Please sign in to comment.