perf-optimization

Warn

Audited by Gen Agent Trust Hub on Oct 18, 2026

Risk Level: MEDIUMDYNAMIC_EXECUTIONINDIRECT_PROMPT_INJECTIONCOMMAND_EXECUTIONEXTERNAL_DOWNLOADS
Full Analysis
  • [DYNAMIC_EXECUTION]: The script scripts/frontend-lighthouse.sh contains an unsafe dynamic execution pattern. In the run_bundle function, the output of the vite build command is stored in a shell variable ($build_output) and then interpolated directly into a Node.js template literal via node -e "const output = \$build_output`; ...". If the build process output is manipulated to contain backticks or ${}` markers, it could lead to arbitrary JavaScript execution within the Node.js process.
  • [INDIRECT_PROMPT_INJECTION]: The skill is designed to ingest and analyze untrusted external data, including profiling data, build logs, and benchmark results. Because the skill also provides instructions for the agent to implement code optimizations and execute shell commands, it creates an attack surface where malicious data could influence the agent to perform unintended actions.
  • Ingestion points: Raw profiling data (pprof, heap, trace) and build artifacts processed in scripts/go-pprof.sh and scripts/frontend-lighthouse.sh.
  • Boundary markers: Absent; the scripts do not implement delimiters or warnings to treat external data as untrusted instructions.
  • Capability inventory: The skill possesses extensive capabilities including file system modification (Phase 4: Optimize), shell command execution (Step 1: Profile), and network operations via various profiling tools.
  • Sanitization: No sanitization or validation is performed on the content of the profiling data or build output before processing.
  • [COMMAND_EXECUTION]: The skill heavily relies on executing a wide range of system commands and third-party profiling tools (e.g., perf, valgrind, py-spy, dotnet-trace, jcmd). While these are standard performance tools, their execution on potentially untrusted binaries or environments requires careful monitoring.
  • [EXTERNAL_DOWNLOADS]: The scripts/frontend-lighthouse.sh script uses npx --yes to dynamically download and run the Lighthouse and Vite packages. While these originate from the well-known npm registry, this pattern introduces a dependency on external package availability and integrity.
Audit Metadata
Risk Level
MEDIUM
Analyzed
Oct 18, 2026, 11:18 AM