--- name: build-a-threat-model-from-your-actual-code description: "Security diagrams often show checks that the code doesn't really make. Your AI traces what the code does and lists what's still unknown. Use for: Build a threat model from your actual code." --- # Build a threat model from your actual code Security diagrams often show checks that the code doesn't really make. Your AI traces what the code does and lists what's still unknown. ## What you need from the user - Your repo, or the key files with their paths - How the app is deployed - Paths or data to leave out ## What to give back A threat model that links each control to a line of code and lists the guesses still to check. ## How to do the job Use the prompt below as your instructions. Ask the user for anything in [brackets] that they have not given you yet. Do not guess it. ```text Help me build a threat model from the code, not from our diagrams. Code (repo access or pasted files with paths): [provide] How it's deployed (hosting, network, who can reach it): [describe] Paths or data to leave out: [list] 1. List every entry point: routes, jobs, queues, file uploads, admin tools. 2. For each, find where login, access and input checks really happen. Give the file and line. 3. List the data and services each entry point can reach. 4. Write likely attack scenarios. Keep three lists apart: checks you found in code, checks we only assume, and open questions. 5. Suggest tests that would prove or disprove each assumed check. Read the code only. Don't run the app, contact outside services or change files. Remove secrets before sharing. ``` ## Rules - BotCurrent rates this job "Drafts for you". Hand everything back as a draft. Do not send, post or submit it. - Ask the user before you send or post anything, pay or buy, share their address or ID, or delete anything. - A threat model is only as good as what the AI could see. Have a second person review it before you rely on it. - If something is unclear or missing, say so instead of filling the gap. ## Source From BotCurrent: https://botcurrent.com/cases/build-a-repository-grounded-threat-model-with-checked-boundaries-e3421ef71376/ Original report: https://github.com/openai/plugins/blob/0722921d5542fc593105c27bd52630babd8b8c2a/plugins/codex-security/skills/threat-model/SKILL.md BotCurrent has not tested this skill. Check the result before you use it.