Agent integration

Cefense is built to be driven by a coding agent, not only by a person.

4 sections3 min read

Every command the CLI has takes --agent, which turns it into a machine interface: one line of JSON on stdout, structured errors, and never a prompt. That is the supported way for Claude Code, Cursor, Codex, or your own agent to drive Cefense.

Why this exists

An agent already has the context a security tool usually lacks: it knows what the code is for, what changed recently, and what the team is in the middle of. What it does not have is a reliable account of what is actually vulnerable. Cefense supplies that, in a form an agent can act on rather than paraphrase.

The reverse is also true. Cefense produces evidence and a patch. Deciding whether the patch is right for this codebase, and whether the finding matters given what the service does, is judgement work that an agent with the whole repository in context is well placed to do.

What an agent can do

  • Scan a repository and wait for the result.
  • List findings, filter them, and read one in full, including the traced data flow and the research behind it.
  • Generate a patch and read the diff.
  • Open a pull request, and merge it, when a person has agreed to it.
  • Read the scanned commit history to answer when a vulnerability was introduced and whether a fix closed anything.
  • Export a component inventory.
  • Read the organization's plan and how much of its allowance is left, so it knows a scan will be refused before it starts one.

What it cannot do

  • It cannot bypass branch protection. A required review, a pending check, a conflict, or a draft each stop a merge with a specific code to report.
  • It cannot scan your working tree. Cefense reports on what has been committed and scanned, so the agent's own uncommitted work is not in the scan.
  • It cannot invent a finding. Every id, severity, CVE, and path comes from the JSON, and there is nothing else for it to draw on.
  • It cannot act above the user's role. Repositories and findings belong to a team, and if the user is a member there, the agent gets organization_forbidden on anything that connects, disconnects, or opens a pull request.
  • It cannot buy anything. cf plan upgrade and cf plan portal return a URL for a person to open, and the plan changes only once a payment a human made has cleared. See Plans and billing.

Where to start

Paste this into any coding agenttext
Set up Cefense in this repo: cefense.com/skill.md

Have a correction or need help?

Email the docs team