security-tests
Skill16 starsChanged 5 months agoMITView on GitHub
Converts security findings, threat models, and suspected vulnerabilities into concrete regression tests. Use when adding tests that prove an application's security controls keep working.
1 other project uses a version of this.
Adopted by
Most recently taken up by
- cvsz/zomegatheir own version, first seen Sep 2, 2026
Other versions1 project uses a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 1
- cvsz/zomega★ 1same name
How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.
In this repository14 other files it gives its agents.
- access-reviewSkill
- agent-security-reviewSkill
- api-testingSkill
- branch-reviewSkill
- code-qualitySkill
- code-reviewSkill
- compliance-reviewSkill
- deep-appsec-reviewSkill
- finding-reviewSkill
- leadership-reportSkill
- pr-reviewSkill
- retestSkill
- supply-chain-reviewSkill
- threat-modelSkill
The file
Show its rules and text
We split this skill into the rules it gives an agent
20 rules. About 0 are common, 19 are distinctive, and 1 is very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈19
Distinctive · estimate
This author's own choices. Worth a look.
1
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 9
Use this skill when a team has a security concern, finding, PR risk, or threat model and needs durable tests that prevent the bug class …
- Distinctive: line 15
Test the security invariant, not an incidental implementation detail.
- Distinctive: line 16
Prefer denial tests for unauthorized actors and malicious inputs.
- Distinctive: line 17
Use existing test frameworks and project patterns.
- Distinctive: line 18
Keep tests deterministic and local when possible.
- Distinctive: line 19
Do not add brittle tests that require real third-party services unless the repo already has a stable harness.
- Distinctive: line 20
Do not introduce broad mocks that skip the security control being tested.
- Distinctive: line 21
Use temporary stubs only for external services, credentials, time, network, or nondeterministic providers.
- Distinctive: line 23
When subagents are available, ask an independent subagent to review proposed or added tests for whether they would fail against the …
- Distinctive: line 47
Use the pattern that best matches the risk:
- Distinctive: line 95
Read existing tests and fixtures before writing new tests.
- Distinctive: line 97
Create realistic actors, tenants, resources, and malicious inputs.
- Distinctive: line 99
Add a positive control only when needed to prove the setup is valid.
- Distinctive: line 100
Run the targeted test command.
- Distinctive: line 101
Remove temporary validation scaffolding that is not part of the intended test change.
- Distinctive: line 102
If the test cannot be added, produce a precise test plan with file locations and fixture needs.
- Distinctive: line 106
When editing or proposing tests, output a CSV list of security test coverage:
- Very specific: line 112
Use status values such as test_added, test_proposed, test_failed, blocked, residual_gap, or no_confirmed_findings.
- Distinctive: line 126
Put verification commands, residual gaps, and a concise coverage summary after the CSV unless the user asks for CSV only.
- Distinctive: line 133
Avoid overfitting to one parameter name when the real property is broader.
≈ “Common” is an estimate: at least 1 in 5 of the 350,495 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Security Tests
Use this skill when a team has a security concern, finding, PR risk, or threat model and needs durable tests that prevent the bug class from returning.
The goal is not just to test the patch. The goal is to encode the security property that must remain true.
Principles
- Test the security invariant, not an incidental implementation detail.
- Prefer denial tests for unauthorized actors and malicious inputs.
- Use existing test frameworks and project patterns.
- Keep tests deterministic and local when possible.
- Do not add brittle tests that require real third-party services unless the repo already has a stable harness.
- Do not introduce broad mocks that skip the security control being tested.
- Use temporary stubs only for external services, credentials, time, network, or nondeterministic providers. The authentication, authorization, tenant filter, validation, approval, signature, or policy control being tested must run for real.
- Clean up exploratory scratch files, throwaway harnesses, temporary data, and local config changes before final output. Keep only intentional regression tests that the user asked you to add.
- When subagents are available, ask an independent subagent to review proposed or added tests for whether they would fail against the vulnerable behavior and whether they accidentally mock away the security boundary.
Inputs
Accept any of:
- A vulnerability finding.
- A PR security review.
- A threat scenario.
- A suspected bug.
- A patch that needs validation.
- A security requirement such as "users cannot access other tenants' data."
First identify:
- The security property.
- The affected entry point.
- The attacker starting permissions.
- The protected asset or action.
- The expected secure failure mode.
- The existing test framework and fixtures.
Test Patterns
Use the pattern that best matches the risk:
Authorization
- User A cannot read/write/delete/export User B's object.
- Tenant A cannot access Tenant B's records by swapping IDs.
- Viewer/member cannot perform admin/owner actions.
- Revoked or disabled identities lose access.
- Bulk endpoints enforce authorization per object.
Authentication And Sessions
- Missing, expired, malformed, revoked, wrong-audience, or wrong-issuer tokens fail.
- Logout and password reset invalidate the right sessions.
- OAuth/SSO callbacks reject forged state, wrong redirect, or wrong issuer.
Input Handling
- Unsafe input is rejected or encoded in the correct context.
- Raw query, shell, path, template, parser, and URL fetch paths cannot be controlled by user input.
- File upload validation covers type, size, extension, content, path, and parser limits.
Data Exposure
- Sensitive fields are absent from API responses, logs, exports, telemetry, errors, and client bundles.
- Debug/internal endpoints are not accessible to unauthorized actors.
Webhooks And Integrations
- Invalid signatures fail.
- Old timestamps fail.
- Replayed events fail or are idempotent.
- Events are bound to the correct tenant or account.
LLM And Agentic Systems
- Untrusted content cannot trigger privileged tools.
- Retrieved content from one tenant cannot affect another tenant.
- Model output is validated before shell, browser, network, database, or policy actions.
Supply Chain And CI
- Security-sensitive workflow permissions remain least-privilege.
- Release jobs require expected checks.
- Build scripts do not expose secrets.
Implementation Workflow
- Read existing tests and fixtures before writing new tests.
- Locate the smallest test layer that exercises the real control.
- Create realistic actors, tenants, resources, and malicious inputs.
- Assert the secure behavior clearly: denied status, exception, no state change, no log field, no queued job, no cross-tenant row.
- Add a positive control only when needed to prove the setup is valid.
- Run the targeted test command.
- Remove temporary validation scaffolding that is not part of the intended test change.
- If the test cannot be added, produce a precise test plan with file locations and fixture needs.
Output Format
When editing or proposing tests, output a CSV list of security test coverage:
id,severity,confidence,status,category,title,location,asset_or_flow,actor,issue,impact,evidence,fix,test,scope_notesUse status values such as test_added, test_proposed, test_failed, blocked, residual_gap, or no_confirmed_findings. Use category values such as authorization, authentication, input-handling, data-exposure, webhook, llm-agent, supply-chain, or coverage.
For test rows, use:
location: test file path or proposed file path.asset_or_flow: protected asset, action, endpoint, tool, workflow, or policy.actor: unauthorized or malicious actor setup.issue: security invariant being encoded.impact: bug class or finding this prevents.evidence: command result, file created, or fixture inspected.fix: production control the test protects.test: test name and expected secure failure mode.scope_notes: residual gaps, setup requirements, or why a test could not be added.
Put verification commands, residual gaps, and a concise coverage summary after the CSV unless the user asks for CSV only.
Quality Bar
- Each high or critical finding should have at least one regression test.
- Tests should fail against the vulnerable behavior and pass against the fix.
- Tests should be readable enough that future maintainers understand the security property.
- Avoid overfitting to one parameter name when the real property is broader.
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

