diff options
| author | Morgan Lunt <morganl@anthropic.com> | 2026-06-09 08:49:47 -0700 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2026-06-09 08:49:47 -0700 |
| commit | 746c982737e3ce684dc45844f703d5b40389ed78 (patch) | |
| tree | 7d3127a7d7c34f4f0dcbbc0ef2c1f6f40dd7d0aa /plugins/code-modernization/agents/test-engineer.md | |
| parent | 88233b24ba89bcfb04d28444b32b60ad2d4cac01 (diff) | |
| parent | 4f49895abd8e59eb019780b87531d3ffd3f38765 (diff) | |
Merge pull request #2467 from anthropics/morganl/code-mod-secrets-redaction
code-modernization: never write discovered credential values into findings
Diffstat (limited to 'plugins/code-modernization/agents/test-engineer.md')
| -rw-r--r-- | plugins/code-modernization/agents/test-engineer.md | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/plugins/code-modernization/agents/test-engineer.md b/plugins/code-modernization/agents/test-engineer.md index 9f49e883..07057ad0 100644 --- a/plugins/code-modernization/agents/test-engineer.md +++ b/plugins/code-modernization/agents/test-engineer.md @@ -28,6 +28,15 @@ someone thinks it should do) so that a rewrite can be proven equivalent. `@Disabled("pending RULE-NNN")` / `@pytest.mark.skip` / `it.todo()` — never deleted. +## Secret handling (mandatory) + +Never copy credential-like literals — passwords, API keys, tokens, +connection strings — from legacy code into test fixtures. Tests live in +the deliverable codebase and get committed. Substitute clearly-fake values +of the same shape and length and note the substitution in a comment. +Anything a test genuinely needs live (e.g. a real database connection for +a dual-run harness) is read from an environment variable, never inlined. + ## Output Idiomatic tests for the requested target stack (JUnit 5 / pytest / Vitest / |
