Skip to content

Commit 119f9d4

Browse files
pubkeyclaude
andauthored
Add security findings prompt to generic prompts article (#8921)
* Add security findings prompt to generic prompts article Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01T8UxcJb73BsQ1MNudFftW3 * Update generic-prompts.md --------- Co-authored-by: Claude <noreply@anthropic.com>
1 parent 265d968 commit 119f9d4

1 file changed

Lines changed: 18 additions & 0 deletions

File tree

docs-src/docs/articles/generic-prompts.md

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -87,6 +87,24 @@ Add the improvement to the changelog.
8787

8888
## Security
8989

90+
### Find and fix a security issue
91+
92+
Agents tend to report theoretical security problems that no attacker can trigger in practice. This prompt forces the agent to prove each finding with a reproduction before it is allowed to fix anything.
93+
94+
```txt
95+
Do a security review of FEATURE_NAME and make a list of possible security findings, ranked by severity.
96+
For each finding explain how an attacker could exploit it in practice.
97+
Findings that require the attacker to already run arbitrary code inside of the same process do not count.
98+
Pick the most severe finding and write a test case that reproduces the problem.
99+
In the test case you can only use the public API.
100+
First run the test case without a fix and show me the output. Then apply a fix and run the test case again and show me the output.
101+
102+
- Ensure all other tests run successful.
103+
- Do not add new dependencies as part of the fix.
104+
- Add the fix to the changelog.
105+
- Ensure the linting is ok.
106+
```
107+
90108
## SEO
91109

92110
-------------

0 commit comments

Comments
 (0)