optimize-cpp-code
Pass
Audited by Gen Agent Trust Hub on Sep 26, 2026
Risk Level: SAFECOMMAND_EXECUTIONDYNAMIC_EXECUTIONINDIRECT_PROMPT_INJECTION
Full Analysis
- [COMMAND_EXECUTION]: The skill utilizes a
verify.shscript to execute standard development tools including the local C++ compiler (c++), text processing utilities (awk,grep), and performance tools likehyperfineandxctrace. These commands are used locally to build, analyze, and measure the performance of the code under optimization. - [DYNAMIC_EXECUTION]: The skill facilitates the runtime compilation and execution of C++ source files using the local toolchain. This is a core feature designed to verify the functional correctness and performance improvements of optimized code against baseline implementations.
- [INDIRECT_PROMPT_INJECTION]: The skill manages an attack surface by ingesting and processing user-provided C++ source code, benchmark outputs, and profiler results.
- Ingestion points: Processes C++ source (
.cpp,.hpp), shell scripts (.sh), and profile data (e.g., XML fromxctrace). - Capability inventory: The agent performs shell command execution and invokes the compiler to evaluate optimization candidates.
- Boundary markers: The workflow mandates verification against an equivalence oracle and encourages the use of memory sanitizers (
AddressSanitizerandUndefinedBehaviorSanitizer) to catch lifetime and safety issues. - Sanitization: The skill relies on standard compiler diagnostics, sanitizer reports, and explicit developer review steps defined in the optimization workflow to ensure code safety.
Audit Metadata