replicate-local-workflow
Pass
Audited by Gen Agent Trust Hub on Aug 5, 2026
Risk Level: SAFECOMMAND_EXECUTIONEXTERNAL_DOWNLOADS
Full Analysis
- [COMMAND_EXECUTION]: The skill invokes external tools via
npxto perform specific tasks. This includesmedia-provenancefor embedding metadata into images,replicate-mcpfor local model serving, and a skill management command to install related Replicate skills. These commands are executed as part of the intended local development workflow. - [EXTERNAL_DOWNLOADS]: The script
save-prediction.mjsdownloads media artifacts (images, videos, audio) from URLs provided in Replicate's prediction records using thefetchAPI. Additionally,npxcommands download necessary packages from the npm registry if they are not already present locally. - [SAFE]: The skill incorporates several security best practices to mitigate common risks associated with handling external data:
- Secret Protection: It explicitly instructs the agent to check for the presence of
REPLICATE_API_TOKENwithout printing or logging its value, preventing accidental credential exposure. - Input Sanitization: The
save-prediction.mjsscript utilizes aslug()function to sanitize prompt strings and prediction IDs before using them in local filenames, protecting against path traversal or filename-based attacks. - Collision Prevention: The file-saving logic uses numeric versioning (
__v002, etc.) and temporary files with random UUIDs to ensure that existing local files are never overwritten accidentally. - [SAFE]: The skill exposes an attack surface for indirect prompt injection as it processes data from the Replicate API to generate local artifacts. However, this is consistent with its primary purpose and includes sufficient sanitization.
- Ingestion points: The
save-prediction.mjsscript processes prediction JSON objects (including prompts and output URLs) retrieved from the Replicate API. - Boundary markers: While explicit prompt delimiters are absent, the data is handled programmatically rather than being directly interpolated into a secondary prompt.
- Capability inventory: The skill possesses file system access (writing and linking files), network access (downloading media), and the ability to spawn subprocesses via
execFileSync. - Sanitization: Potentially malicious characters in prompts are stripped out by the
slug()utility before being used in the file system.
Audit Metadata