story-quality
Review user stories for quality, proper sizing, sequencing, and acceptance criteria. Use before converting to prd.json. Triggers on: review stories, check user stories, story quality, validate stories.
sast-semgrep
Static application security testing (SAST) using Semgrep for vulnerability detection, security code review, and secure coding guidance with OWASP and CWE framework mapping. Use when: (1) Scanning code for security vulnerabilities across multiple languages, (2) Performing security code reviews wit...
Full skill instructions
Perform comprehensive static application security testing using Semgrep, a fast, open-source static analysis tool. This skill provides automated vulnerability detection, security code review workflows, and remediation guidance mapped to OWASP Top 10 and CWE standards.
Scan a codebase for security vulnerabilities:
semgrep --config=auto --severity=ERROR --severity=WARNING /path/to/code
Run with OWASP Top 10 ruleset:
semgrep --config="p/owasp-top-ten" /path/to/code
scripts/semgrep_scan.py with appropriate rulesetssemgrep --diff to scan only modified codereferences/remediation_guide.mdassets/rule_template.yamlreferences/custom_rules.mdassets/ci_config_examples/Sensitive Data Handling: Semgrep scans code locally; ensure scan results don't leak
secrets or proprietary code patterns. Use --max-lines-per-finding to limit output.
Access Control: Semgrep scans require read access to source code. Restrict scan result access to authorized security and development teams.
Audit Logging: Log all scan executions with timestamps, user, commit hash, and findings count for compliance auditing.
Compliance: SAST scanning supports SOC2, PCI-DSS, and GDPR compliance requirements. Maintain scan history and remediation tracking.
Safe Defaults: Use --config=auto for balanced detection. For security-critical
applications, use --config="p/security-audit" for comprehensive coverage.
Semgrep supports 30+ languages including:
scripts/semgrep_scan.py - Full-featured scanning with OWASP/CWE mapping and reportingscripts/baseline_scan.sh - Quick baseline scan for CI/CDscripts/diff_scan.sh - Scan only changed files (for PRs)references/owasp_cwe_mapping.md - OWASP Top 10 to CWE mapping with Semgrep rulesreferences/remediation_guide.md - Vulnerability remediation patterns by categoryreferences/rule_library.md - Curated list of useful Semgrep rulesetsassets/rule_template.yaml - Template for creating custom Semgrep rulesassets/ci_config_examples/ - CI/CD integration examples (GitHub Actions, GitLab CI)assets/semgrep_config.yaml - Recommended Semgrep configuration# Run comprehensive scan and generate report
scripts/semgrep_scan.py --config security-audit \
--output results.json \
--format json \
--severity HIGH CRITICAL
# Scan only changed files, fail on HIGH/CRITICAL
scripts/diff_scan.sh --fail-on high \
--base-branch main \
--output sarif
# Search for specific vulnerability patterns
semgrep --config "r/javascript.lang.security.audit.xss" \
--json /path/to/code | jq '.results'
# Test custom rule against vulnerable samples
semgrep --config assets/custom_rules.yaml \
--test tests/vulnerable_samples/
semgrep/semgrep-action@v1 with SARIF uploadSee assets/ci_config_examples/ for ready-to-use configurations.
Semgrep findings are classified by severity:
For large codebases:
# Use --jobs for parallel scanning
semgrep --config auto --jobs 4
# Exclude vendor/test code
semgrep --config auto --exclude "vendor/" --exclude "test/"
# Use lightweight rulesets for faster feedback
semgrep --config "p/owasp-top-ten" --exclude-rule "generic.*"
Solution:
--exclude-rule to disable noisy rules.semgrepignore file to exclude false positive patterns--severity filtering# nosemgrep comments for confirmed false positives (with justification)Solution:
--exclude for vendor/generated code--jobs for parallel processing--config=auto--diffSolution:
p/security-audit or p/owasp-top-tenreferences/rule_library.md for specialized rulesSee references/rule_library.md for guidance on writing effective Semgrep rules.
Use assets/rule_template.yaml as a starting point.
Example rule structure:
rules:
- id: custom-sql-injection
patterns:
- pattern: execute($QUERY)
- pattern-inside: |
$QUERY = $USER_INPUT + ...
message: Potential SQL injection from user input concatenation
severity: ERROR
languages: [python]
metadata:
cwe: "CWE-89"
owasp: "A03:2021-Injection"
This skill provides detection for all OWASP Top 10 2021 categories.
See references/owasp_cwe_mapping.md for complete coverage matrix.
Review user stories for quality, proper sizing, sequencing, and acceptance criteria. Use before converting to prd.json. Triggers on: review stories, check user stories, story quality, validate stories.
React and Next.js performance optimization guidelines from Vercel Engineering. This skill should be used when writing, reviewing, or refactoring React/Next.js code to ensure optimal performance patterns. Triggers on tasks involving React components, Next.js pages, data fetching, bundle optimizati...
Comprehensive PDF manipulation toolkit for extracting text and tables, creating new PDFs, merging/splitting documents, and handling forms. When Claude needs to fill in a PDF form or programmatically process, generate, or analyze PDF documents at scale.
Analyze a PRD for edge cases, failure modes, and scenarios that might be missed. Use after creating a PRD to strengthen it. Triggers on: analyze edge cases, find edge cases, what could go wrong, edge case analysis.
Comprehensive document creation, editing, and analysis with support for tracked changes, comments, formatting preservation, and text extraction. When Claude needs to work with professional documents (.docx files) for: (1) Creating new documents, (2) Modifying or editing content, (3) Working with ...
Software Composition Analysis (SCA) and container vulnerability scanning using Aqua Trivy for identifying CVE vulnerabilities in dependencies, container images, IaC misconfigurations, and license compliance risks. Use when: (1) Scanning container images and filesystems for vulnerabilities and mis...
Compound Engineering workflow for AI-assisted development. Use when planning features, executing work, reviewing code, or codifying learnings. Follows the Plan → Work → Review → Compound loop where each unit of engineering makes subsequent work easier. Triggers on: plan this feature, implement th...
Automates browser interactions for web testing, form filling, screenshots, and data extraction. Use when the user needs to navigate websites, interact with web pages, fill forms, take screenshots, test web applications, or extract information from web pages.
Generate a Product Requirements Document (PRD) for a new feature. Use when planning a feature, starting a new project, or when asked to create a PRD. Triggers on: create a prd, write prd for, plan this feature, requirements for, spec out.
Review UI code for Web Interface Guidelines compliance. Use when asked to "review my UI", "check accessibility", "audit design", "review UX", or "check my site against best practices".
Create distinctive, production-grade frontend interfaces with high design quality. Use this skill when the user asks to build web components, pages, or applications. Generates creative, polished code that avoids generic AI aesthetics.
Hardcoded secret detection and prevention in git repositories and codebases using Gitleaks. Identifies passwords, API keys, tokens, and credentials through regex-based pattern matching and entropy analysis. Use when: (1) Scanning repositories for exposed secrets and credentials, (2) Implementing ...
Generate, edit, and beat-sync AI video with leading models in one workspace.
The world's fastest calendar for remote work
Transform Your Design with AI Designer by ImgCreator.ai
Revolutionizing Video Production with AI-Powered Creativity
Extend an image past the frame and let AI fill the new aspect ratio.
Discover your celebrity doppelgänger with StarByFace!
ChainClarity explains 700+ crypto whitepapers in plain English, with layered summaries, comparisons, research tools, alerts, and a $4.99 Pro plan.
Opus.ai: Revolutionize Your Web Experience