List rules

The secret-detection catalog the engine scans with.

GET /v1/security/rules

Addresshttps://api.hanzo.ai/v1/security/rules
MethodGET
Operationget_security_rules
AuthAuthorization: Bearer $HANZO_API_KEY

The secret-detection catalog the engine scans with.

It returns every rule a scan can fire — the id, name and severity a finding cites — so a caller can render or triage results without hard-coding the catalog. It is the same for everyone and discloses nothing tenant-specific, so it carries no org scope.

Request

GET /v1/security/rules takes no parameters and no body — the credential is the whole request.

Response

StatusBodyMeaning
200security.ruleListok
defaultproblem-detailsrefused

200 body — 5 fields.

FieldInTypeAlwaysDescription
databodysecurity.RuleView[]—Data is every rule a scan can fire, each with the id, name and severity a finding cites.
data[].descriptionbodystring—what kind of secret this rule recognises
data[].idbodystring—the rule identifier a finding cites
data[].namebodystring—the rule's human name
data[].severitybodystring—how serious a match is: critical, high, medium or low

Failure carries the platform error shape — see Errors.

Examples

hanzo security rules
import { Configuration, SecurityApi } from 'hanzoai';

const api = new SecurityApi(new Configuration({ accessToken: process.env.HANZO_API_KEY }));
const { data } = await api.getSecurityRules();
from hanzoai.cloud import ApiClient, Configuration
from hanzoai.cloud.api import SecurityApi

client = ApiClient(Configuration(access_token=os.environ["HANZO_API_KEY"]))
result = SecurityApi(client).get_security_rules()
cfg := hanzoai.NewConfiguration()
cfg.AddDefaultHeader("Authorization", "Bearer "+os.Getenv("HANZO_API_KEY"))
client := hanzoai.NewAPIClient(cfg)

resp, _, err := client.SecurityAPI.GetSecurityRules(context.Background()).Execute()
if err != nil {
	return err
}
use hanzo_client::apis::{configuration::Configuration, security_api};

let mut cfg = Configuration::new();
cfg.bearer_access_token = std::env::var("HANZO_API_KEY").ok();

let result = security_api::get_security_rules(&cfg, Default::default()).await?;
import ai.hanzo.cloud.ApiClient;
import ai.hanzo.cloud.api.SecurityApi;

ApiClient client = new ApiClient();
client.setBearerToken(System.getenv("HANZO_API_KEY"));

var result = new SecurityApi(client).getSecurityRules();
curl https://api.hanzo.ai/v1/security/rules \
  -H "Authorization: Bearer $HANZO_API_KEY"

MCP reaches security through the security tool, which names its 7 operations with its own verbs — this one among them, under a name only MCP declares. describe explains any of them:

curl -X POST https://api.hanzo.ai/v1/mcp \
  -H "Content-Type: application/json" \
  -d '{
       "jsonrpc": "2.0",
       "id": 1,
       "method": "tools/call",
       "params": {
         "name": "describe",
         "arguments": {
           "op": "list_security_findings"
         }
       }
     }'

Security API · All Hanzo APIs · Interactive reference

Was this page useful?