Overview
Split a review for business-logic flaws across parallel Devin sessions, one per part of the application, and have each return suspected flaws and, once confirmed, a draft pull request with a test and fix.
Problem or Objective
- Which models and agents find security bugs in code?
- Which agents can trace a security bug to its root cause and propose a validated patch?
More in Security Research
AI Agents and Models
Tools and Integrations
- Tools
- Devin
- Prerequisites
- A Devin account with access to the repository, and a staging environment with test accounts.
How It Works
List the parts of your application where business rules live, such as checkout, roles and permissions, refunds and account changes. For each part, start a Devin session with a focused brief: read the code, list the rules it enforces, look for paths that skip a rule (a price trusted from the browser, a permission check missing on one endpoint, a step that can be repeated), and write each suspected flaw with the file, how to trigger it on staging and a test that would show it. Run the sessions in parallel, either by starting them yourself or by asking Devin to hand them to managed Devins. Review every finding. For each one you confirm, ask that session for a failing test and a fix as a draft pull request, and have a security engineer review it before merge.
Implementation Workflow
Steps assembled from the agents, tools and prompt of this entry. Adapt them to your own setup.
- Choose the agentSet up Devin.
- Connect the toolsConnect the tools this workflow relies on: Devin.
- Check the prerequisitesA Devin account with access to the repository, and a staging environment with test accounts.
- Gather your detailsCollect what the prompt asks for: Part of the application, Repository, Staging address.
- Run the starter promptPaste the starter prompt below into Devin and adapt it to your case.
- Check against the documentationCompare what you get with the documentation at docs.devin.ai before you rely on it.
Practical Starter Prompt: Hunt for business-logic flaws in one area
Fill the fields to adapt the prompt. Empty fields stay as visible [placeholders].
Review the [Part of the application] code in [Repository]. List the business rules it enforces, then look for any path where a rule can be skipped, such as values trusted from the client, missing permission checks, or steps that can be replayed or reordered. For each suspected flaw, give the file and lines, how to trigger it on [Staging address] and a test that would prove it. Do not change code yet and do not touch production. Wait for my review; for each finding I confirm, open a draft pull request with a failing test and a fix.Run one session per area so each stays focused. Confirm every finding yourself before asking for a fix, and review each draft pull request before merge.
Expected Results and Benefits
This is a suggested workflow, not a reported result. The points below are what the cited documentation says the tools can do.
This is a suggested workflow, not a reported outcome. Devin's docs describe an AI software engineer for bug fixes, codebase questions and PR review that can run many tasks in parallel through managed Devins and returns draft pull requests for review. They do not describe security auditing, so treat the output as leads for a reviewer rather than a complete audit.
Limitations and Considerations
Devin's guidance says tasks with clear success criteria, such as a test or CI check, give the best results, and very large projects should be split into focused sessions. If your company already works with Cognition, request access from your administrator or Cognition. Give the sessions a staging environment and test accounts, never production data or customer credentials, and keep merges behind a human security review. An automated pass can miss flaws that depend on how the business really runs. Results depend on your setup and were not independently reproduced by Top 200 Repos.
Sources
- Introducing Devin - Devin Docs (opens in a new tab)
Project documentation · docs.devin.ai · Undated · Source checked 26 Nov 2026, 17:27 UTC
What this source supports
- Devin is an AI software engineer for tickets, new features, bug fixes and internal tools, returning draft pull requests for review.
- Its listed strengths include tackling many tasks in parallel, PR review, codebase Q&A and reproducing and fixing bugs.
- When to Use Devin - Devin Docs (opens in a new tab)
Project documentation · docs.devin.ai · Undated · Source checked 26 Nov 2026, 17:27 UTC
What this source supports
- Independent tasks can run simultaneously: Devin can delegate to managed Devins to launch many sessions at once.
- Tasks with test suites, CI checks or verifiable outcomes yield the best results, and very large projects should be split into focused sessions.