scratchpad
Pass
Audited by Gen Agent Trust Hub on Sep 20, 2026
Risk Level: SAFECOMMAND_EXECUTIONINDIRECT_PROMPT_INJECTION
Full Analysis
- [COMMAND_EXECUTION]: The skill invokes a local Node.js script (
extract-example.mjs) to perform its primary function. This script accepts command-line arguments derived from user input or environment context (source path and line number). - [INDIRECT_PROMPT_INJECTION]: The skill operates on untrusted source code provided via the
<source-path>argument. If a processed file contains malicious code within a JSDoc**Example**block, that code is extracted and written to a new file in the./scratchpaddirectory. If the agent or user is later prompted to execute this extracted code, it could lead to execution of the malicious content. - Ingestion points: The
extract-example.mjsscript reads external source files provided in thesource-pathargument. - Boundary markers: None identified; the script extracts content based on simple string and regex matches for JSDoc syntax.
- Capability inventory: The script has the capability to read files (
readFileSync), write files (writeFileSync), and create directories (mkdirSync). - Sanitization: The script validates the
--runneridentifier using a strict regex (/^[A-Za-z_$][\w$]*$/) and ensures the line number is a safe integer. However, there is no validation to ensure thesource-pathorout-dirremain within the project's scope. - [DATA_EXPOSURE]: The script uses
path.resolve()on the user-providedsourcePathwithout checking if the resolved path is within the workspace. This allows the script to read any file on the system that the current process has permissions for, provided the file contains the expected JSDoc markers.
Audit Metadata