home / skills / shotaiuchi / dotclaude / test-security
This skill helps you design comprehensive security tests for authentication, authorization, and data protection to prevent breaches.
npx playbooks add skill shotaiuchi/dotclaude --skill test-securityReview the files below or copy the command above to add this skill to your agents.
---
name: test-security
description: >-
Security test creation. Apply when writing tests for authentication,
authorization, input validation, injection prevention, CSRF protection,
and data encryption verification.
user-invocable: false
---
# Security Tests
Write security tests that verify authentication, authorization, and data protection.
## Test Creation Checklist
### Authentication Testing
- Verify login succeeds with valid credentials and fails with invalid ones
- Test token expiration, refresh, and revocation flows
- Check multi-factor authentication enforcement and bypass prevention
- Validate session management (creation, timeout, invalidation)
- Test brute-force protection and account lockout mechanisms
### Authorization Boundary Testing
- Verify role-based access control for all protected resources
- Test horizontal privilege escalation (accessing other users' data)
- Test vertical privilege escalation (performing admin-only actions)
- Check authorization enforcement at API layer, not just UI
- Validate that denied requests return no sensitive information in errors
### Injection Prevention
- Test SQL injection with parameterized and raw query inputs
- Verify XSS prevention in all user-generated content rendering
- Check command injection in system call parameters
- Test path traversal in file upload and download operations
- Validate LDAP, XML, and template injection resistance
### Data Protection Verification
- Verify sensitive data encryption at rest and in transit
- Check that secrets are not logged, cached, or exposed in errors
- Test PII masking in logs, exports, and API responses
- Validate secure deletion of sensitive data on user request
- Confirm CORS, CSP, and security header configuration
## Output Format
Report test plan with priority ratings:
| Priority | Description |
|----------|-------------|
| Must | Tests preventing authentication bypass and data exposure |
| Should | Authorization boundary tests for privilege escalation |
| Could | Defense-in-depth tests for secondary attack vectors |
| Won't | Theoretical attacks requiring physical access or insider threat |
This skill helps you design and generate security test plans focused on authentication, authorization, input validation, injection prevention, CSRF protection, and data encryption. It produces prioritized, actionable test cases and a concise report format to guide implementation. Use it to ensure critical protections are covered and to communicate testing priorities to engineers and QA.
The skill inspects common security areas and converts them into concrete test scenarios with priority ratings (Must, Should, Could, Won't). It outlines checks for login flows, token management, role boundaries, injection vectors, data-at-rest and in-transit protections, and security headers. The output is a structured test plan that teams can execute or translate into automated test scripts.
How are priority ratings assigned?
Priorities map to risk and impact: Must for authentication/data exposure, Should for authorization boundaries, Could for secondary defenses, and Won't for theoretical physical or insider-only attacks.
Can these tests be automated?
Yes. Most scenarios translate to automated API or end-to-end tests; token/session flows, injection payloads, and header checks are commonly scripted.
What areas should be tested first?
Start with authentication, session/token handling, and any endpoints that expose sensitive data; these are high-impact 'Must' items.