skills/security-validate/SKILL.md
Pre-merge security validation detecting secrets, user-specific paths, insecure SSH configurations, and security-weakening flags
npx skillsauth add auldsyababua/instructor-workflow Security ValidationInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
Use this skill when you need to:
Triggers:
For Action Agent (pre-commit):
docs/ directorygit add to catch issues earlyFor QA Agent (pre-merge):
docs/ AND src/ directoriesFor Planning Agent (work block creation):
Execute the following security checks based on your agent role:
Purpose: Detect hardcoded secrets in documentation and code
# For Action Agent (docs only):
grep -r -E "(secret|password|token|key|apiKey)[\s]*=[\s]*['\"]?[a-zA-Z0-9_./+-]{20,}" docs/
# For QA Agent (docs + code):
grep -r -E "(secret|password|token|key|apiKey)[\s]*=[\s]*['\"]?[a-zA-Z0-9_-]{20,}" docs/
grep -r -E "(secret|password|token|key|apiKey)[\s]*=[\s]*['\"]?[a-zA-Z0-9_-]{20,}" src/
Pass Criteria: All matches are placeholders (<SECRET>, $ENV_VAR, ***REDACTED***)
Fail Criteria: Any match appears to be an actual secret (not a placeholder)
Purpose: Detect user-specific absolute paths that break portability
# For Action Agent (docs only):
grep -r -E "(\/Users\/|\/home\/|C:\\\\Users\\\\|~\/Desktop)" docs/
# For QA Agent (docs + code):
grep -r -E "(\/Users\/|\/home\/|C:\\\\Users\\\\|~\/Desktop)" docs/
grep -r -E "(\/Users\/|\/home\/|C:\\\\Users\\\\)" src/
Pass Criteria: No user-specific paths found
Fail Criteria: Any user-specific path found (must use repo-relative paths)
Purpose: Detect insecure SSH configurations that disable host key verification
# Scan for insecure SSH configs:
grep -r -E "(StrictHostKeyChecking no|UserKnownHostsFile /dev/null)" docs/
Pass Criteria: No insecure SSH patterns found, OR security warning is documented
Fail Criteria: Insecure SSH config found without security justification
Purpose: Detect dangerous flags that bypass security controls
# Scan for dangerous flags:
grep -r -E "(--dangerously-skip-permissions|--no-verify|--insecure|-k|--allow-root|chmod 777)" docs/
Pass Criteria: All security-weakening flags have ⚠️ **Security Warning:** block above them
Fail Criteria: Security-weakening flags found without warning block
Purpose: Ensure documented paths/scripts match actual implementation
Use this decision matrix to determine next actions:
| Finding | Severity | Action | |---------|----------|--------| | Hardcoded secrets found | CRITICAL | ❌ FAIL - Stop immediately, request guidance | | User-specific paths in docs | HIGH | ❌ FAIL - Must fix before commit/merge | | User-specific paths in code | MEDIUM | ⚠️ WARN - Request fix | | Insecure SSH config | HIGH | ⚠️ WARN - Check for security justification | | Security flags without warning | MEDIUM | ⚠️ WARN - Request warning block | | Path mismatch (docs vs. scripts) | MEDIUM | ⚠️ WARN - Request alignment |
Enforcement Rules:
For Action Agent:
For QA Agent:
If security issues found, generate a report using this template:
**Security Scan Results**
❌ **FAILED** - Security issues found:
### Critical Issues
1. **Secret Exposure** (<file>:<line>):
- Found: `<actual pattern>`
- Fix: Replace with `<placeholder pattern>` or `$ENV_VAR`
2. **Path Portability** (<file>:<line>):
- Found: `/Users/username/Desktop/project/path`
- Fix: Use `path/from/repo/root` (repo-relative)
### Warnings
3. **SSH Security** (<file>:<line>):
- Found: `StrictHostKeyChecking no`
- Fix: Use `StrictHostKeyChecking yes` or add security justification
4. **Security Flag Without Warning** (<file>:<line>):
- Found: `--dangerously-skip-permissions`
- Fix: Add `⚠️ **Security Warning:**` block above usage
**Recommendation**: [BLOCKED | REQUEST FIXES | APPROVED WITH WARNINGS]
If all checks pass, proceed with commit/PR approval:
**Security Scan Results**
✅ **PASSED** - No security issues found
All checks passed:
- [x] No hardcoded secrets detected
- [x] All paths are repo-relative
- [x] SSH configurations are secure
- [x] Security-weakening flags have warnings
- [x] Documentation-code consistency verified
**Recommendation**: APPROVED for [commit | merge]
# Bad example:
TELEGRAM_WEBHOOK_SECRET=wh_tg_prod_abc123def456
API_KEY="sk_live_1234567890abcdef"
DATABASE_URL=postgresql://user:password@host:5432/db
# Good example:
TELEGRAM_WEBHOOK_SECRET=<your-webhook-secret>
API_KEY=$OPENAI_API_KEY (set in .env)
DATABASE_URL=***REDACTED*** (see .env.example)
# Bad example:
Repository path: /Users/colinaulds/Desktop/bigsirflrts
Screenshot location: ~/Desktop/project/docs/.scratch/
# Good example:
Repository path: <cloned to your local machine>
Screenshot location: docs/.scratch/<issue-id>/screenshots/
# Bad example:
Host production
StrictHostKeyChecking no
UserKnownHostsFile /dev/null
# Good example:
Host production
StrictHostKeyChecking yes
# Pre-populate known_hosts:
# ssh-keyscan -p 22 hostname >> ~/.ssh/known_hosts
# Bad example:
alias deploy='./deploy.sh --dangerously-skip-permissions'
# Good example:
⚠️ **Security Warning:** This alias uses `--dangerously-skip-permissions` which bypasses safety controls. Only use in development environments.
alias deploy-dev='./deploy.sh --dangerously-skip-permissions'
Action Agent (pre-commit - docs only):
# Run all checks in one command:
grep -r -E "(secret|password|token|key|apiKey)[\s]*=[\s]*['\"]?[a-zA-Z0-9_./+-]{20,}" docs/ ; \
grep -r -E "(\/Users\/|\/home\/|C:\\\\Users\\\\|~\/Desktop)" docs/ ; \
grep -r -E "(StrictHostKeyChecking no|UserKnownHostsFile /dev/null)" docs/ ; \
grep -r -E "(--dangerously-skip-permissions|--no-verify|--insecure|-k|--allow-root|chmod 777)" docs/
QA Agent (pre-merge - docs + code):
# Full scan (docs + code):
for dir in docs src; do
echo "=== Scanning $dir ==="
grep -r -E "(secret|password|token|key|apiKey)[\s]*=[\s]*['\"]?[a-zA-Z0-9_-]{20,}" $dir
grep -r -E "(\/Users\/|\/home\/|C:\\\\Users\\\\)" $dir
done
grep: Pattern matching for security scan checksgit add: Stage files after security validation passesdocs/agents/action/action-agent.mddocs/agents/qa/qa-agent.mddocs/agents/planning/planning-agent.md/test-quality-audit - Test quality validation patterns/code-validation - Code hygiene and validation checksBefore Security Validation Skill:
After Security Validation Skill:
Review Period: Re-audit every 10 merged PRs to measure effectiveness
Update Triggers:
Version History:
For Planning Agent: Security Acceptance Criteria Template
When creating work blocks for documentation, configuration, or scripts, include:
**Security Requirements:**
- [ ] No hardcoded secrets in documentation (verified with `/security-validate`)
- [ ] All paths are repo-relative (no /Users/ or /home/ paths in docs)
- [ ] SSH configs use StrictHostKeyChecking yes (no disabled verification)
- [ ] Security-weakening flags have explicit warning blocks
- [ ] Documentation examples use placeholder values for secrets
- [ ] QA security scan passes before PR approval
tools
Toolkit for interacting with and testing local web applications using Playwright. Supports verifying frontend functionality, debugging UI behavior, capturing browser screenshots, and viewing browser logs.
testing
Three-step Linear update protocol after job completion - update child issue, check parent completion, update parent if all children done
testing
This skill should be used whenever users need help planning trips, creating travel itineraries, managing travel budgets, or seeking destination advice. On first use, collects comprehensive travel preferences including budget level, travel style, interests, and dietary restrictions. Generates detailed travel plans with day-by-day itineraries, budget breakdowns, packing checklists, cultural do's and don'ts, and region-specific schedules. Maintains database of preferences and past trips for personalized recommendations.
tools
Proactive token budget assessment and task chunking strategy. Use this skill when queries involve multiple large file uploads, requests for comprehensive multi-document analysis, complex multi-step workflows with heavy research (10+ tool calls), phrases like "complete analysis", "full audit", "thorough review", "deep dive", or tasks combining extensive research with large output artifacts. This skill helps assess token consumption risk early and recommend chunking strategies before beginning work.