plugins/handling-sensitive-test-data/skills/handling-sensitive-test-data/SKILL.md
Keeps test data legally and operationally safe: classifies personal data, replaces production copies with synthetic or anonymized fixtures, manages secrets in local runs and CI, strips personal data from traces and HAR files, and sets retention rules. Use when tests run against a production data copy, when fixtures contain real names or emails, when a data protection review is coming, or when test artifacts might carry personal data into CI logs.
npx skillsauth add jaktestowac/awesome-copilot-for-testers handling-sensitive-test-dataInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
Use this skill when the data a test suite touches would matter if it leaked.
Test environments are where personal data goes to be forgotten about. A production dump copied to staging "just for this migration" outlives the migration by years; a HAR fixture recorded from a real session carries a real session token into the repository; a failing test uploads a screenshot of a customer's address to a CI artifact store with public read access. None of these are exotic. All of them are the ordinary result of nobody having decided anything.
This skill is about doing testing work safely. It is not legal advice, and where a regime's specific obligations are in play, the data protection owner decides, not the tester.
.env.List every place data lives, including the ones that are not obviously data:
.env files and developer machinesThe artifacts are where teams are surprised. A Playwright trace holds every request body, every response, and a screenshot of every step.
Use ./resources/pii-classification.md to sort what you found:
| Class | Examples | Handling | | --- | --- | --- | | Direct identifiers | Name, email, phone, national id, account number | Never in test data | | Quasi-identifiers | Date of birth, postcode, gender, job title, timestamps | Dangerous in combination; three are usually enough to re-identify | | Special category | Health, biometrics, ethnicity, religion, sexual orientation, trade union membership | Strictest handling; usually forbidden outside production | | Financial | Card numbers, IBANs, transaction records | PCI scope; use provider test values only | | Credentials | Passwords, tokens, keys, session cookies | Never committed, never in artifacts | | Business confidential | Pricing, contracts, internal metrics | Handled per company policy |
The quasi-identifier row is the one that gets missed. Anonymizing names while keeping birth date and postcode is not anonymization.
Ranked by safety. Take the highest one that works.
| Strategy | Safety | Cost | Use when | | --- | --- | --- | --- | | Synthetic, generated | Highest | Building factories | Default for everything | | Synthetic, shaped by production statistics | High | Analysis of distributions | Load tests, realistic volume | | Anonymized production copy | Medium | Pipeline plus verification | Migration and reporting tests that need real shape | | Pseudonymized production copy | Low | Key management | Almost never; the mapping is itself personal data | | Raw production copy | None | None | Never |
If the answer lands below synthetic, write down the specific test that cannot be satisfied by generated data. Usually there is one real constraint, such as a data distribution or a legacy record shape, and it can be met by generating data with that property rather than by copying.
./resources/anonymization-recipes.md covers both generation and transformation.
For generated data:
@example.com), reserved phone ranges, and provider test card numbers, so nobody mistakes a fixture for a real customerHand the coverage side of this to designing-test-data. This skill owns the safety side; that one owns whether the values exercise the right cases.
Then it goes through a pipeline with a verification step, never a manual pass. ./resources/anonymization-recipes.md has the transformations. Non-negotiables:
Record the approval: who authorized the copy, what the retention period is, and who deletes it.
./resources/secrets-in-ci.md in full. The rules:
.env is gitignored, and .env.example carries the keys with no valuesA secret scanner in CI is the backstop, not the control. Assume it will miss the one that matters.
The step most suites skip entirely.
Authorization, Cookie, and Set-Cookie headers and any personal data in bodies before committing./resources/data-handling-checklist.md has a per-artifact-type table.
.env file committed once, then removed in a later commit and still in git history./resources/pii-classification.md - classification table, the quasi-identifier problem, and regime-specific notes for GDPR, HIPAA, and PCI./resources/anonymization-recipes.md - synthetic generation patterns, transformation techniques, referential integrity, and the re-identification check./resources/secrets-in-ci.md - env files, CI secret stores, masking verification, fork policy, rotation, and scanning./resources/data-handling-checklist.md - per-artifact-type handling, retention defaults, and a pre-merge checklistdesigning-test-data - for whether the data covers the right cases; this skill covers whether it is safemocking-network-and-time - when recorded HAR fixtures need sanitizing before they are committedrunning-visual-regression-tests - when baselines and diff images show personal datatesting-application-security - when the concern moves from data handling to whether the application protects itdocumenting-test-suites - to record the data rules where contributors will find themreporting-bugs - when evidence attached to a report contains personal dataThis skill is complete when:
testing
Tests the customization assets themselves - skills, prompts, custom agents, instructions - the way a product is tested: activation cases that check an asset fires when it should and stays quiet when it should not, output-contract cases, safety cases, collision cases between assets competing for the same trigger, a weighted rubric scored blind, and a baseline-versus-candidate gate before an edit ships. Use when a skill is edited and nobody knows whether behaviour changed, when two skills fight over the same request, when a description is being tuned for discoverability, when a collection has grown past manual spot-checking, or when the request mentions skill evals, prompt regression, or "does this skill actually work".
development
Shapes QA output for the person who has to act on it: result and blocker in the first two lines, one decision per report, findings ordered by what they cost, the long artifact in a file and the decisions in the message, and magnitude stated in units the reader can count. Use when a report is accurate but nobody acts on it, when a finding set is too long to read under time pressure, when the same findings must be retold for a developer, a release manager, and an on-call engineer, or when the request mentions "too long", "make this readable", "just tell me what to do", "so what", or "summarize this for stakeholders". Pairs with unslop-answers, which makes the same report honest.
testing
Verifies that the lines and branches a change actually touched are executed by tests, using LCOV or Cobertura diff coverage instead of whole-repo percentages, and escalates uncovered high-risk changes into a blocking finding. Use when a pull request needs a coverage gate that unrelated tests cannot satisfy, when total coverage looks healthy but the diff is untested, when wiring diff coverage into CI, or when someone claims a change is covered because the suite is green.
development
Cuts AI tells from test code: tests that pass without proving anything, tautological assertions, mock-only tests, hardcoded waits, coverage theater, vague names, swallowed errors, retries used as fixes. Use whenever test code is written, changed, or reviewed, including tests produced as a side effect of a feature task, and when the request mentions "review these tests", "are these tests any good", "this test always passes", "this suite is flaky", or "clean up these tests". Must always apply to test code.