search
Fail
Audited by Gen Agent Trust Hub on Apr 20, 2026
Risk Level: HIGHCOMMAND_EXECUTIONPROMPT_INJECTIONSAFE
Full Analysis
- [COMMAND_EXECUTION]: The
scripts/search.shscript is vulnerable to arbitrary shell command execution through theCURSORargument. - Evidence: The script uses the
CURSORvariable (assigned from the second command-line argument) directly inside a bash arithmetic expansion:START=$((CURSOR * 10)). - Vulnerability: In Bash, arithmetic expansions (
$((...))) perform shell expansion on their contents before evaluation. If a user or an agent provides a value such as$(id)for the cursor, the shell will execute the subshell command. - Mitigation: The script should validate that the
CURSORinput consists only of numeric digits before performing arithmetic operations. - [PROMPT_INJECTION]: The skill processes untrusted data from external search results, which can be leveraged to exploit the command execution vulnerability via indirect prompt injection.
- Ingestion points: Search results containing untrusted text from the web are fetched in
scripts/search.shvia the Bright Data API. - Boundary markers: While the output is structured as JSON, there are no delimiters or instructions to prevent the agent from interpreting text within the
titleordescriptionfields as new commands. - Capability inventory: The skill possesses the capability to execute shell commands through the vulnerable
scripts/search.shscript. - Sanitization: No input validation is performed on the
CURSORargument to ensure it is a safe integer value. - [SAFE]: The skill follows security best practices for credential management by requiring API keys to be provided via environment variables rather than hardcoding them.
- [SAFE]: The search query is correctly handled using
jq's URI encoding functionality to prevent injection into the search URL.
Recommendations
- AI detected serious security threats
Audit Metadata