Credential Access
High
- Category
- Privilege Escalation
- Content
DIR="$(cd "$(dirname "$0")" && pwd)" # 读取 .env if [ -f "$DIR/.env" ]; then set -a . "$DIR/.env" set +a
- Confidence
- 89% confidence
- Finding
- Using `set -a` and sourcing `. "$DIR/.env"` exports every variable defined in the file into the process environment, and because `.` executes shell syntax, a maliciously modified .env file could run arbitrary commands. In an agent skill context, local skill files may be treated as trusted configuration, but this pattern is still dangerous if the workspace or package contents can be influenced by an attacker.
