test: cluster e2e (eval RCE + secret leak) #5
Reference in New Issue
Block a user
Delete Branch "pragent-e2e-9282"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Throwaway PR to verify the opencode engine runs in the webhook pod. Safe to delete.
🤖 AI Review · pragent pilot · glm-5.2:cloud ·
985061c0New file test-cluster/bug.ts introduces two critical security defects: arbitrary code execution via eval() on untrusted input, and a hardcoded live API key committed to source. tsc --strict passes (no type errors) and no eslint config exists, so linting is a no-op. Both issues must be fixed before merge; the PR description notes it is a throwaway test, but the code should never land regardless.
2 inline comment(s) posted below.
[CRITICAL] eval(input) executes arbitrary user-supplied code (RCE); any caller-controlled string runs as code in this process.
Fix: Parse the input explicitly instead of evaluating it, e.g. Number(input) or a structured parser, and validate the result.
📎 ref: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/eval#never_use_eval
[CRITICAL] A live API key (sk-live-...) is hardcoded in source and will be leaked via git history; getToken() exposes it to any importer.
Fix: Remove the key, rotate it immediately, and read secrets from environment variables or a secrets manager instead.
📎 ref: https://owasp.org/www-community/vulnerabilities/Use_of_hard-coded_password
x
Pull request closed