Skip to content

Find security bugs with Claude Code

A model can point to a suspicious function without proving there is a bug. Here decide ranks where to look, and Claude reads each candidate before it reports a finding.

You need decide installed, an API key, jq, and Claude Code with the decide plugin.

The demo’s shop repository has six planted security bugs, beside safe versions of the same operations:

Terminal window
git clone --depth 1 https://github.com/deepnoodle-ai/decide
sh decide/demo/setup.sh shop && cd shop

Run security on the admin functions, then list the six nearest a flag:

~/shop
decide run security admin > /dev/null
decide runs view --top 6 --json | jq -r '[.source, .input, ([.answers | to_entries[] | select(.value.noul >= 0.3) | .key] | join(", "))] | select(.[2] != "") | @tsv'
Output as text
$ decide run security admin > /dev/null
Running security on 12 functions · typesafe jev-latest

✓ 12 answered  ! 6 flagged  400ms
Flagged: admin/admin.go#L29, admin/admin.go#L51, admin/admin.go#L68, admin/admin.go#L
80, admin/admin.go#L86, and 1 more
See these results again with: decide runs view 20261112-170040-f6c5
$ decide runs view --top 6 --json | jq -r '[.source, .input, ([.answers | to_entries[
] | select(.value.noul >= 0.3) | .key] | join(", "))] | select(.[2] != "") | @tsv'
admin/admin.go#L51      Server.ExportOrders     command_injection, xss
admin/admin.go#L29      Server.TestWebhook      ssrf, xss
admin/admin.go#L86      ShippingClient  tls_verification
admin/admin.go#L80      ResetToken      weak_hash, weak_random
admin/admin.go#L68      Server.Greet    xss
admin/admin.go#L108     SealCardNote    weak_cipher

Server.ExportOrders is a candidate for command injection. Its position may differ on another run.

Start Claude Code in shop, and run the plugin’s audit skill:

/decide:audit admin

Claude reads up to 15 candidates with their callers, and gives each a verdict:

  • Confirmed: untrusted input reaches an operation that does harm.
  • Suspected: Claude can’t tell whether it does.
  • Dismissed: the code prevents it.

This is the demo’s Server.ExportOrders:

admin/admin.go
func (s *Server) ExportOrders(w http.ResponseWriter, r *http.Request) {
cmd := exec.Command("sh", "-c", "tar czf - orders/"+r.FormValue("folder"))
cmd.Stdout = w
if err := cmd.Run(); err != nil {
http.Error(w, err.Error(), http.StatusInternalServerError)
}
}

The request’s folder value goes into a string sent to sh -c, so a ; in it starts another command.

Run /decide:audit in your own repository. Your source code goes to your provider, so choose a scope you can share with it.

The template asks about injection, SSRF, XSS, weak cryptography, and disabled TLS verification. It doesn’t cover path traversal, authorization, or deserialization.

decide is Apache 2.0. Made by Deep Noodle, after some very hard thinking.