agentleFS
sayurionishisayurionishi/playwright-scaffold/.claude/skills/security-testing/SKILL.md

security-testing

Skill1 starsChanged 3 months agoMITView on GitHub

Use when adding input-validation / security tests — fuzzing fields and params with SQL injection, XSS, path traversal, command injection, and malformed values. Tagged @security.

10 other projects use a version of this.

Adopted by

Most recently taken up by

Used with

Projects with it also use mobile-testing, database-testing and 4 more.

Other files people use alongside this one.

Files found in the same public projects as a version of this one, more often than they turn up anywhere else. Each project counts once, large collections count for less, and this file's own repository is left out.
  • petrkindlmannSkill

    mobile-testing

    Test native, React Native, hybrid, and Flutter mobile apps with Appium 3.x, Detox, Maestro, and Patrol. Covers device farm setup (BrowserStack, Sauce Labs), gesture simulation, deep link and cold-start testing, push notifications, biometric (Face ID) auth, offline/poor-network simulation, and iOS/Android permission dialog handling. Use when: "mobile test," "Appium," "Detox," "Maestro," "Patrol," "Flutter test," "iOS test," "Android test," "device farm," "deep link," "biometric," "Face ID," "permission dialog," "React Native test." Not for: device/browser matrix strategy in the abstract — use cross-browser-testing; app startup/memory/battery profiling depth — use performance-testing; mobile screenshot diffing — use visual-testing. Related: ci-cd-integration, cross-browser-testing, performance-testing, test-data-management, test-reliability.

    Also in 5 projects that use this

  • petrkindlmannSkill

    database-testing

    Validate database integrity, test migrations forward and backward, verify schema constraints, manage seed data, detect migration drift, and identify query performance issues. Covers PostgreSQL, MySQL, MongoDB with Prisma, TypeORM, Drizzle, and SQLAlchemy, plus Testcontainers test databases. Use when: "database test," "migration test," "migration rollback," "rollback test," "data integrity," "SQL test," "schema validation," "seed data," "query performance," "Testcontainers." Not for: synthetic data generation/masking at scale — use test-data-management; Docker/IaC test-environment provisioning — use test-environments; SQL injection — use security-testing. Related: test-data-management, test-environments, security-testing, ci-cd-integration.

    Also in 4 projects that use this

  • conorluddySkill

    accessibility-testing

    WCAG compliance testing and accessibility quality assurance workflows for iOS apps. Use when validating accessibility labels, testing VoiceOver compatibility, checking contrast ratios, or ensuring WCAG 2.1 compliance. Covers accessibility tree analysis, semantic validation, and automated accessibility testing patterns.

    Also in 4 projects that use this

  • +3 more from petrkindlmann

The file

We split this skill into the rules it gives an agent

4 rules. 0 are common, 4 are distinctive, and 0 are very specific to this project.

  • 0

    Common

    Most of the 8 edited versions we read keep these.

  • 4

    Distinctive

    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 field or parameter that accepts user input MUST be fuzzed.

    line 8
  2. Distinctive:

    Don't only test the empty body.

    line 50
  3. Distinctive:

    Don't assert exact error copy for security tests — assert the status class and absence of reflection/leak.

    line 51
  4. Distinctive:

    Don't run destructive payloads against shared/prod data — use seeded, disposable resources.

    line 52

“Common” is measured: kept by at least 6 in 10 of the 8 edited versions of this file we could read. “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 Testing (input fuzzing)

Every field or parameter that accepts user input MUST be fuzzed. This is the format-error tier of the API taxonomy (success / format-error / functional-error), elevated to its own tag.

The rule

A malicious or malformed input must be:

  1. Rejected with a 4xx (typically 400/422). A 5xx is a finding — it means the payload reached an unguarded code path.
  2. Never reflected verbatim (no <script> echoed back → stored/reflected XSS).
  3. Never executed (no traversal reading files, no command execution).
  4. Never leaking a stack trace, SQL error, or internal path.

Source the payloads (never inline them)

test-data/static/util/invalid-values.ts:

  • SECURITY_PAYLOADS.sqlInjection | xss | pathTraversal | commandInjection
  • INVALID_IDS, INVALID_STRINGS, WRONG_TYPES

Pattern

for (const payload of [...SECURITY_PAYLOADS.sqlInjection, ...SECURITY_PAYLOADS.xss]) {
  test(`rejects malicious input: ${payload.slice(0, 24)} @security`, async ({ api }) => {
    const { status, body } = await api.post(ApiEndpoints.USERS, {
      data: { email: payload /* … */ },
    });
    expect(status).toBeGreaterThanOrEqual(400);
    expect(status).toBeLessThan(500); // 500 = unguarded path = bug
    expect(JSON.stringify(body)).not.toContain('<script>');
  });
}

Scope

  • API is the primary target (cheap, deterministic). Fuzz bodies, query params, path params.
  • UI security tests are rare — only where the client does its own validation worth asserting.
  • One @security tag per test. npm run test:security runs the subset.

Don't

  • Don't only test the empty body. Loop per field, per payload class.
  • Don't assert exact error copy for security tests — assert the status class and absence of reflection/leak.
  • Don't run destructive payloads against shared/prod data — use seeded, disposable resources.

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.