optimize-java-code
Pass
Audited by Gen Agent Trust Hub on Sep 26, 2026
Risk Level: SAFEINDIRECT_PROMPT_INJECTIONCOMMAND_EXECUTIONDYNAMIC_EXECUTION
Full Analysis
- [INDIRECT_PROMPT_INJECTION]: The skill is designed to ingest and analyze external Java source code, JFR recordings, and JMH benchmark results. This creates a potential surface for indirect prompt injection where malicious instructions could be embedded in code comments or metadata of the files being optimized.
- Ingestion points: Processes user-provided Java files (e.g., in
OrderIndex.java) and tool outputs like JMH JSON and JFR profiles. - Boundary markers: The skill does not define specific delimiters to separate untrusted data from instructions during the analysis phase.
- Capability inventory: The agent can write modified Java files, execute build commands (Maven), and run performance tests (Java, C compiler).
- Sanitization: The skill relies on standard tool parsing (JSON, JFR) and does not specify explicit sanitization for instructions embedded in data.
- [COMMAND_EXECUTION]: The skill workflow involves executing several shell-based tools to build and profile applications. This includes running Maven (
mvn), the Java compiler/runtime (javac,java), and a C compiler (cc) via theassets/examples/verify.shscript. - [DYNAMIC_EXECUTION]: The skill includes examples of JNI and Foreign Function & Memory (FFM) API usage, which involves compiling a C library (
native_add.c) at runtime and loading the resulting binary into the JVM for benchmarking. This is a legitimate part of testing native call overhead but involves dynamic code loading.
Audit Metadata