Coding agent

How to security test code written with Continue

Updated

Continue works from the file and the retrieved context, so its output repeats whatever pattern is nearest — including an insecure one. Test by counting dangerous shapes per repository and testing the endpoints with the highest count.

Where this class of bug actually lives in Continue-assisted edits

  • Local pattern inheritance. The completion copies the surrounding function, including an unchecked id or a concatenated query.
  • Retrieved context. Files it pulled in carry their conventions, and the older ones carry the bugs.
  • Small edits. A one-line change is reviewed quickly, and a one-line change is enough to drop a check.
  • Rules not applied. Project rules only bind if they are in the context the model received for that file.

What to try first

  1. Count the dangerous shapes across the repo and fix the highest-frequency one first.
  2. Review one-line edits for removed conditions, not just added lines.
  3. Check that your project rules cover authorization, not only style.
  4. Test the endpoints in the files with the most inherited patterns.

A reproduction you can keep

Pattern count first, then the endpoint behind the worst file:

Count the shape, test the path
grep -rnE 'where\((["'\''`]).*\$\{|execute\(f["'\'']|innerHTML *=|findById\(req' src/ app/ lib/ \
  | awk -F: '{print $1}' | sort | uniq -c | sort -rn | head

curl -sS -i https://staging.example.com/api/<route>/1003 -H 'Authorization: Bearer ***'

# vulnerable: the file with 14 hits, and a 200 on the foreign id
# fixed: shape count zero in that file, identical 404s

What "fixed" has to look like

Fix the shape once in a shared helper, re-grep to zero, and add the rule to the project instructions so it appears in the context for every file. Verify with two accounts on the affected endpoints.

Where people get this wrong

  • Project rules that say "be secure" do nothing; the rule has to name the allowed call.
  • One-line edits are the least reviewed and can carry a removed guard.
  • Retrieved context can pull an old insecure file into a new completion.

What Offense does here

Offense runs an agent swarm against your app in a disposable sandbox, keeps the request, the identity and the vulnerable response as evidence, and replays the same attack after the fix so the retest is a control comparison rather than a green check. It does not read your source and it does not patch your code: the finding goes to your coding agent with the reproduction attached. The hosted workspace is invite-only — join the waitlist — and the free dependency audit in /install needs no account.

Questions this page answers

Why does Continue repeat insecure patterns?

It completes from the file and the retrieved context, so the nearest example is the template.

Do project rules prevent this?

Only when they name a concrete rule — which call to use, which to avoid — and appear in the context for that file.

Written by Offense Research, reviewed December 2, 2026. Correct something? Email imran@offenseresearch.com.