The Claude Code Reviewer Action supports custom security scan instructions, allowing you to add organization-specific vulnerability categories to the security section of the review.
The default reviews cover correctness, reliability, performance, maintainability, testing, and security. The security sections include common vulnerability categories like SQL injection, XSS, and authentication issues. Organizations often have specific security concerns based on their:
- Technology stack (GraphQL, gRPC, specific cloud providers)
- Compliance requirements (GDPR, HIPAA, PCI DSS)
- Industry-specific vulnerabilities (financial services, healthcare)
- Custom frameworks and libraries
The custom-security-scan-instructions input allows you to extend the security categories that Claude checks for.
- Create a text file containing your custom security categories (e.g.,
.github/custom-security-categories.txt) - Reference it in your workflow:
- uses: PSPDFKit-labs/nutrient-code-review@main
with:
custom-security-scan-instructions: .github/custom-security-categories.txtThe file should contain additional security categories in the same format as the default categories. Each category should:
- Start with a descriptive header in bold (using
**Category Name:**) - List specific vulnerabilities or patterns to check for
- Use clear, actionable descriptions
**Category Name:**
- Specific vulnerability or pattern to check
- Another specific issue to look for
- Detailed description of what constitutes this vulnerability
**Another Category:**
- More specific checks
- Additional patterns to identify
See examples/custom-security-scan-instructions.txt for an example set of instructions that customize Claude Code to look for industry-specific security weaknesses including:
- Compliance checks (GDPR, HIPAA, PCI DSS)
- Financial services security
- E-commerce specific issues
Your custom instructions are appended to the security section of the unified review prompt. This means:
- All default security categories are still checked
- Your custom categories extend (not replace) the default security scan
- The same HIGH/MEDIUM/LOW severity guidelines apply
- Be Specific: Provide clear descriptions of what constitutes each vulnerability
- Include Context: Explain why something is a vulnerability in your environment
- Provide Examples: Where possible, describe specific attack scenarios
- Avoid Duplicates: Check the default categories to avoid redundancy
- Keep It Focused: Only add categories relevant to your codebase
The default security scan already includes:
- Input Validation (SQL injection, command injection, XXE, etc.)
- Authentication & Authorization
- Crypto & Secrets Management
- Injection & Code Execution
- Data Exposure
Your custom categories should complement these, not duplicate them.
-
Technology-Specific: Add checks for your specific tech stack
**GraphQL Security:** - Query depth attacks allowing unbounded recursion - Field-level authorization bypass - Introspection data leakage in production -
Compliance-Focused: Add regulatory requirements
**GDPR Compliance:** - Personal data processing without consent mechanisms - Missing data retention limits - Lack of data portability APIs -
Business Logic: Add domain-specific vulnerabilities
**Payment Processing:** - Transaction replay vulnerabilities - Currency conversion manipulation - Refund process bypass