agentleFS
CaduS0uzaCaduS0uza/qa-supreme/skills/security-regression/SKILL.md

security-regression

Skill1 starsChanged 2 months agoMITView on GitHub

Own the security checks that belong to QA rather than to a pentest — authorization and tenant isolation as tests, headers, cookie flags, client-side secrets, injection-safe inputs. Use when asked whether users can see each other's data, about IDOR, security headers, or a pre-release security pass.

  • Deletes or force-pushes

The file

We split this skill into the rules it gives an agent

1 rule. About 0 are common, 1 is distinctive, and 0 are very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈1

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 0

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    Every endpoint that takes an id gets a row.

    line 21

≈ “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.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

Security Regression

This is not a penetration test. It is the set of security properties a QA suite can assert on every commit, forever, so a regression cannot ship silently.

The authorization matrix (the highest-value tests in any multi-tenant product)

Build the grid once, generate a test per cell:

ActorOwn resourceOther user's resourceOther tenant's resourceNo auth
owner200403/404403/404401
member200 (scoped)403/404403/404401
admin200per policy403/404401

Every endpoint that takes an id gets a row. IDOR — swapping an id and getting someone else's data — is the most common serious vulnerability in SaaS, and it is trivially testable:

const other = await seedTenant('acme')
const res = await api.as(userFromTenant('globex')).get(`/orders/${other.orderId}`)
expect(res.status).toBe(404)          // not 403: do not confirm existence
expect(res.body).not.toHaveProperty('total')

Prove each of these with mutation-proof by removing the guard — an authorization test that stays green without the guard is the most dangerous false positive in the codebase.

Automated sweep

node runner/bin/qa-supreme.mjs security --url https://app.example.com

Covers headers (CSP, HSTS, X-Content-Type-Options, framing), cookie flags (HttpOnly, Secure, SameSite), client-side secret patterns (live API keys, JWTs, private keys in markup or localStorage), target=_blank without noopener, and forms posting over http.

Input safety as regression tests

For every input that reaches a query, a template, a filesystem path or a shell:

  • SQL/NoSQL: ' OR 1=1 --, '; DROP TABLE, {"$ne": null} — expect a validation error, never a 500 and never extra rows.
  • XSS: <img src=x onerror=alert(1)> stored and reflected — assert it renders as text.
  • Path traversal: ../../etc/passwd — expect rejection.
  • Mass assignment: post role: "admin" to a profile update — expect it ignored.
  • Rate limiting: N+1 requests in a window -> 429.

These are regression tests, not exploitation. Report what failed and where; do not chain into exploitation of a system you were not engaged to attack.

Scope boundary

Vulnerability classes requiring active exploitation (SSRF chains, deserialization, auth bypass research) belong to a scoped, authorized penetration test — not to a CI suite. State that boundary in your report instead of implying full coverage.

Output

AUTHZ MATRIX  42 cells, 40 pass, 2 FAIL
  FAIL GET /api/orders/:id  member of tenant B receives 200 for tenant A order  (orders.ts:31)
  FAIL GET /api/exports     no tenant filter on the query                       (exports.ts:12)
HEADERS  CSP missing, HSTS present, X-Frame-Options missing
SECRETS  none found in client bundles

Download now (ZIP)

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
What did you use it for? e.g. Reviewing pull requests in a Rails app

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.