> ## Documentation Index
> Fetch the complete documentation index at: https://docs.superblocks.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Security Agent

> An AI security reviewer that reads your application end to end and reports exploitable findings before publish

The **Security Agent** is a Superblocks-managed AI reviewer that reads your application the way a security engineer would. Where [static analysis](/admin/code-security/static-analysis) matches known-bad patterns, the agent follows data across pages, APIs, and integrations to reason about whether an issue is actually exploitable in context.

It runs on Claude and follows the approach of Anthropic's open-source [Claude Code security review](https://github.com/anthropics/claude-code-security-review), with a Superblocks-specific policy and application context layered on top so platform-enforced protections are not reported as findings.

## What it looks for

By default the agent performs a comprehensive security review covering:

* Hardcoded secrets, API keys, tokens, and passwords in source code
* SQL, code, command, SSRF, and template injection
* Cross-site scripting from user-controlled data rendered as raw HTML
* Missing or broken authentication and authorization checks
* Sensitive data (PII, credentials) logged, leaked in responses, or stored insecurely
* Weak or deprecated cryptography
* Insecure network configuration: wildcard CORS, disabled TLS verification, open redirects
* Insecure deserialization and unrestricted file uploads
* API endpoints that return excessive data or expose internal details

The agent also reports security concerns that do not fit these categories. It is read-only: it evaluates and reports, and never modifies the application.

### Superblocks-aware analysis

The agent receives context about the Superblocks execution model along with the application, which keeps findings grounded:

* **Platform authentication and access control.** Users must be authenticated to open a Superblocks app, and each app has its own access control list. The agent does not flag an API for "missing authentication" simply because the API code has no explicit check. It flags authorization issues when an API takes a sensitive identifier from client input instead of reading the authenticated user from server-side context.
* **Bindings are not eval.** `{{ }}` bindings are evaluated in a controlled sandbox and are not treated as injection.
* **Integrations.** Integration configuration is inspected for leaked credentials and insecure settings.
* **Severity reflects exploitability.** Mitigations such as input validation, escaping, or platform-level access control lower severity. Developer comments explaining a deliberate trade-off are acknowledged rather than re-flagged.

Raw secret values are never echoed in findings. They are redacted.

## Configuration

Admins configure the agent from **Policies** in the dashboard:

| Setting    | Description                                                                                                            |
| ---------- | ---------------------------------------------------------------------------------------------------------------------- |
| **Name**   | Display name shown in publish readiness and run reports                                                                |
| **Status** | Enabled or disabled                                                                                                    |
| **Mode**   | **Blocking** prevents deploys when findings are present; **Advisory** reports findings without blocking                |
| **Prompt** | The policy the agent enforces. Leave the Superblocks-managed policy in place, or replace it with your own instructions |

Starting from the **General Security Review** template gives you the default policy above as an editable prompt.

## Findings

Each finding the agent reports includes:

| Field                     | Description                                                                             |
| ------------------------- | --------------------------------------------------------------------------------------- |
| **Title and description** | What the agent found, in plain language                                                 |
| **Severity**              | Critical, high, medium, low, or info, based on actual exploitability                    |
| **Category**              | The class of issue, such as a leaked secret or an injection risk                        |
| **Location**              | File and line where the issue exists                                                    |
| **Evidence**              | The specific code that triggered the finding, with secrets redacted                     |
| **Suggested fix**         | How to resolve the issue                                                                |
| **Fix with Clark**        | Available when Clark can resolve the issue by editing application code or configuration |

Findings that require credential rotation, external account changes, infrastructure work, or a human policy decision are marked as not remediable by Clark.

## Remediation flow

1. The agent runs against the application and reports findings in publish readiness
2. The builder clicks **Fix with Clark** on an eligible finding
3. Clark edits the application to resolve it
4. A fresh agent run verifies the new application state. Only a clean result unblocks publish
5. If Clark cannot remediate, the builder escalates to an admin, who can override a blocking finding when appropriate

## Runs and history

Every agent run is listed with its status (queued, running, passed, findings, blocked, errored, timed out, canceled), duration, and the findings it produced. Runs are recorded as [audit log](/admin/audit-logs) events.

## Billing

The Security Agent consumes GAUs from your organization's shared pool, the same as other Clark AI interactions. Usage appears in your [billing dashboard](/admin/self-serve-plan) under agent usage.

## Related

* [Static analysis](/admin/code-security/static-analysis)
* [CVE detection](/admin/code-security/supply-chain/cve-detection)
* [Policy Agents](/admin/policy-agents/index): agents you author for non-security policies
