@agentlee5/agent-skills 1.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.leeway/config.json +133 -0
- package/LICENSE +21 -0
- package/LeeWay-Standards/LICENSE +21 -0
- package/LeeWay-Standards/README.md +324 -0
- package/LeeWay-Standards/examples/NexusButton.tsx +90 -0
- package/LeeWay-Standards/examples/example-agent.js +89 -0
- package/LeeWay-Standards/package.json +61 -0
- package/LeeWay-Standards/schemas/leeway-config.schema.json +81 -0
- package/LeeWay-Standards/schemas/leeway-header.schema.json +63 -0
- package/LeeWay-Standards/src/agents/discovery/architecture-map-agent.js +134 -0
- package/LeeWay-Standards/src/agents/discovery/docs-agent.js +126 -0
- package/LeeWay-Standards/src/agents/discovery/explain-agent.js +95 -0
- package/LeeWay-Standards/src/agents/discovery/intent-registry-agent.js +119 -0
- package/LeeWay-Standards/src/agents/discovery/schema-agent.js +116 -0
- package/LeeWay-Standards/src/agents/discovery/sitemap-agent.js +88 -0
- package/LeeWay-Standards/src/agents/governance/align-agent.js +155 -0
- package/LeeWay-Standards/src/agents/governance/assess-agent.js +161 -0
- package/LeeWay-Standards/src/agents/governance/audit-agent.js +185 -0
- package/LeeWay-Standards/src/agents/integrity/circular-dependency-agent.js +88 -0
- package/LeeWay-Standards/src/agents/integrity/dependency-graph-agent.js +107 -0
- package/LeeWay-Standards/src/agents/integrity/duplicate-logic-agent.js +108 -0
- package/LeeWay-Standards/src/agents/integrity/import-agent.js +83 -0
- package/LeeWay-Standards/src/agents/integrity/module-policy-agent.js +94 -0
- package/LeeWay-Standards/src/agents/integrity/refactor-scan-agent.js +113 -0
- package/LeeWay-Standards/src/agents/integrity/syntax-agent.js +84 -0
- package/LeeWay-Standards/src/agents/mcp/endpoint-agent.js +106 -0
- package/LeeWay-Standards/src/agents/mcp/env-agent.js +111 -0
- package/LeeWay-Standards/src/agents/mcp/health-agent-lite.js +119 -0
- package/LeeWay-Standards/src/agents/mcp/manifest-agent.js +87 -0
- package/LeeWay-Standards/src/agents/mcp/port-agent.js +125 -0
- package/LeeWay-Standards/src/agents/mcp/process-agent.js +124 -0
- package/LeeWay-Standards/src/agents/mcp/runtime-agent.js +108 -0
- package/LeeWay-Standards/src/agents/mcp/transport-agent.js +78 -0
- package/LeeWay-Standards/src/agents/orchestration/doctor-agent.js +149 -0
- package/LeeWay-Standards/src/agents/orchestration/memory-agent-lite.js +125 -0
- package/LeeWay-Standards/src/agents/orchestration/router-agent.js +110 -0
- package/LeeWay-Standards/src/agents/security/permission-agent.js +98 -0
- package/LeeWay-Standards/src/agents/security/policy-agent.js +100 -0
- package/LeeWay-Standards/src/agents/security/privacy-agent.js +83 -0
- package/LeeWay-Standards/src/agents/security/prompt-security-agent.js +103 -0
- package/LeeWay-Standards/src/agents/security/secret-scan-agent.js +108 -0
- package/LeeWay-Standards/src/agents/security/tool-access-agent.js +105 -0
- package/LeeWay-Standards/src/agents/standards/authority-agent.js +114 -0
- package/LeeWay-Standards/src/agents/standards/discovery-pipeline-agent.js +91 -0
- package/LeeWay-Standards/src/agents/standards/header-agent.js +120 -0
- package/LeeWay-Standards/src/agents/standards/placement-agent.js +96 -0
- package/LeeWay-Standards/src/agents/standards/region-agent.js +99 -0
- package/LeeWay-Standards/src/agents/standards/registry-agent.js +153 -0
- package/LeeWay-Standards/src/agents/standards/tag-agent.js +111 -0
- package/LeeWay-Standards/src/cli/leeway.js +225 -0
- package/LeeWay-Standards/src/core/compliance-scorer.js +168 -0
- package/LeeWay-Standards/src/core/compliance-scorer.test.js +121 -0
- package/LeeWay-Standards/src/core/header-parser.js +207 -0
- package/LeeWay-Standards/src/core/header-parser.test.js +198 -0
- package/LeeWay-Standards/src/core/region-classifier.js +137 -0
- package/LeeWay-Standards/src/core/region-classifier.test.js +100 -0
- package/LeeWay-Standards/src/core/tag-validator.js +139 -0
- package/LeeWay-Standards/src/core/tag-validator.test.js +109 -0
- package/LeeWay-Standards/src/index.js +83 -0
- package/README.md +217 -0
- package/agent-config.yaml +456 -0
- package/agentbage.png.png +0 -0
- package/bin/leeway-skills-badge.js +52 -0
- package/bin/leeway-skills-mcp.js +48 -0
- package/bin/leeway-skills.js +160 -0
- package/bin/leeway-standards.js +49 -0
- package/config/.skillsignore +63 -0
- package/config/skills-config.json +70 -0
- package/documents/AGENT_LEARNING_REFERENCE.md +329 -0
- package/documents/AGENT_LEE_INTEGRATION.md +534 -0
- package/documents/COMPLETE_SYSTEM_OVERVIEW.md +502 -0
- package/documents/COMPREHENSIVE_SKILL_INTEGRATION_PLAN.md +644 -0
- package/documents/DIRECTORY_MAP.md +323 -0
- package/documents/EXTENDING.md +514 -0
- package/documents/FILE_DIRECTORY_GUIDE.md +427 -0
- package/documents/LEEWAY_BADGE_INTEGRATION.md +76 -0
- package/documents/LEEWAY_IMPLEMENTATION_SUMMARY.md +384 -0
- package/documents/LEEWAY_INTEGRATION_GUIDE.md +414 -0
- package/documents/LEEWAY_NPM_SDK.md +66 -0
- package/documents/LEEWAY_QUICK_START.md +288 -0
- package/documents/LEEWAY_SKILLS_BRANDING.md +375 -0
- package/documents/LEEWAY_SKILLS_MCP_SUMMARY.md +593 -0
- package/documents/LEEWAY_STANDARDS_COMPLIANCE.md +361 -0
- package/documents/LEEWAY_UNIFIED_ARCHITECTURE.md +473 -0
- package/documents/LEEWAY_WORKFLOWS_QUICK_REFERENCE.md +307 -0
- package/documents/LEEWAY_WORKFLOWS_STRATEGIC_PLAN.md +515 -0
- package/documents/LIFELONG_LEARNING_LAYER.md +478 -0
- package/documents/MCP_ARCHITECTURE.md +683 -0
- package/documents/QUICK_REFERENCE.md +301 -0
- package/documents/SETUP.md +325 -0
- package/documents/SETUP_SUMMARY.md +413 -0
- package/documents/SKILL_ACQUISITION_EXECUTIVE_SUMMARY.md +373 -0
- package/documents/SKILL_ACQUISITION_IMPLEMENTATION.md +692 -0
- package/documents/SKILL_ACQUISITION_MANIFEST.md +404 -0
- package/documents/SKILL_ACQUISITION_QUICK_REFERENCE.md +349 -0
- package/documents/SKILL_WORKFLOW_COMPOSITION_MATRIX.md +537 -0
- package/documents/STRUCTURE.md +382 -0
- package/documents/SYSTEM_TRANSFORMATION_SUMMARY.md +560 -0
- package/documents/USAGE.md +390 -0
- package/documents/WORKFLOW_ACQUISITION_MANIFEST.md +576 -0
- package/documents/aiskills.txt +460 -0
- package/mcp-server/README.md +697 -0
- package/mcp-server/dist/badge-proof.d.ts +66 -0
- package/mcp-server/dist/badge-proof.d.ts.map +1 -0
- package/mcp-server/dist/badge-proof.js +324 -0
- package/mcp-server/dist/badge-proof.js.map +1 -0
- package/mcp-server/dist/index.d.ts +64 -0
- package/mcp-server/dist/index.d.ts.map +1 -0
- package/mcp-server/dist/index.js +263 -0
- package/mcp-server/dist/index.js.map +1 -0
- package/mcp-server/dist/install-badge-proof.d.ts +3 -0
- package/mcp-server/dist/install-badge-proof.d.ts.map +1 -0
- package/mcp-server/dist/install-badge-proof.js +109 -0
- package/mcp-server/dist/install-badge-proof.js.map +1 -0
- package/mcp-server/package.json +43 -0
- package/mcp-server/src/badge-proof.ts +469 -0
- package/mcp-server/src/index.ts +355 -0
- package/mcp-server/src/install-badge-proof.ts +132 -0
- package/mcp-server/tsconfig.json +22 -0
- package/package.json +84 -0
- package/scripts/init-leeway.js +217 -0
- package/scripts/leeway-agents/compliance-monitor.js +374 -0
- package/scripts/leeway-agents/header-injector.js +321 -0
- package/scripts/skill-integration-toolkit.py +319 -0
- package/scripts/skills-registry.json +1117 -0
- package/scripts/sync-skills.ps1 +275 -0
- package/scripts/verify-leeway-setup.js +249 -0
- package/scripts/workflow-integration-toolkit.py +522 -0
- package/sdk/application-installer.js +92 -0
- package/sdk/index.js +43 -0
- package/sdk/paths.js +167 -0
- package/skills/agent-autonomy/autonomous-conductor/SKILL.md +206 -0
- package/skills/agent-autonomy/full-stack-delivery/SKILL.md +206 -0
- package/skills/agent-orchestration/multi-agent-orchestration/SKILL.md +68 -0
- package/skills/agent-patterns/agent-design-patterns/SKILL.md +70 -0
- package/skills/ai-ml/llm-prompting/SKILL.md +71 -0
- package/skills/ai-ml/ml-model-development/SKILL.md +67 -0
- package/skills/ai-ml/multimodal-systems/SKILL.md +71 -0
- package/skills/ai-ml/retrieval-generation-fine-tuning/SKILL.md +71 -0
- package/skills/architecture/system-design/SKILL.md +67 -0
- package/skills/code-analysis/refactoring/SKILL.md +64 -0
- package/skills/code-analysis/security-vulnerability-scanning/SKILL.md +71 -0
- package/skills/code-analysis/static-analysis/SKILL.md +64 -0
- package/skills/code-generation/full-stack-application/SKILL.md +70 -0
- package/skills/code-generation/microservices-architecture/SKILL.md +71 -0
- package/skills/code-generation/python-codegen/SKILL.md +64 -0
- package/skills/code-generation/typescript-codegen/SKILL.md +64 -0
- package/skills/data-analysis/advanced-analytics/SKILL.md +71 -0
- package/skills/data-analysis/pandas-analysis/SKILL.md +66 -0
- package/skills/database-design/database-design-optimization/SKILL.md +70 -0
- package/skills/debugging/javascript-debugging/SKILL.md +67 -0
- package/skills/debugging/python-debugging/SKILL.md +67 -0
- package/skills/devops/dockerfile-creation/SKILL.md +64 -0
- package/skills/devops/kubernetes-deployment/SKILL.md +65 -0
- package/skills/documentation/api-documentation/SKILL.md +67 -0
- package/skills/error-handling/resilience-patterns/SKILL.md +70 -0
- package/skills/git-workflow/git-collaboration/SKILL.md +67 -0
- package/skills/infrastructure/cicd-pipelines/SKILL.md +70 -0
- package/skills/infrastructure/infrastructure-as-code/SKILL.md +70 -0
- package/skills/observability/monitoring-and-observability/SKILL.md +70 -0
- package/skills/performance-optimization/performance-engineering/SKILL.md +70 -0
- package/skills/prompt-optimization/prompt-engineering-advanced/SKILL.md +70 -0
- package/skills/quality-assurance/deployment-validator/SKILL.md +382 -0
- package/skills/quality-assurance/web-security-sweep/SKILL.md +320 -0
- package/skills/rag-knowledge/rag-systems/SKILL.md +70 -0
- package/skills/research/knowledge-synthesis/SKILL.md +71 -0
- package/skills/security/authentication-authorization/SKILL.md +71 -0
- package/skills/security/code-security/SKILL.md +66 -0
- package/skills/security/secure-architecture/SKILL.md +71 -0
- package/skills/self-optimization/dev-loop-optimizer/SKILL.md +344 -0
- package/skills/self-optimization/memory-learning/SKILL.md +335 -0
- package/skills/self-optimization/runtime-self-profiling/SKILL.md +250 -0
- package/skills/testing/advanced-testing-strategies/SKILL.md +71 -0
- package/skills/testing/integration-testing/SKILL.md +66 -0
- package/skills/testing/load-testing-capacity/SKILL.md +71 -0
- package/skills/testing/unit-testing/SKILL.md +66 -0
- package/skills/tool-integration/custom-tool-creation/SKILL.md +70 -0
- package/skills/web-development/advanced-frontend-patterns/SKILL.md +71 -0
- package/skills/web-development/api-design/SKILL.md +71 -0
- package/skills/web-development/css-styling/SKILL.md +67 -0
- package/skills/web-development/react-development/SKILL.md +79 -0
- package/skills/workflow-composition/workflow-orchestration/SKILL.md +70 -0
|
@@ -0,0 +1,382 @@
|
|
|
1
|
+
/*
|
|
2
|
+
LEEWAY HEADER — DO NOT REMOVE
|
|
3
|
+
|
|
4
|
+
REGION: AI.QA
|
|
5
|
+
TAG: AI.QA.DEPLOYMENT_VALIDATOR
|
|
6
|
+
|
|
7
|
+
COLOR_ONION_HEX:
|
|
8
|
+
NEON=#32CD32
|
|
9
|
+
FLUO=#00FF00
|
|
10
|
+
PASTEL=#E8F5E9
|
|
11
|
+
|
|
12
|
+
ICON_ASCII:
|
|
13
|
+
family=lucide
|
|
14
|
+
glyph=zap
|
|
15
|
+
|
|
16
|
+
5WH:
|
|
17
|
+
WHAT = deployment validator skill for Leeway-compliant AI systems
|
|
18
|
+
WHY = Provides capabilities for quality-assurance within the AIskills ecosystem
|
|
19
|
+
WHO = Leeway Industries (By Leonard Jerome Lee)
|
|
20
|
+
WHERE = skills/quality-assurance/deployment-validator/SKILL.md
|
|
21
|
+
WHEN = 2026
|
|
22
|
+
HOW = Leeway-governed skill.md definition with structured capabilities and tags
|
|
23
|
+
|
|
24
|
+
AGENTS:
|
|
25
|
+
ASSESS
|
|
26
|
+
AUDIT
|
|
27
|
+
|
|
28
|
+
LICENSE:
|
|
29
|
+
MIT
|
|
30
|
+
*/
|
|
31
|
+
|
|
32
|
+
# Deployment Validator
|
|
33
|
+
|
|
34
|
+
**Expert in**: Validating that applications are deployment-ready, that configurations match infrastructure, and that build/deploy pipelines work end-to-end. Tests dry-runs and baselines performance before production handoff.
|
|
35
|
+
|
|
36
|
+
**Role**: Release Engineer / QA Validator
|
|
37
|
+
|
|
38
|
+
## Mission
|
|
39
|
+
|
|
40
|
+
You verify that an application is truly ready for deployment by checking build scripts, configuration alignment, infrastructure requirements, secrets management, and running a complete deployment simulation. You catch configuration mismatches and missing dependencies before users see errors.
|
|
41
|
+
|
|
42
|
+
## Operating Principles
|
|
43
|
+
|
|
44
|
+
1. **Trust but verify**: don't assume configs are correct; test them against live infrastructure.
|
|
45
|
+
2. **Dry-run before commit**: run the full deploy process in a staging environment first.
|
|
46
|
+
3. **Check all layers**: build, configuration, secrets, database, external services, monitoring.
|
|
47
|
+
4. **Baseline performance**: measure key metrics (response time, throughput, resource usage) before launch.
|
|
48
|
+
5. **Document failure modes**: what breaks and how to fix it, for operations to have a runbook.
|
|
49
|
+
|
|
50
|
+
## Pre-Deployment Checklist
|
|
51
|
+
|
|
52
|
+
### Build & Dependencies
|
|
53
|
+
|
|
54
|
+
- [ ] Project builds without errors: `npm run build` / `cargo build` / `dotnet build`
|
|
55
|
+
- [ ] No console errors or warnings (or warnings are acknowledged and acceptable)
|
|
56
|
+
- [ ] Dependencies are pinned (not floating versions like `^1.0.0` for production)
|
|
57
|
+
- [ ] Dependencies are scanned for known vulnerabilities
|
|
58
|
+
- [ ] Build output is reproducible (same commit → same hash)
|
|
59
|
+
- [ ] Build size is acceptable (frontend bundles < 500KB gzipped?)
|
|
60
|
+
- [ ] Type checks pass (TypeScript, mypy, etc.)
|
|
61
|
+
|
|
62
|
+
### Configuration & Secrets
|
|
63
|
+
|
|
64
|
+
- [ ] All environment variables are documented in a `.env.example` or config schema
|
|
65
|
+
- [ ] No secrets are hardcoded in code or build artifacts
|
|
66
|
+
- [ ] Configuration for dev, staging, and production are distinct
|
|
67
|
+
- [ ] Secrets are stored securely (AWS Secrets Manager, HashiCorp Vault, not `.env` in repo)
|
|
68
|
+
- [ ] Database connection strings are environment-specific
|
|
69
|
+
- [ ] External API endpoints and keys are environment-specific (not localhost in prod)
|
|
70
|
+
- [ ] Logging level is appropriate (not DEBUG in production)
|
|
71
|
+
|
|
72
|
+
### Database
|
|
73
|
+
|
|
74
|
+
- [ ] Database schema matches application code (migrations run successfully)
|
|
75
|
+
- [ ] Migrations are reversible (rollback tested)
|
|
76
|
+
- [ ] Database backup/restore process is documented and tested
|
|
77
|
+
- [ ] Indexes exist for frequently queried columns
|
|
78
|
+
- [ ] Database user has minimal required permissions (not root/admin)
|
|
79
|
+
|
|
80
|
+
### Infrastructure & Networking
|
|
81
|
+
|
|
82
|
+
- [ ] Deployment target (cloud provider, container registry, VPS) is accessible
|
|
83
|
+
- [ ] Network configuration allows app ↔ database ↔ external services
|
|
84
|
+
- [ ] Firewall rules are as restrictive as possible (no overly open ports)
|
|
85
|
+
- [ ] SSL/TLS certificates are valid and not self-signed (unless internal)
|
|
86
|
+
- [ ] DNS records are configured and pointing to the right IP
|
|
87
|
+
- [ ] Load balancer (if applicable) is configured and health checks pass
|
|
88
|
+
|
|
89
|
+
### Monitoring & Logging
|
|
90
|
+
|
|
91
|
+
- [ ] Logging is configured (not silently swallowing errors)
|
|
92
|
+
- [ ] Logs are shipped to a centralized location (not just stdout)
|
|
93
|
+
- [ ] Essential metrics are instrumented (response time, errors, database latency)
|
|
94
|
+
- [ ] Alerting is configured for critical errors or anomalies
|
|
95
|
+
- [ ] Runbook exists for common failures (database down, API timeout, etc.)
|
|
96
|
+
|
|
97
|
+
### Testing & Validation
|
|
98
|
+
|
|
99
|
+
- [ ] Core user flows work end-to-end (not just unit tests)
|
|
100
|
+
- [ ] Integration tests pass (API ↔ database, external services)
|
|
101
|
+
- [ ] Performance baseline is documented (P50, P95, P99 latency; throughput)
|
|
102
|
+
- [ ] Load test is conducted (system behaves under expected peak load)
|
|
103
|
+
- [ ] Smoke test succeeds (app starts, health check passes, can serve requests)
|
|
104
|
+
|
|
105
|
+
## Workflow
|
|
106
|
+
|
|
107
|
+
### Phase 1 – Configuration Audit
|
|
108
|
+
|
|
109
|
+
Create `deployment_config_audit.md`:
|
|
110
|
+
|
|
111
|
+
```markdown
|
|
112
|
+
# Deployment Configuration Audit – [App Name]
|
|
113
|
+
|
|
114
|
+
## Environment Variables
|
|
115
|
+
|
|
116
|
+
| Variable | Dev Value | Staging Value | Prod Value | Status |
|
|
117
|
+
| ------------ | -------------- | ------------------- | ---------------------- | --------------------- |
|
|
118
|
+
| NODE_ENV | development | staging | production | ✅ Correct |
|
|
119
|
+
| DATABASE_URL | localhost:5432 | rds-staging.aws.com | rds-prod.aws.com | ✅ Correct |
|
|
120
|
+
| API_KEY | (test key) | (staging key) | (prod key, from vault) | ✅ In Secrets Manager |
|
|
121
|
+
| LOG_LEVEL | debug | info | warn | ✅ Correct |
|
|
122
|
+
|
|
123
|
+
## Database
|
|
124
|
+
|
|
125
|
+
- [ ] Schema versions match (dev @ v12, staging @ v12, prod @ v12)
|
|
126
|
+
- [ ] Migrations can be applied forward and reversed
|
|
127
|
+
- [ ] Test: Run migrations in staging; verify no errors
|
|
128
|
+
|
|
129
|
+
## Secrets Management
|
|
130
|
+
|
|
131
|
+
- [ ] All secrets are in AWS Secrets Manager / Vault
|
|
132
|
+
- [ ] Local `.env` file is in `.gitignore`
|
|
133
|
+
- [ ] Deployment script retrieves secrets from vault (not from repo)
|
|
134
|
+
- [ ] Rotation policy is in place (keys rotated every 90 days)
|
|
135
|
+
|
|
136
|
+
## External Services
|
|
137
|
+
|
|
138
|
+
| Service | Endpoint | Status | Notes |
|
|
139
|
+
| ------- | ---------------- | ------------- | ------------------------------------ |
|
|
140
|
+
| Auth | auth0.com (prod) | ✅ Configured | OAuth2 client ID from vault |
|
|
141
|
+
| Email | sendgrid.com | ✅ Configured | API key rotated; cost is ~$200/month |
|
|
142
|
+
| Payment | stripe.com | ✅ Configured | Webhook signing secret verified |
|
|
143
|
+
```
|
|
144
|
+
|
|
145
|
+
### Phase 2 – Build & Artifact Validation
|
|
146
|
+
|
|
147
|
+
```bash
|
|
148
|
+
# 1. Clean build
|
|
149
|
+
npm run clean
|
|
150
|
+
npm run build
|
|
151
|
+
|
|
152
|
+
# Expected: successful build, no errors, output in dist/
|
|
153
|
+
|
|
154
|
+
# 2. Check artifact size
|
|
155
|
+
du -sh dist/
|
|
156
|
+
# Expected: < 500MB (for most apps)
|
|
157
|
+
|
|
158
|
+
# 3. Check for secrets in artifact
|
|
159
|
+
grep -r "API_KEY\|SECRET\|password" dist/
|
|
160
|
+
# Expected: no output (no hardcoded secrets)
|
|
161
|
+
|
|
162
|
+
# 4. Build reproducibility
|
|
163
|
+
git log -1 --format="%H" # e.g., abc123def456
|
|
164
|
+
npm run build
|
|
165
|
+
md5sum dist/* > build1.hash
|
|
166
|
+
|
|
167
|
+
git checkout abc123def456
|
|
168
|
+
npm run build
|
|
169
|
+
md5sum dist/* > build2.hash
|
|
170
|
+
diff build1.hash build2.hash
|
|
171
|
+
# Expected: hashes match (reproducible builds)
|
|
172
|
+
```
|
|
173
|
+
|
|
174
|
+
Document in `build_validation.md`:
|
|
175
|
+
|
|
176
|
+
```markdown
|
|
177
|
+
# Build Validation Report
|
|
178
|
+
|
|
179
|
+
**Commit**: abc123def456
|
|
180
|
+
**Build Date**: 2026-03-15 14:30
|
|
181
|
+
**Builder**: CD/CI (GitHub Actions)
|
|
182
|
+
|
|
183
|
+
## Build Artifact
|
|
184
|
+
|
|
185
|
+
- Size: 412MB (✅ under 500MB limit)
|
|
186
|
+
- Files: 1,245 files
|
|
187
|
+
- Secrets found: 0 (✅ clean)
|
|
188
|
+
- Type check: ✅ TypeScript passes
|
|
189
|
+
- Linting: ✅ ESLint passes (0 errors, 2 warnings acknowledged)
|
|
190
|
+
|
|
191
|
+
## Dependencies
|
|
192
|
+
|
|
193
|
+
- Total: 1,203 transitive dependencies
|
|
194
|
+
- Known vulnerabilities: 0 (✅ npm audit clean)
|
|
195
|
+
- Pinned versions: ✅ all exact (no ^ or ~)
|
|
196
|
+
|
|
197
|
+
## Reproducibility
|
|
198
|
+
|
|
199
|
+
- Build hash (attempt 1): abc123def456abc123def456
|
|
200
|
+
- Build hash (attempt 2): abc123def456abc123def456
|
|
201
|
+
- Status: ✅ reproducible
|
|
202
|
+
```
|
|
203
|
+
|
|
204
|
+
### Phase 3 – Dry-Run Deployment
|
|
205
|
+
|
|
206
|
+
1. **Deploy to staging** (not production first):
|
|
207
|
+
|
|
208
|
+
```bash
|
|
209
|
+
# Example: deploy to AWS ECS staging
|
|
210
|
+
aws ecs update-service \
|
|
211
|
+
--cluster staging \
|
|
212
|
+
--service my-app \
|
|
213
|
+
--force-new-deployment
|
|
214
|
+
|
|
215
|
+
# Wait for deployment
|
|
216
|
+
aws ecs describe-services \
|
|
217
|
+
--cluster staging \
|
|
218
|
+
--services my-app \
|
|
219
|
+
--query 'services[0].deployments'
|
|
220
|
+
```
|
|
221
|
+
|
|
222
|
+
2. **Run smoke tests**:
|
|
223
|
+
|
|
224
|
+
```bash
|
|
225
|
+
# Health check
|
|
226
|
+
curl https://staging.my-app.com/health
|
|
227
|
+
# Expected: { "status": "ok" }
|
|
228
|
+
|
|
229
|
+
# Core flow
|
|
230
|
+
POST /api/users/register { email, password }
|
|
231
|
+
# Expected: 201, { userId, token }
|
|
232
|
+
|
|
233
|
+
GET /api/users/me
|
|
234
|
+
# Expected: 200, { email, ... }
|
|
235
|
+
```
|
|
236
|
+
|
|
237
|
+
3. **Document in `dry_run_report.md`**:
|
|
238
|
+
|
|
239
|
+
```markdown
|
|
240
|
+
# Dry-Run Deployment Report
|
|
241
|
+
|
|
242
|
+
**Target**: Staging environment
|
|
243
|
+
**Date**: 2026-03-15
|
|
244
|
+
**Duration**: 8 minutes
|
|
245
|
+
|
|
246
|
+
## Deployment Steps
|
|
247
|
+
|
|
248
|
+
- [x] Pull artifacts from CI/CD
|
|
249
|
+
- [x] Update database (migrations applied)
|
|
250
|
+
- [x] Deploy containers (5 running)
|
|
251
|
+
- [x] Health checks pass (load balancer sees healthy targets)
|
|
252
|
+
- [x] Smoke tests pass (core flows work)
|
|
253
|
+
|
|
254
|
+
## Configuration Validation
|
|
255
|
+
|
|
256
|
+
| Item | Expected | Actual | Status |
|
|
257
|
+
| ------------- | ------------------- | ------------------- | ------ |
|
|
258
|
+
| Database | rds-staging.aws.com | rds-staging.aws.com | ✅ |
|
|
259
|
+
| Auth endpoint | auth0.com | auth0.com | ✅ |
|
|
260
|
+
| LOG_LEVEL | info | info | ✅ |
|
|
261
|
+
| TLS version | TLSv1.3 | TLSv1.3 | ✅ |
|
|
262
|
+
|
|
263
|
+
## Issues Found
|
|
264
|
+
|
|
265
|
+
- ⚠️ Startup time: 42 seconds (acceptable, but slow; note for ops)
|
|
266
|
+
- ⚠️ Database migration took 3 minutes for users table (schema is large)
|
|
267
|
+
|
|
268
|
+
## Resolutions
|
|
269
|
+
|
|
270
|
+
- Added database migration index to reduce future downtime
|
|
271
|
+
```
|
|
272
|
+
|
|
273
|
+
### Phase 4 – Performance Baseline
|
|
274
|
+
|
|
275
|
+
Run load tests and baseline:
|
|
276
|
+
|
|
277
|
+
```bash
|
|
278
|
+
# Example: k6 load test
|
|
279
|
+
k6 run loadtest.js
|
|
280
|
+
|
|
281
|
+
# Output:
|
|
282
|
+
http_req_duration..............: avg=145ms, p(95)=340ms, p(99)=890ms
|
|
283
|
+
http_reqs.......................: 10000 in 1m 22s
|
|
284
|
+
http_errors......................: 0
|
|
285
|
+
vus.............................: 50 (concurrent users)
|
|
286
|
+
```
|
|
287
|
+
|
|
288
|
+
Document in `performance_baseline.md`:
|
|
289
|
+
|
|
290
|
+
```markdown
|
|
291
|
+
# Performance Baseline – Production Configuration
|
|
292
|
+
|
|
293
|
+
**Timestamp**: 2026-03-15 15:00
|
|
294
|
+
**Test Scenario**: Simulated 50 concurrent users for 5 minutes
|
|
295
|
+
|
|
296
|
+
## Results
|
|
297
|
+
|
|
298
|
+
| Metric | P50 | P95 | P99 | Max |
|
|
299
|
+
| ------------- | -------------- | ----- | ----- | ------ |
|
|
300
|
+
| Response Time | 120ms | 340ms | 890ms | 2100ms |
|
|
301
|
+
| Error Rate | 0% | 0% | 0% | 0% |
|
|
302
|
+
| Throughput | 10,000 req/min | | | |
|
|
303
|
+
|
|
304
|
+
## Database Metrics
|
|
305
|
+
|
|
306
|
+
| Metric | Value | Status |
|
|
307
|
+
| --------------------------- | ----- | ------------- |
|
|
308
|
+
| Query time (P99) | 25ms | ✅ Acceptable |
|
|
309
|
+
| Connection pool utilization | 40/50 | ✅ Healthy |
|
|
310
|
+
| Slow queries (> 100ms) | 2 | ⚠️ Minor |
|
|
311
|
+
|
|
312
|
+
## System Metrics
|
|
313
|
+
|
|
314
|
+
| Metric | Value | Status |
|
|
315
|
+
| ------- | ----------------- | ----------- |
|
|
316
|
+
| CPU | 45% | ✅ Headroom |
|
|
317
|
+
| Memory | 3.2 GB / 8 GB | ✅ Headroom |
|
|
318
|
+
| Network | 850 Mbps / 1 Gbps | ✅ Headroom |
|
|
319
|
+
|
|
320
|
+
## Conclusions
|
|
321
|
+
|
|
322
|
+
- Application is ready for production deployment
|
|
323
|
+
- Can handle 2x current load with current infrastructure
|
|
324
|
+
- Monitor slow queries; add indexes if they grow
|
|
325
|
+
```
|
|
326
|
+
|
|
327
|
+
### Phase 5 – Go/No-Go Decision
|
|
328
|
+
|
|
329
|
+
Create `deployment_checklist_final.md`:
|
|
330
|
+
|
|
331
|
+
```markdown
|
|
332
|
+
# Deployment Go/No-Go Checklist
|
|
333
|
+
|
|
334
|
+
## Pre-Deployment (All Checks)
|
|
335
|
+
|
|
336
|
+
- [x] Build successful, artifacts clean
|
|
337
|
+
- [x] Configuration audit passed
|
|
338
|
+
- [x] Secrets properly secured
|
|
339
|
+
- [x] Database schema and migrations verified
|
|
340
|
+
- [x] Dry-run deployment successful
|
|
341
|
+
- [x] Smoke tests pass
|
|
342
|
+
- [x] Performance baseline acceptable
|
|
343
|
+
|
|
344
|
+
## Risk Assessment
|
|
345
|
+
|
|
346
|
+
| Risk | Probability | Impact | Mitigation |
|
|
347
|
+
| ------------------------ | ----------- | ------ | ---------------------------------- |
|
|
348
|
+
| Database migration fails | 1% | HIGH | Rollback plan tested |
|
|
349
|
+
| API key invalid in prod | 5% | MEDIUM | Service health check monitors this |
|
|
350
|
+
| Performance degradation | 2% | MEDIUM | 2x headroom; monitoring alerts |
|
|
351
|
+
|
|
352
|
+
## Rollback Plan
|
|
353
|
+
|
|
354
|
+
- If deployment is broken: revert previous container image (1 min)
|
|
355
|
+
- If database migration fails: run rollback migration (3 min)
|
|
356
|
+
- If performance degrades: scale up (add 5 more containers, 5 min)
|
|
357
|
+
|
|
358
|
+
## Go/No-Go Decision
|
|
359
|
+
|
|
360
|
+
**DECISION: ✅ GO for production deployment**
|
|
361
|
+
|
|
362
|
+
**Approved by**: [Your signature]
|
|
363
|
+
**Date**: 2026-03-15
|
|
364
|
+
**Next steps**: Deploy to production; monitor for 24 hours
|
|
365
|
+
```
|
|
366
|
+
|
|
367
|
+
## Tags
|
|
368
|
+
|
|
369
|
+
deployment, validation, release-engineering, configuration-management, quality-assurance, testing, performance-baseline, go-no-go
|
|
370
|
+
|
|
371
|
+
## Capabilities
|
|
372
|
+
|
|
373
|
+
- Auditing deployment configurations and environment variables
|
|
374
|
+
- Validating build artifacts for size, reproducibility, and security
|
|
375
|
+
- Checking database schema and migration readiness
|
|
376
|
+
- Running dry-run deployments to staging
|
|
377
|
+
- Executing smoke tests and integration tests
|
|
378
|
+
- Performing load tests and capturing performance baselines
|
|
379
|
+
- Identifying configuration mismatches and infrastructure issues
|
|
380
|
+
- Creating comprehensive deployment validation reports
|
|
381
|
+
- Making data-driven go/no-go decisions for production deployment
|
|
382
|
+
- Documenting rollback procedures and failure modes
|
|
@@ -0,0 +1,320 @@
|
|
|
1
|
+
/*
|
|
2
|
+
LEEWAY HEADER — DO NOT REMOVE
|
|
3
|
+
|
|
4
|
+
REGION: AI.QA
|
|
5
|
+
TAG: AI.QA.WEB_SECURITY_SWEEP
|
|
6
|
+
|
|
7
|
+
COLOR_ONION_HEX:
|
|
8
|
+
NEON=#32CD32
|
|
9
|
+
FLUO=#00FF00
|
|
10
|
+
PASTEL=#E8F5E9
|
|
11
|
+
|
|
12
|
+
ICON_ASCII:
|
|
13
|
+
family=lucide
|
|
14
|
+
glyph=zap
|
|
15
|
+
|
|
16
|
+
5WH:
|
|
17
|
+
WHAT = web security sweep skill for Leeway-compliant AI systems
|
|
18
|
+
WHY = Provides capabilities for quality-assurance within the AIskills ecosystem
|
|
19
|
+
WHO = Leeway Industries (By Leonard Jerome Lee)
|
|
20
|
+
WHERE = skills/quality-assurance/web-security-sweep/SKILL.md
|
|
21
|
+
WHEN = 2026
|
|
22
|
+
HOW = Leeway-governed skill.md definition with structured capabilities and tags
|
|
23
|
+
|
|
24
|
+
AGENTS:
|
|
25
|
+
ASSESS
|
|
26
|
+
AUDIT
|
|
27
|
+
|
|
28
|
+
LICENSE:
|
|
29
|
+
MIT
|
|
30
|
+
*/
|
|
31
|
+
|
|
32
|
+
# Web Security Sweep
|
|
33
|
+
|
|
34
|
+
**Expert in**: Identifying security vulnerabilities in web applications through automated scans, code review, and threat modeling. Provides actionable findings with prioritized remediation steps.
|
|
35
|
+
|
|
36
|
+
**Role**: Security Specialist / Vulnerability Assessor
|
|
37
|
+
|
|
38
|
+
## Mission
|
|
39
|
+
|
|
40
|
+
You perform comprehensive security assessments on web applications, identifying vulnerabilities in authentication, data handling, API design, frontend/backend communication, and infrastructure. You provide clear, prioritized recommendations and estimated remediation effort.
|
|
41
|
+
|
|
42
|
+
## Operating Principles
|
|
43
|
+
|
|
44
|
+
1. **Assume the app is live**: treat security findings with urgency proportional to impact and exploitability.
|
|
45
|
+
2. **Cover the full stack**: frontend, backend API, database, secrets, deployment infrastructure, third-party integrations.
|
|
46
|
+
3. **Prioritize by impact**: critical vulnerabilities that leak data or allow takeover first; low-impact findings last.
|
|
47
|
+
4. **Provide actionable remediation**: not just "use HTTPS", but "enable TLS 1.3 with HSTS header, and rotate certs every 90 days".
|
|
48
|
+
5. **Document findings for developers**: make it easy for engineers to understand the issue and fix it.
|
|
49
|
+
|
|
50
|
+
## Scope: Key Areas to Audit
|
|
51
|
+
|
|
52
|
+
### 1. Authentication & Authorization
|
|
53
|
+
|
|
54
|
+
- [ ] Are passwords hashed securely (bcrypt, Argon2, NOT MD5)?
|
|
55
|
+
- [ ] Is MFA implemented for sensitive operations?
|
|
56
|
+
- [ ] Are session tokens (JWT, cookies) short-lived and rotated?
|
|
57
|
+
- [ ] Is there CSRF protection on state-changing endpoints?
|
|
58
|
+
- [ ] Are OAuth2/OpenID scopes minimal and verified?
|
|
59
|
+
- [ ] Can users force privilege escalation (access other users' data)?
|
|
60
|
+
- [ ] Is rate limiting applied to login/signup endpoints?
|
|
61
|
+
|
|
62
|
+
**Checklist Template**:
|
|
63
|
+
|
|
64
|
+
```markdown
|
|
65
|
+
## Authentication & Authorization
|
|
66
|
+
|
|
67
|
+
### Findings
|
|
68
|
+
|
|
69
|
+
- ❌ **CRITICAL**: No password hashing; storing plaintext (app stores SHA1)
|
|
70
|
+
- **Risk**: Database breach exposes all user passwords
|
|
71
|
+
- **Remediation**: Implement bcrypt hashing immediately
|
|
72
|
+
- **Effort**: 4–6 hours (hash existing passwords, update signup/login)
|
|
73
|
+
- ✅ **OK**: OAuth2 scopes are minimal (email, profile)
|
|
74
|
+
- ⚠️ **MEDIUM**: Session tokens live for 30 days; reduce to 1 hour + refresh tokens
|
|
75
|
+
```
|
|
76
|
+
|
|
77
|
+
### 2. Input Validation & Output Encoding
|
|
78
|
+
|
|
79
|
+
- [ ] Are all inputs validated server-side (not just client)?
|
|
80
|
+
- [ ] Are outputs HTML-encoded to prevent XSS?
|
|
81
|
+
- [ ] Is SQL parameterized or using an ORM (not string concatenation)?
|
|
82
|
+
- [ ] Are file uploads validated (size, type, scanned for malware)?
|
|
83
|
+
- [ ] Are error messages generic (not exposing stack traces or schema)?
|
|
84
|
+
- [ ] Is CORS configured restrictively (not `*`)?
|
|
85
|
+
|
|
86
|
+
**Vulnerability Scan**:
|
|
87
|
+
|
|
88
|
+
```markdown
|
|
89
|
+
## Input Validation & XSS
|
|
90
|
+
|
|
91
|
+
### Findings
|
|
92
|
+
|
|
93
|
+
- ❌ **HIGH**: User bio field reflected in HTML without encoding
|
|
94
|
+
- **Risk**: Stored XSS; attacker injects `<script>` and steals cookies
|
|
95
|
+
- **Test**: Visit attacker's profile; JavaScript executes
|
|
96
|
+
- **Remediation**: HTML-encode all user-generated content
|
|
97
|
+
- **Effort**: 2–3 hours (update rendering, add CSP header)
|
|
98
|
+
|
|
99
|
+
- ✅ **OK**: SQL queries use parameterized statements (Knex, Prisma)
|
|
100
|
+
```
|
|
101
|
+
|
|
102
|
+
### 3. Secrets & Sensitive Data
|
|
103
|
+
|
|
104
|
+
- [ ] Are API keys, DB passwords, and secrets NOT in code/repo?
|
|
105
|
+
- [ ] Are secrets stored in environment variables or secure vault?
|
|
106
|
+
- [ ] Are PII and sensitive data encrypted at rest?
|
|
107
|
+
- [ ] Are passwords transmitted only over HTTPS?
|
|
108
|
+
- [ ] Is sensitive data logged (passwords, tokens, PII)?
|
|
109
|
+
- [ ] Are backups encrypted?
|
|
110
|
+
|
|
111
|
+
**Checklist**:
|
|
112
|
+
|
|
113
|
+
```markdown
|
|
114
|
+
## Secrets & Data Protection
|
|
115
|
+
|
|
116
|
+
### Findings
|
|
117
|
+
|
|
118
|
+
- ❌ **CRITICAL**: GitHub repo contains AWS keys in .env.example
|
|
119
|
+
- **Risk**: Anyone with repo access can provision resources
|
|
120
|
+
- **Remediation**: Rotate keys immediately; use AWS Secrets Manager or HashiCorp Vault
|
|
121
|
+
- **Effort**: 1 hour (rotate keys, update deployment)
|
|
122
|
+
|
|
123
|
+
- ⚠️ **MEDIUM**: Passwords are logged during debugging
|
|
124
|
+
- **Risk**: Logs could be exposed; passwords visible to ops
|
|
125
|
+
- **Remediation**: Add redaction filter to logger; never log sensitive values
|
|
126
|
+
- **Effort**: 1–2 hours (update logging, tests)
|
|
127
|
+
```
|
|
128
|
+
|
|
129
|
+
### 4. API Security
|
|
130
|
+
|
|
131
|
+
- [ ] Are endpoints protected by authentication (not public by default)?
|
|
132
|
+
- [ ] Is authorization checked server-side (not trusting client claims)?
|
|
133
|
+
- [ ] Do API responses avoid exposing unnecessary data?
|
|
134
|
+
- [ ] Are paginated endpoints limited (prevent scraping)?
|
|
135
|
+
- [ ] Is rate limiting enforced per user and globally?
|
|
136
|
+
- [ ] Are HTTP methods restricted (e.g., no DELETE on public endpoints)?
|
|
137
|
+
|
|
138
|
+
**Findings Template**:
|
|
139
|
+
|
|
140
|
+
```markdown
|
|
141
|
+
## API Security
|
|
142
|
+
|
|
143
|
+
### Authentication & Authorization
|
|
144
|
+
|
|
145
|
+
- ✅ **OK**: All endpoints require JWT token
|
|
146
|
+
- ⚠️ **MEDIUM**: /api/users endpoint returns all users to any authenticated user
|
|
147
|
+
- **Risk**: Enumeration attack; can discover user base and emails
|
|
148
|
+
- **Remediation**: Restrict to admins or not expose at all
|
|
149
|
+
- **Effort**: 2 hours (add role check, write tests)
|
|
150
|
+
|
|
151
|
+
### Rate Limiting
|
|
152
|
+
|
|
153
|
+
- ❌ **HIGH**: No rate limiting on /api/auth/login
|
|
154
|
+
- **Risk**: Brute force attack; attacker can guess passwords
|
|
155
|
+
- **Remediation**: Implement rate limiting (e.g., 5 attempts per IP per minute)
|
|
156
|
+
- **Effort**: 1 hour (Redis + middleware)
|
|
157
|
+
```
|
|
158
|
+
|
|
159
|
+
### 5. Frontend Security
|
|
160
|
+
|
|
161
|
+
- [ ] Is Content Security Policy (CSP) header configured?
|
|
162
|
+
- [ ] Are dependencies scanned for known vulnerabilities?
|
|
163
|
+
- [ ] Are third-party scripts (analytics, ads) loaded from trusted CDNs?
|
|
164
|
+
- [ ] Is Subresource Integrity (SRI) used for external resources?
|
|
165
|
+
- [ ] Is sensitive data stored securely (localStorage vs. memory)?
|
|
166
|
+
- [ ] Are cookies marked HttpOnly and Secure?
|
|
167
|
+
|
|
168
|
+
### 6. Infrastructure & Deployment
|
|
169
|
+
|
|
170
|
+
- [ ] Is HTTPS enabled (TLS 1.2+ with strong ciphers)?
|
|
171
|
+
- [ ] Are security headers present (HSTS, X-Content-Type-Options, X-Frame-Options)?
|
|
172
|
+
- [ ] Is the database not exposed to the internet?
|
|
173
|
+
- [ ] Are database backups encrypted and tested for restoration?
|
|
174
|
+
- [ ] Is WAF or DDoS protection in place?
|
|
175
|
+
- [ ] Are server logs centralized and secured?
|
|
176
|
+
- [ ] Are non-production environments isolated from production?
|
|
177
|
+
|
|
178
|
+
## Workflow
|
|
179
|
+
|
|
180
|
+
### Phase 1 – Preparation
|
|
181
|
+
|
|
182
|
+
1. **Get scope**: what are the app's functions (auth, payments, user data)?
|
|
183
|
+
2. **Get deployment info**: where does it run (AWS, Heroku, self-hosted)?
|
|
184
|
+
3. **Get constraints**: compliance requirements (HIPAA, GDPR, PCI-DSS)?
|
|
185
|
+
4. **Review existing security docs**: any known issues, prior audits?
|
|
186
|
+
|
|
187
|
+
### Phase 2 – Automated Scanning
|
|
188
|
+
|
|
189
|
+
1. **Dependency scan**: `npm audit`, `Snyk`, or `OWASP Dependency-Check` for known vulnerabilities.
|
|
190
|
+
2. **SAST scan**: `ESLint` with security plugins, `Bandit` (Python), `SonarQube`.
|
|
191
|
+
3. **DAST scan**: run OWASP ZAP or Burp Suite in headless mode against staging.
|
|
192
|
+
4. **Secret scan**: `git-secrets`, `TruffleHog` to detect leaked API keys.
|
|
193
|
+
5. **Container scan**: if using Docker, scan images with `Trivy` or `Clair`.
|
|
194
|
+
|
|
195
|
+
### Phase 3 – Manual Code Review
|
|
196
|
+
|
|
197
|
+
1. **Authentication & Authorization**: walk through signup, login, privilege checks.
|
|
198
|
+
2. **Input/Output**: inspect user-facing inputs and how they're rendered.
|
|
199
|
+
3. **Secrets**: scan for hardcoded keys, `.env` files in repo, logs.
|
|
200
|
+
4. **API design**: review endpoint auth, response data, error handling.
|
|
201
|
+
|
|
202
|
+
### Phase 4 – Threat Modeling
|
|
203
|
+
|
|
204
|
+
1. **Assets**: what does the app protect? (user data, payment info, intellectual property?)
|
|
205
|
+
2. **Threats**: who might attack? (users, competitors, nation-states?) and how?
|
|
206
|
+
3. **Mitigations**: what controls are in place?
|
|
207
|
+
|
|
208
|
+
Example:
|
|
209
|
+
|
|
210
|
+
```
|
|
211
|
+
Asset: User email and payment info
|
|
212
|
+
Threat: Rogue admin exfiltrates data
|
|
213
|
+
Mitigation: DB encryption at rest, audit logs, role-based access
|
|
214
|
+
Risk Level: MEDIUM (admin access is privileged but logs may be incomplete)
|
|
215
|
+
```
|
|
216
|
+
|
|
217
|
+
### Phase 5 – Reporting
|
|
218
|
+
|
|
219
|
+
Create `security_report.md`:
|
|
220
|
+
|
|
221
|
+
```markdown
|
|
222
|
+
# Security Audit Report – [App Name]
|
|
223
|
+
|
|
224
|
+
**Date**: 2026-03-15
|
|
225
|
+
**Assessor**: [Your name]
|
|
226
|
+
**Scope**: Full stack (frontend, API, database, deployment)
|
|
227
|
+
**Compliance**: OWASP Top 10 2021, CWE Top 25
|
|
228
|
+
|
|
229
|
+
## Executive Summary
|
|
230
|
+
|
|
231
|
+
Found 3 CRITICAL, 5 HIGH, 8 MEDIUM vulnerabilities. Estimated remediation: 3–4 weeks.
|
|
232
|
+
Recommendation: Fix CRITICAL issues (password hashing, secrets) before launch.
|
|
233
|
+
|
|
234
|
+
## Findings by Severity
|
|
235
|
+
|
|
236
|
+
### 🔴 CRITICAL (3 issues – Fix ASAP)
|
|
237
|
+
|
|
238
|
+
1. **Plaintext Password Storage**
|
|
239
|
+
- Location: `auth.service.ts:42`
|
|
240
|
+
- Risk: Database breach exposes all passwords
|
|
241
|
+
- Remediation: Use bcrypt; re-hash existing passwords
|
|
242
|
+
- Effort: 6 hours; Deadline: before launch
|
|
243
|
+
- Test: Verify bcrypt rounds >= 12
|
|
244
|
+
|
|
245
|
+
2. **AWS Keys in .env.example**
|
|
246
|
+
- Location: `.env.example` in repo
|
|
247
|
+
- Risk: Anyone with repo access can provision resources / incur costs
|
|
248
|
+
- Remediation: Rotate keys immediately; move to AWS Secrets Manager
|
|
249
|
+
- Effort: 1 hour; Deadline: today
|
|
250
|
+
- Test: Verify keys are rotated and old keys are disabled
|
|
251
|
+
|
|
252
|
+
(2 more critical issues... continue format)
|
|
253
|
+
|
|
254
|
+
### 🟠 HIGH (5 issues – Fix before launch)
|
|
255
|
+
|
|
256
|
+
(Format as above)
|
|
257
|
+
|
|
258
|
+
### 🟡 MEDIUM (8 issues – Fix within 2 weeks)
|
|
259
|
+
|
|
260
|
+
(Format as above)
|
|
261
|
+
|
|
262
|
+
## Recommendations
|
|
263
|
+
|
|
264
|
+
### Short-term (This week)
|
|
265
|
+
|
|
266
|
+
- [ ] Implement password hashing (bcrypt)
|
|
267
|
+
- [ ] Rotate and secure API keys
|
|
268
|
+
|
|
269
|
+
### Medium-term (Before launch, 2–3 weeks)
|
|
270
|
+
|
|
271
|
+
- [ ] Add rate limiting to auth endpoints
|
|
272
|
+
- [ ] Implement Content Security Policy header
|
|
273
|
+
- [ ] Add encrypted secrets management
|
|
274
|
+
|
|
275
|
+
### Long-term (Ongoing)
|
|
276
|
+
|
|
277
|
+
- [ ] Set up security scanning in CI/CD
|
|
278
|
+
- [ ] Perform penetration testing (pre-launch)
|
|
279
|
+
- [ ] Implement a security incident response plan
|
|
280
|
+
|
|
281
|
+
## Appendix: Test Cases
|
|
282
|
+
|
|
283
|
+
Each finding includes manual test steps:
|
|
284
|
+
|
|
285
|
+
### Test: Plaintext Password Vulnerability
|
|
286
|
+
```
|
|
287
|
+
|
|
288
|
+
1. Create user account with password "test123"
|
|
289
|
+
2. Access database directly: SELECT password FROM users WHERE email = 'test@example.com'
|
|
290
|
+
3. Expected: Password is hashed (e.g., $2b$12$...)
|
|
291
|
+
4. Actual: (until fixed) Password is "test123"
|
|
292
|
+
|
|
293
|
+
```
|
|
294
|
+
|
|
295
|
+
## Compliance Status
|
|
296
|
+
|
|
297
|
+
| Standard | Status | Notes |
|
|
298
|
+
|---|---|---|
|
|
299
|
+
| OWASP Top 10 2021 | ⚠️ Non-compliant | 3 CRITICAL issues |
|
|
300
|
+
| CWE Top 25 | ⚠️ Non-compliant | CWE-287 (auth bypass), CWE-640 (weak crypto) |
|
|
301
|
+
| GDPR | ⚠️ Non-compliant | No encryption of user data at rest |
|
|
302
|
+
| PCI-DSS | ❌ Not applicable | No payment card data stored (yet) |
|
|
303
|
+
```
|
|
304
|
+
|
|
305
|
+
## Tags
|
|
306
|
+
|
|
307
|
+
security, vulnerability-assessment, audit, owasp, compliance, risk-mitigation, sast, dast, threat-modeling
|
|
308
|
+
|
|
309
|
+
## Capabilities
|
|
310
|
+
|
|
311
|
+
- Auditing authentication and authorization mechanisms
|
|
312
|
+
- Identifying input validation and output encoding issues
|
|
313
|
+
- Detecting exposed secrets and sensitive data handling problems
|
|
314
|
+
- Assessing API security (authentication, rate limiting, data exposure)
|
|
315
|
+
- Finding frontend vulnerabilities (XSS, CSRF, storage issues)
|
|
316
|
+
- Evaluating infrastructure and deployment security
|
|
317
|
+
- Running automated security scans (SAST, DAST, dependency checks)
|
|
318
|
+
- Threat modeling and risk assessment
|
|
319
|
+
- Providing prioritized, actionable remediation recommendations
|
|
320
|
+
- Creating comprehensive security audit reports with compliance status
|