threejs-model-optimize
Warn
Audited by Gen Agent Trust Hub on Oct 28, 2026
Risk Level: MEDIUMDYNAMIC_EXECUTIONINDIRECT_PROMPT_INJECTIONCOMMAND_EXECUTIONEXTERNAL_DOWNLOADS
Full Analysis
- [DYNAMIC_EXECUTION]: The
scripts/optimize.mjsscript uses a dynamicimport()call with a computed URL to load a sibling inspection module from../../threejs-model-inspect/scripts/inspect.mjs. Loading code from paths constructed at runtime is a risk factor as it depends on the integrity of the relative file system structure. - [INDIRECT_PROMPT_INJECTION]: The skill processes glTF/GLB files and extracts metadata, including node and material names, to generate a before/after report. This data is displayed to the agent, creating a surface where a maliciously crafted 3D model could influence the agent's behavior via instructions embedded in its metadata.
- Ingestion points: The
addressableNamesfunction inscripts/optimize.mjsingests node and material names from the model via theinspecthelper. - Boundary markers: None. The extracted names are printed directly to the agent's console output in a comma-separated list without delimiters or warnings.
- Capability inventory: The skill has the capability to execute shell commands (
spawnSync) and perform file system operations. - Sanitization: None. While the script filters out default names (e.g.,
material_1), it does not sanitize names for natural language instructions or prompt injection patterns. - [COMMAND_EXECUTION]: The script executes external commands via
spawnSyncto run thegltf-transformutility. On Windows platforms, the script explicitly enablesshell: trueto invokenpx. If an attacker manages to place a file with a malicious name (e.g., containing shell metacharacters) and bypasses thestat()check, it could lead to command injection. - [EXTERNAL_DOWNLOADS]: The script uses
npxto fetch and execute the@gltf-transform/cli@4package from the NPM registry. This is a standard operation for a well-known service used to provide the skill's primary functionality.
Audit Metadata