beaver-image-gen
Fail
Audited by Gen Agent Trust Hub on Apr 4, 2026
Risk Level: HIGHCOMMAND_EXECUTIONREMOTE_CODE_EXECUTIONCREDENTIALS_UNSAFE
Full Analysis
- [COMMAND_EXECUTION]: The Google provider implementation in
scripts/providers/google.tsutilizeschild_process.execSyncto invoke thecurlbinary. This execution path is triggered whenever an HTTP proxy is detected in the environment (e.g., viahttps_proxyorALL_PROXYvariables). - [REMOTE_CODE_EXECUTION]: The
execSynccall inscripts/providers/google.tsis vulnerable to shell command injection. Environment variables such asproxyandurl(derived fromGOOGLE_BASE_URL) are interpolated directly into a shell command string. While they are wrapped in double quotes, they are not escaped. Sincescripts/main.tsloads environment variables from project-local.envfiles (.beaver-skill/.env), an attacker could supply a malicious repository that executes arbitrary code when the agent attempts to generate an image using the Google provider. - [CREDENTIALS_UNSAFE]: In the
postGoogleJsonViaCurlfunction inscripts/providers/google.ts, the skill writes the Google API key to a temporary file in the system's temp directory to pass it as a header tocurl. Although it sets file permissions to0o600and attempts to delete the file after use, storing sensitive credentials in plaintext on disk, even temporarily, increases the risk of exposure to other processes on the system. - [PROMPT_INJECTION]: The skill is susceptible to indirect prompt injection because it ingests untrusted data from multiple sources—including user prompts, files specified via
--promptfiles, and standard input—without any sanitization or boundary markers. This data is then interpolated into API requests that have the capability to trigger network operations and subprocess execution.
Recommendations
- AI detected serious security threats
Audit Metadata