T09 · Insecure Skill Coding Practices
- Location
SKILL.md:68- Finding
Untrusted Project Plans Can Direct Arbitrary Deployment Command Execution
- Content
View full analysis
- Remediation
View remediation
Security audit
Security checks for vulnerabilities and agentic risk
This deployment skill is purpose-aligned, but it can automatically publish code, change production databases, and execute repository-controlled deployment instructions without clear approval gates.
Review this skill carefully before installing. It is not clearly malicious, but it should only be used in repositories and cloud environments where you are comfortable with an agent committing all changes, pushing to remotes, running migrations, and deploying to production. Require manual approval for exact commands, target branch, target environment, migration effects, and any repository-provided deployment scripts.
SKILL.md:68Untrusted Project Plans Can Direct Arbitrary Deployment Command Execution
SKILL.md:52Supabase CLI Is Executed Through Unpinned npx Package Resolution
SKILL.md:154Drizzle Migration Commands Execute an Unpinned Package Through npx
SKILL.md:123Blanket Git Staging Can Commit and Push Sensitive Files
Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.
1. **Use installed CLIs** — detect `vercel`, `wrangler`, `supabase`, `fly`, `sst` before falling back to `npx`.
2. **Auto-deploy aware** — if platform auto-deploys on push, just push. Don't run manual deploy commands unnecessarily.
3. **NEVER commit secrets** — no .env files with real values, no API keys in code.
4. **Preview before production** — deploy preview first, verify, then promote to prod.
5. **Check build locally first** — `pnpm build` / `uv build` (or equivalent) before deploying.
6. **Check production logs** — always tail logs after deploy, catch runtime errors before declaring success.
The activation guidance includes broad phrases like 'deploy it' and 'push to production', which can match ordinary conversational requests and trigger a powerful deployment skill. Because this skill performs git pushes, database changes, repo creation, and production rollout, over-broad triggering raises the risk of accidental high-impact execution.
The skill invokes npx supabase --version, which can fetch and execute a package version not explicitly pinned. In a deployment skill with Bash access, unpinned npx usage increases supply-chain risk because a compromised or unexpected upstream release could be executed on the operator's machine.
The skill autonomously decides deployment behavior from YAML or fallback logic, including whether a push is sufficient or a platform-specific deploy is needed. In a deployment context, automated decision-making without an approval gate can send code live based on inferred configuration rather than explicit user intent.
If `$ARGUMENTS` specifies a platform, use that instead of auto-detection or YAML.
**Auto-deploy platforms** (from YAML `deploy` field or fallback):
- `vercel` / `cloudflare_pages` — auto-deploy on push. Push to GitHub is sufficient if project is already linked. Only run manual deploy for initial setup.
- `cloudflare_workers` — `wrangler deploy` needed (no git-based auto-deploy for Workers).
- `fly.io` — `fly deploy` needed.
Skill enables autonomous high-impact decisions without human-in-the-loop verification. Critical operations (destructive commands, financial transactions, data deletion) should require explicit user confirmation.
If `$ARGUMENTS` specifies a platform, use that instead of auto-detection or YAML.
**Auto-deploy platforms** (from YAML `deploy` field or fallback):
- `vercel` / `cloudflare_pages` — auto-deploy on push. Push to GitHub is sufficient if project is already linked. Only run manual deploy for initial setup.
- `cloudflare_workers` — `wrangler deploy` needed (no git-based auto-deploy for Workers).
- `fly.io` — `fly deploy` needed.
Skill enables autonomous high-impact decisions without human-in-the-loop verification. Critical operations (destructive commands, financial transactions, data deletion) should require explicit user confirmation.
If `$ARGUMENTS` specifies a platform, use that instead of auto-detection or YAML.
**Auto-deploy platforms** (from YAML `deploy` field or fallback):
- `vercel` / `cloudflare_pages` — auto-deploy on push. Push to GitHub is sufficient if project is already linked. Only run manual deploy for initial setup.
- `cloudflare_workers` — `wrangler deploy` needed (no git-based auto-deploy for Workers).
- `fly.io` — `fly deploy` needed.
Skill enables autonomous high-impact decisions without human-in-the-loop verification. Critical operations (destructive commands, financial transactions, data deletion) should require explicit user confirmation.
If `$ARGUMENTS` specifies a platform, use that instead of auto-detection or YAML.
**Auto-deploy platforms** (from YAML `deploy` field or fallback):
- `vercel` / `cloudflare_pages` — auto-deploy on push. Push to GitHub is sufficient if project is already linked. Only run manual deploy for initial setup.
- `cloudflare_workers` — `wrangler deploy` needed (no git-based auto-deploy for Workers).
- `fly.io` — `fly deploy` needed.
Skill enables autonomous high-impact decisions without human-in-the-loop verification. Critical operations (destructive commands, financial transactions, data deletion) should require explicit user confirmation.
If `$ARGUMENTS` specifies a platform, use that instead of auto-detection or YAML.
**Auto-deploy platforms** (from YAML `deploy` field or fallback):
- `vercel` / `cloudflare_pages` — auto-deploy on push. Push to GitHub is sufficient if project is already linked. Only run manual deploy for initial setup.
- `cloudflare_workers` — `wrangler deploy` needed (no git-based auto-deploy for Workers).
- `fly.io` — `fly deploy` needed.
The skill instructs automatic git add, git commit, git push, and even gh repo create --push without an explicit approval checkpoint. In context, that can publish unreviewed code, exfiltrate proprietary work to a new remote, or alter repository history based on an ambiguous deployment request.
The instruction that pushing to main is sufficient for auto-deploy platforms directly links a git push to production release. In context, because the skill also performs automated pushes, this creates a clear path to unintended live deployment without a separate confirmation step.
gh repo create {project-name} --private --source=. --push
**For platforms with auto-deploy (Vercel, CF Pages):** pushing to main triggers deployment automatically. Skip manual deploy commands if project is already linked.
### Step 2. Database Setup
The database section directs schema push and migration commands (supabase db push, drizzle-kit push, wrangler d1 migrations apply) without requiring a warning or confirmation. These operations can irreversibly alter production databases, cause data loss, or apply incompatible schema changes if auto-executed.
npx drizzle-kit push executes an unpinned package during a database deployment step. Because this runs in a privileged operational context and can alter schema state, an unexpected or malicious package release could both execute arbitrary code and change production data structures.
npx drizzle-kit generate has the same unpinned execution risk as other npx calls. In a deploy workflow, this can introduce supply-chain exposure at the exact moment code and schema artifacts are being prepared for production.
The skill says not to write real secrets to local .env files, but then recommends shell patterns such as vercel env add NAME production <<< "value" and fly secrets set VARIABLE_NAME=value. Supplying secrets directly on the command line or via shell redirection can expose them to shell history, process inspection, logs, transcripts, or agent output capture.
The skill includes direct production deployment commands such as vercel --prod, wrangler deploy, fly deploy, and sst deploy --stage prod without an explicit publish approval gate. This is dangerous because a simple invocation can immediately change live infrastructure or user-facing services.
Skill enables autonomous high-impact decisions without human-in-the-loop verification. Critical operations (destructive commands, financial transactions, data deletion) should require explicit user confirmation.
## Critical Rules
1. **Use installed CLIs** — detect `vercel`, `wrangler`, `supabase`, `fly`, `sst` before falling back to `npx`.
2. **Auto-deploy aware** — if platform auto-deploys on push, just push. Don't run manual deploy commands unnecessarily.
3. **NEVER commit secrets** — no .env files with real values, no API keys in code.
4. **Preview before production** — deploy preview first, verify, then promote to prod.
5. **Check build locally first** — `pnpm build` / `uv build` (or equivalent) before deploying.