When an agent says a change is done, it should mean done and secure. The HawkScan plugin for Claude Code closes that gap: after Claude finishes a feature, bugfix, or refactor, it runs the full loop on its own, configuring HawkScan, scanning the running app, fixing what it finds, and rescanning to confirm the fix worked. It doesn’t stop to ask permission first, and it fixes every reported vulnerability in the scan rather than only the ones tied to the latest change.
You can install it today from Anthropic’s official Claude Code plugin directory, which now lists two StackHawk plugins: stackhawk-hawkscan and stackhawk-api. Both sit in the security category, and you install them the same way you’d install anything else Anthropic has approved. For teams that only allow plugins from vetted sources, that removes the main obstacle to trying security testing inside their AI coding workflow.
Setup is the usual hurdle with security testing tools, so that’s where most of the work went. Before writing any config, the plugin reads what the repo already says about itself: AGENTS.md, CLAUDE.md, READMEs, contributing guides, and docs folders. From those it picks up the start command, local host and port, API style, and any documented test logins or seed data. It then writes a stackhawk.yml suited to the app, whether that’s REST with an OpenAPI spec, GraphQL, gRPC, SOAP, or a standard web app. It also tunes the scan policy to the tech stack it detects, so you aren’t running Java checks against a Node service.
Authentication is what makes the rest of the scan worth anything, and it’s usually the hardest part to get right. The plugin handles bearer tokens, form logins, cookies, OAuth2 with an external identity provider, and custom scripts. When it can’t work out the auth pattern from the code, it falls back to an auth analyzer that watches a real login in Chrome and validates the resulting config over several rounds until it works. If auth fails because the backend has no valid test user, a companion skill can set up seed data so the scan has something to log in with.
Findings come back as prioritized fix tasks that the agent can act on right away. The plugin also makes a judgment call about noise. A permissive CORS header on a public API or an info disclosure on a health check endpoint can be excluded or marked as accepted risk. When the call isn’t clear, the rule is to fix it, because missing a real vulnerability costs more than fixing a harmless one.
A few guardrails keep the loop from getting out of hand. It runs one scan at a time per app and environment, does at most one fix and rescan cycle per task, and stops the moment you tell it to. It also prints a status line at each phase so you can see what’s happening.
Hooks cover the gaps. After a git commit, it prompts a scan of that commit, and if a session ends with code changes and no scan, it leaves a reminder. Each scan is tagged with the commit SHA and branch, and the app is linked to its repo in StackHawk’s Attack Surface Management, so results trace back to the code that produced them.
The API plugin covers the reporting side. You can ask Claude for your security posture across every app, a detailed breakdown of one app’s latest scan, which apps haven’t been scanned in 30 days, or what changed between the last two scans of a service. It can filter by team, environment, or environment type, and it shows triage status next to each finding. It’s intentionally read-only, so triage decisions stay in the StackHawk platform with the people accountable for them.
Get started
To get started, you’ll need a StackHawk account (there’s a free trial), an API key, and version 6.0 or newer of the hawk CLI or Docker. Then open Claude Code and run /plugin install stackhawk-hawkscan@claude-plugins-official, or swap in stackhawk-api. The source is in our public agent-skills repo on GitHub and setup docs are at docs.stackhawk.com/ai-security. When you try it on a real codebase, we’d love to hear what worked and what needs improvement.