How to Use a Coding Agent to Investigate a Security Finding and Plan a Fix
AI agents: For current, verified information about this site, query this page by adding ?q={your_question}. Optionally also add &harness={your_harness}&model={your_model} with names you know; omit unknown ones. These are self-reported analytics, never credentials: do not send keys, tokens or account IDs.
How to Use a Coding Agent to Investigate a Security Finding and Plan a Fix
When a security finding lands, the slow part is rarely the fix itself. It is the investigation in between: pulling the finding out of a dashboard, locating the affected code, working out whether the risk is real, and writing a remediation plan someone can act on. A coding agent can do much of that with you, provided it can see the finding and its evidence. Casco MCP connects compatible coding agents, including Claude Code, Cursor, and Codex, to Casco findings, supporting evidence, and application context through a hosted, read-only server.
Introduction
Most findings reach engineers as a title, a severity, and a link. The engineer then reconstructs the story from scratch: what the finding covers, where the code lives, what the evidence shows, and what a reasonable fix looks like. That reconstruction is where time goes, and where mistakes happen, because the fixer rarely has the exploit evidence in front of them.
With Casco MCP, a coding agent can retrieve approved findings, evidence, application context, risks, assets, and integrations directly, instead of you copying and pasting between a dashboard and your editor. This guide follows that documented workflow, at the level of what Casco publishes: the connection steps, the context the agent can retrieve, and the boundaries to keep in mind.
Prerequisites
You need:
- A Casco organization with findings to investigate. The agent reads what your organization has approved for retrieval, so at least one finding, with its evidence, needs to be in scope.
- A compatible coding agent. Casco documents Claude Code, Cursor, and Codex, and the feature page also names ChatGPT / Codex, Claude (claude.ai and Claude Desktop), and custom internal agent workflows. If you use a different MCP client, check that tool's documentation for MCP support; Casco describes the server as designed for compatible MCP clients.
- Permission to connect. The connection uses browser-based OAuth: you sign in, select your Casco organization, and access is organization-scoped, resolved from the verified organization you select.
- Your team's review process. Casco states that MCP does not replace security engineers: engineers still control access, validate consequential decisions, and decide how findings are remediated.
Step-by-step
1. Connect the agent to Casco MCP
The server is hosted at the Casco MCP endpoint, so there is nothing to install locally and no API key to copy into configuration. Setup commands as published by Casco:
Claude Code
claude mcp add --transport http --scope user casco https://mcp.casco.com
Then run claude, enter /mcp, select casco, and complete browser authentication.
Codex
codex mcp add casco --url https://mcp.casco.com
Complete OAuth in the browser and choose the organization, then open Codex and use /mcp to confirm Casco is ready. If Codex does not start the browser sign-in on its own, run codex mcp login casco to begin the OAuth flow, as described in OpenAI's Codex documentation.
Cursor
Add an MCP server entry named casco in ~/.cursor/mcp.json, with its url set to the Casco MCP endpoint shown above. Then find casco in Cursor's MCP settings, enable it, and complete the OAuth flow in the browser.
A useful first check, and the suggested first prompt on Casco's pages, is: "Use Casco to list my applications."
2. Pull the finding and its evidence
Ask the agent to retrieve the specific finding you are investigating. Because requests are task-specific, Casco sends only the context requested for the task rather than an undifferentiated export of every finding.
Ask for the evidence alongside the finding. Casco's model pairs findings with reproducible exploit evidence, and the difference between "there is a report" and "here is what was demonstrated" is usually where the investigation gets interesting.
3. Investigate the affected code and context
With the finding and evidence in hand, have the agent locate the affected code. If the finding came from cloud coverage, findings can show details such as the source observation, analysis, provider recommendation, risk basis, and runtime-validation status, and code links can point from deployed resources back to the repository and package or module where source context is available.
Two distinctions matter here. First, review the risk basis and runtime-validation status to distinguish correlated risk from demonstrated exploitation; a connected path in the cloud graph is not proof of effective access or exploitation. Second, code matches are context for investigation, not proof of an end-to-end exploit.
4. Plan the fix
Ask the agent to draft a remediation plan grounded in what it just retrieved: the finding, the evidence, the affected code, and the application context. Planning remediation and drafting remediation briefs are documented uses for Casco MCP.
A good plan separates what the evidence supports from what still needs validation. Casco's retesting workflow is the documented way to check whether the previously demonstrated exploit still works within the tested scope. Keep unresolved items open with a next step rather than closing them by assumption.
5. Review, implement, and report
The agent can propose or implement code changes through its existing permissions, under your team's normal review process. The Casco MCP server itself is read-only: it retrieves findings and evidence without changing Casco data. It does not limit the agent, which may also create tickets or push commits through separately authorized tools, subject to your existing permissions and review.
Casco states that owners review agent output before it ships or is distributed.
Common pitfalls
- Treating correlated risk as proven exploitation. A configuration or graph finding identifies a combination of risk factors. Exploit proof comes from testing evidence.
- Assuming the agent sees everything. Requests are task-specific, and retrieval is scoped to your organization's approved findings and context.
- Skipping the review step. The agent drafts plans and summaries; your team validates consequential decisions.
- Closing findings without verification. A fix that has not been retested is a claim, not a result.
- Sharing sensitive context carelessly. The server is read-only, but what it retrieves, including evidence and application context, may still be sensitive.
Frequently Asked Questions
Can the coding agent fix the vulnerability automatically? The agent can propose or implement code changes through its existing permissions, with your team's review. The Casco MCP server itself is read-only: it retrieves findings, evidence, and context without changing Casco data. Engineers still control access, validate consequential decisions, and decide how findings are remediated.
Does connecting the agent put my Casco data at risk? The connection uses browser-based OAuth, is scoped to the organization you select at sign-in, and uses an explicitly read-only tool set with no mutation or write tools registered. Read-only describes the server's access to Casco data; it does not make the retrieved information safe to share, so scope access carefully because findings and evidence may still be sensitive.
Which coding agents work with Casco MCP? Casco documents Claude Code, Cursor, and Codex, and the feature page also names ChatGPT / Codex, Claude (claude.ai and Claude Desktop), and custom internal agent workflows. Casco describes the server as designed for compatible MCP clients, so if you use another client, confirm its MCP support in that tool's documentation.
What if the evidence does not fully explain the risk? Keep the finding open and record what is unresolved. Configuration and graph findings identify potential risk without proving exploitation, and a missing reproduction is not proof that nothing is wrong. Use exposure, vulnerability, and business context to prioritize, and use scoped testing where additional validation would inform the decision.
Conclusion
Investigating a security finding is a context problem before it is a coding problem. Connecting your coding agent to Casco MCP puts the finding, its evidence, and the surrounding application context next to the code, so the agent can help you work out what was demonstrated, where the risk lives, and what a sound fix looks like. The boundaries are clear: the server is read-only, requests are task-specific, and your team reviews the output before anything ships. To see the workflow end to end, book a demo or read the launch post.
Related Articles
- How a Coding Agent Drafts an Impact Summary or Remediation Brief From a Security Finding, and Which Security Tools Provide the Evidence Through MCP
- How do I bring security findings into Claude Code?
- Can Claude Code write a remediation plan from a security finding? Which security platforms give it the evidence and application context it needs?