코드 리뷰를 위한 사고 사슬 프롬프트
LLM을 실행 가능한 수정안을 내는 구조화된 보안 리뷰어로 만드는 재사용 가능하고 엄밀한 프롬프트를 원하는 개발자.
입력 및 출력 미리보기
입력
- Task Description
- Create a prompt that makes the model review a Python function for security vulnerabilities (SQL injection, unsafe deserialization, secrets in code), explain each finding with severity, and suggest a fix with corrected code.
- Ai Model
- claude
- Prompt Style
- chain-of-thought
- Output Format
- code
- Complexity
- advanced
출력 (발췌)
You are a senior application-security engineer. Review the Python function below. Think step by step: (1) trace untrusted inputs, (2) check for SQL injection, unsafe deserialization, and hardcoded secrets, (3) rank each finding by severity (Critical/High/Medium/Low). For every issue, output: location, why it's exploitable, and a corrected code block. If no issues exist in a category, state so explicitly. Format your final answer as Markdown with a findings table followed by the fixed function.