一键导入
security-validation
Pre-merge security validation detecting secrets, user-specific paths, insecure SSH configurations, and security-weakening flags
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
菜单
Pre-merge security validation detecting secrets, user-specific paths, insecure SSH configurations, and security-weakening flags
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
基于 SOC 职业分类
Create complete Claude Code agents for the Traycer enforcement framework. This skill should be used when creating new agents or updating existing agents. Creates all agent components including system prompt, hooks, skills, commands, scripts, and reference docs. Also updates coordination documents that list available agents. Based on Anthropic's official agent development best practices.
Clean and normalize a large backlog of GitHub pull requests in messy repositories. This skill should be used when facing a repository with numerous stale, conflicted, or outdated PRs that need systematic review, conflict resolution, testing, and disposition (merge, close, or defer). Handles PR triage, automated rebasing, CI verification, risk assessment, and safe merging while maintaining default branch stability.
This skill should be used when the user requests to create professional business documents (proposals, business plans, or budgets) from templates. It provides PDF templates and a Python script for generating filled documents from user data.
This skill should be used when writing documentation for codebases, including README files, architecture documentation, code comments, and API documentation. Use this skill when users request help documenting their code, creating getting-started guides, explaining project structure, or making codebases more accessible to new developers. The skill provides templates, best practices, and structured approaches for creating clear, beginner-friendly documentation.
Define custom Claude Code slash commands for agents in the Traycer enforcement framework. This skill should be used when creating or updating agents and needing to specify reusable prompts that agents can execute as slash commands. Commands are Markdown files stored in .claude/commands/ and referenced in agent config.yaml files. This is for Claude Code slash commands (/command-name), not bash/CLI commands.
This skill should be used when analyzing CSV datasets, handling missing values through intelligent imputation, and creating interactive dashboards to visualize data trends. Use this skill for tasks involving data quality assessment, automated missing value detection and filling, statistical analysis, and generating Plotly Dash dashboards for exploratory data analysis.
| name | Security Validation |
| description | Pre-merge security validation detecting secrets, user-specific paths, insecure SSH configurations, and security-weakening flags |
| category | validation |
| usage | action, qa, frontend, seo, backend, devops |
| version | 1 |
| created | "2025-11-05T00:00:00.000Z" |
| converted_from | docs/agents/shared-ref-docs/security-validation-checklist.md |
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