vitest
Fail
Audited by Gen Agent Trust Hub on Oct 8, 2026
Risk Level: HIGHREMOTE_CODE_EXECUTIONCOMMAND_EXECUTIONDYNAMIC_EXECUTIONPRIVILEGE_ESCALATIONINDIRECT_PROMPT_INJECTION
Full Analysis
- [REMOTE_CODE_EXECUTION]: The documentation in
references/MIGRATION_SCRIPT.mdexplicitly recommends downloading and executing shell scripts from an external source (https://raw.githubusercontent.com/[path]/...) usingcurl, followed bychmod +xto grant execution permissions. This pattern facilitates the execution of unverified remote code and bypasses standard package security controls. - [COMMAND_EXECUTION]: The skill includes automated migration scripts (
scripts/comprehensive-migrate.shandscripts/quick-migrate.sh) that execute high-impact commands, including installing global packages (npm install -g @vitest-codemod/jest), uninstalling software, and programmatically deleting project configuration files (rm -f jest.config.js). Such automated system modifications pose a risk of unintended data loss or environment instability. - [DYNAMIC_EXECUTION]: The
comprehensive-migrate.shscript employsnode -eto run inline JavaScript for modifyingtsconfig.json. While used for configuration, this pattern represents dynamic execution of code within a shell context, which can be exploited if the inputs are not strictly controlled. - [PRIVILEGE_ESCALATION]: The migration instructions guide the user to perform
chmod +xon scripts downloaded from the internet. This action elevates the privileges of potentially untrusted files, allowing them to execute with the user's local shell permissions. - [INDIRECT_PROMPT_INJECTION]: The skill's migration scripts ingest project-level data—such as searching for strings in source files via
grep, listing installed packages vianpm list, and readingtsconfig.json—and use this information to drive automated system actions. This creates an attack surface where malicious code or configuration in a project being analyzed could influence the script's behavior. - Ingestion points: Scripts read project configuration files (
tsconfig.json,package.json) and source test files viagrepandfs.readFileSyncincomprehensive-migrate.sh. - Boundary markers: No specific delimiters or safety warnings are present to instruct the agent to ignore potentially malicious embedded instructions in the test files being processed.
- Capability inventory: The scripts possess significant capabilities, including package management (
npm install/uninstall), file system modification (rm), and shell execution (node -e,git commit). - Sanitization: The scripts use standard JSON parsing for configuration updates but lack robust sanitization for content or paths discovered during the file-scanning phase.
Recommendations
- AI detected serious security threats
Audit Metadata