deploy-automation — independently scanned and version-tracked by SaferSkills.
SaferSkills independently audited deploy-automation (Agent Skill) and scored it 100/100 (green). The audit ran 55 deterministic rules across Security, Supply Chain, Maintenance, Transparency, and Community; it found 0 high-severity and 0 lower-severity findings. The full rule-by-rule trace and per-finding evidence are below. Free, methodology-open.
Findings & checks · 0 flagged
Every scanned point with the score it earned and what moved between them.
First recorded scan — no prior version to compare against.
The primary manifest — the file an agent reads to learn what this artifact does.
This skill provides comprehensive workflows, patterns, and best practices for automating deployments across different environments and platforms.
Use this skill when:
Always automate:
Never manual:
Implement at every stage:
Every deployment must have:
┌─────────────────────────────────────────────────────────────┐
│ Choose deployment strategy based on: │
├─────────────────────────────────────────────────────────────┤
│ • Risk tolerance • Team size │
│ • Traffic volume • Infrastructure complexity │
│ • Release frequency • Database changes │
│ • Downtime tolerance • Testing confidence │
└─────────────────────────────────────────────────────────────┘
Strategy Recommendations:
High availability required (99.9%+):
→ Blue-Green or Canary
Frequent releases (multiple/day):
→ Rolling or Canary with feature flags
Database schema changes:
→ Expand-Contract pattern + Blue-Green
Low traffic / Internal tools:
→ Rolling or Recreate
Microservices architecture:
→ Canary per service + Feature flagsBest for: Low-risk changes, frequent deployments
# Key characteristics
- Gradual rollout (10% → 25% → 50% → 100%)
- Automatic progression on health checks
- Fast rollback by stopping rollout
- No infrastructure duplication
- Brief period with mixed versions
# Implementation checklist
- [ ] Health checks configured (readiness + liveness)
- [ ] Rollout parameters set (maxSurge, maxUnavailable)
- [ ] Monitoring dashboards ready
- [ ] Alert thresholds configured
- [ ] Rollback script testedSee resources/deployment-strategies.md for complete implementation.
Best for: Zero-downtime, high-confidence releases, database changes
# Key characteristics
- Two identical environments (Blue + Green)
- Instant traffic switch via load balancer
- Full rollback capability (switch back)
- Requires 2x infrastructure
- Testing on inactive environment before switch
# Implementation checklist
- [ ] Duplicate infrastructure configured
- [ ] Load balancer rules ready
- [ ] Database migration strategy defined
- [ ] Smoke tests prepared
- [ ] Traffic switch procedure documented
- [ ] Rollback procedure testedSee resources/deployment-strategies.md for complete implementation.
Best for: High-traffic applications, risk mitigation, gradual validation
# Key characteristics
- Gradual traffic shift (1% → 5% → 25% → 50% → 100%)
- Real user validation at each stage
- Automatic rollback on metrics degradation
- Requires traffic management (service mesh, ingress)
- Longer deployment time but lower risk
# Implementation checklist
- [ ] Metrics baseline established
- [ ] Analysis templates configured
- [ ] Traffic routing rules ready
- [ ] Alert thresholds defined
- [ ] Automatic rollback configuredSee resources/deployment-strategies.md for complete implementation.
┌─────────────────────────────────────────────────────────────────┐
│ CI/CD Pipeline Flow │
├─────────────────────────────────────────────────────────────────┤
│ │
│ Source → Build → Test → Security → Package → Deploy → Verify │
│ │ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │ │
│ lint compile unit SAST docker staging smoke │
│ validate integration SCA tag prod health │
│ coverage secrets push canary tests │
│ │
└─────────────────────────────────────────────────────────────────┘
Each stage must:
✓ Pass to proceed
✓ Fail fast on errors
✓ Generate artifacts/logs
✓ Be reproducibleEssential stages for every pipeline:
environments:
development:
purpose: Developer testing
deployment: Automatic on commit
data: Mock/synthetic
access: Development team
monitoring: Basic
staging:
purpose: Pre-production validation
deployment: Automatic on main branch
data: Anonymized production copy
access: QA + Dev teams
monitoring: Full
production:
purpose: Live user traffic
deployment: Manual approval required
data: Real user data
access: Restricted
monitoring: Comprehensive + alertingBest practices:
Code → Same across environments
Config → Environment-specific
Secrets → Managed separately # Never in code
❌ DB_PASSWORD="secret123"
# Use environment variables
✅ DB_PASSWORD=${DATABASE_PASSWORD} 1. Code defaults (lowest priority)
2. Config files (per environment)
3. Environment variables
4. Secret manager (highest priority)Expand-Contract Pattern:
Phase 1: Expand (Deploy with old + new schema)
- Add new columns (nullable)
- Deploy code that writes to both
- Backfill data gradually
Phase 2: Migrate (Switch to new schema)
- Update code to read from new
- Verify data consistency
- Monitor for issues
Phase 3: Contract (Clean up old schema)
- Remove old columns
- Clean up code
- Deploy cleanupMigration Checklist:
# Configure automatic rollback when:
rollback_triggers:
error_rate:
threshold: "> 1%"
window: "5m"
latency_p95:
threshold: "> 500ms"
window: "10m"
health_checks:
threshold: "> 3 failures"
window: "2m"
business_metrics:
threshold: "< baseline - 20%"
window: "15m"#!/bin/bash
# Rollback procedure template
# 1. Stop current deployment
kubectl rollout pause deployment/app
# 2. Rollback to previous version
kubectl rollout undo deployment/app
# 3. Monitor rollback
kubectl rollout status deployment/app --timeout=300s
# 4. Verify health
./scripts/smoke-tests.sh
# 5. Notify team
./scripts/notify-rollback.sh
# 6. Document incident
./scripts/create-incident-report.sh# Use feature flags for:
- Gradual rollouts
- A/B testing
- Kill switches
- Environment-specific features
- User segment targeting
# Flag types:
release_flags: # Short-term (days/weeks)
- New feature rollout
- Bug fix validation
experiment_flags: # Medium-term (weeks/months)
- A/B tests
- UI experiments
permission_flags: # Long-term (months/years)
- Beta features
- Enterprise features
ops_flags: # Immediate control
- Kill switches
- Maintenance modeTrack these metrics:
# Critical alerts (page immediately)
critical:
- Deployment failed in production
- Rollback initiated
- Error rate spike (> 5%)
- Service unavailable
# Warning alerts (notify channel)
warning:
- Deployment taking longer than expected
- Health check warnings
- Resource utilization high
- Canary analysis concerns
# Info alerts (log only)
info:
- Deployment started
- Deployment completed
- Environment status changes# Never store in repository:
❌ API keys
❌ Database passwords
❌ SSH private keys
❌ TLS certificates
❌ OAuth credentials
# Use secret managers:
✅ AWS Secrets Manager
✅ HashiCorp Vault
✅ GCP Secret Manager
✅ Azure Key Vault
✅ Doppler# Recommended deployment windows:
optimal:
- Tuesday-Thursday
- 10:00-15:00 (team available)
avoid:
- Monday mornings (catching up)
- Friday afternoons (weekend risk)
- Holidays
- End of month/quarter
# Emergency deployments:
require:
- Engineering manager approval
- Product owner notification
- Extra monitoring
- Rollback ready## Pre-Deployment Checklist
### Code Quality
- [ ] All tests passing
- [ ] Code review approved
- [ ] Linting passes
- [ ] No security vulnerabilities
### Testing
- [ ] Unit tests: ✅
- [ ] Integration tests: ✅
- [ ] E2E tests: ✅
- [ ] Performance tests: ✅
### Security
- [ ] SAST scan: Clean
- [ ] Dependency scan: Clean
- [ ] Secret scan: Clean
- [ ] Container scan: Clean
### Documentation
- [ ] CHANGELOG updated
- [ ] API docs updated
- [ ] Runbook updated
- [ ] Team notified
### Rollback Ready
- [ ] Backup created
- [ ] Rollback script tested
- [ ] Database migration rollback ready
- [ ] Team briefed on rollback
### Monitoring
- [ ] Dashboards updated
- [ ] Alerts configured
- [ ] On-call notified
- [ ] Status page readyRefer to the following resources in this skill for detailed implementations:
CI/CD Platforms:
Deployment:
Monitoring:
Avoid these deployment anti-patterns:
❌ Deploying on Friday (unless emergency) ❌ Manual deployment steps (automate everything) ❌ No rollback plan (always have exit strategy) ❌ Skipping tests (never compromise on testing) ❌ Deploying multiple changes (one change at a time) ❌ No monitoring (blind deployments are dangerous) ❌ Database changes after code (schema first, then code) ❌ Ignoring failed health checks (always investigate) ❌ No post-deployment verification (always run smoke tests) ❌ Secrets in environment variables (use secret managers)
Measure deployment success with:
| Metric | Target | Measurement |
|---|---|---|
| Deployment Frequency | Daily/Weekly | Deployments per time period |
| Lead Time | < 1 day | Commit to production |
| Change Failure Rate | < 5% | Failed deployments / Total |
| MTTR | < 1 hour | Time to recover from failure |
| Rollback Rate | < 10% | Rollbacks / Total deployments |
~30 seconds. Free. No account. Every finding cites a rule and a line of evidence.