ec2-deploy
Deploy to EC2 production server. Use when deploying new code, rebuilding Docker images, wiping and reseeding the database, checking container health, or managing the EC2 instance via AWS CLI.
Install this skill
or
58/100
Security score
The ec2-deploy skill was audited on Jul 29, 2026 and we found 6 security issues across 3 threat categories, including 1 critical. Review the findings below before installing.
Categories Tested
Security Issues
medium line 240
Command substitution pattern
SourceSKILL.md
| 238 | | SSH auth fails | Wrong key or username | Verify with `aws ec2 describe-instances` | |
| 239 | | Old code running after deploy | Image not rebuilt | Run `docker compose build` explicitly | |
| 240 | | Port 3001 already in use (local) | Another app using port | `kill $(lsof -t -iTCP:3001 -sTCP:LISTEN)` | |
| 241 | |
| 242 | --- |
low line 265
Command substitution pattern
SourceSKILL.md
| 263 | --metric-name CPUUtilization \ |
| 264 | --dimensions Name=InstanceId,Value=$INSTANCE_ID \ |
| 265 | --start-time $(date -u -v-1H +%Y-%m-%dT%H:%M:%SZ) \ |
| 266 | --end-time $(date -u +%Y-%m-%dT%H:%M:%SZ) \ |
| 267 | --period 300 \ |
low line 266
Command substitution pattern
SourceSKILL.md
| 264 | --dimensions Name=InstanceId,Value=$INSTANCE_ID \ |
| 265 | --start-time $(date -u -v-1H +%Y-%m-%dT%H:%M:%SZ) \ |
| 266 | --end-time $(date -u +%Y-%m-%dT%H:%M:%SZ) \ |
| 267 | --period 300 \ |
| 268 | --statistics Average \ |
medium line 194
Curl to non-GitHub URL
SourceSKILL.md
| 192 | |
| 193 | # API health |
| 194 | curl -s https://your-domain.com/api/health |
| 195 | |
| 196 | # DB check |
critical line 34
Access to SSH directory
SourceSKILL.md
| 32 | |----------|-------------|---------| |
| 33 | | `INSTANCE_NAME` | EC2 instance name tag | `my-app-prod` | |
| 34 | | `SSH_KEY` | Local SSH private key | `~/.ssh/my-app-prod-key.pem` | |
| 35 | | `SSH_USER` | OS user on instance | `ubuntu` (or `ec2-user`) | |
| 36 | | `PROJECT_DIR` | Git repo root on instance | `/home/ubuntu/my-project` | |
medium line 34
Access to home directory dotfiles
SourceSKILL.md
| 32 | |----------|-------------|---------| |
| 33 | | `INSTANCE_NAME` | EC2 instance name tag | `my-app-prod` | |
| 34 | | `SSH_KEY` | Local SSH private key | `~/.ssh/my-app-prod-key.pem` | |
| 35 | | `SSH_USER` | OS user on instance | `ubuntu` (or `ec2-user`) | |
| 36 | | `PROJECT_DIR` | Git repo root on instance | `/home/ubuntu/my-project` | |
Scanned on Jul 29, 2026
View Security Dashboard