Is the secret-detection catalog the engine scans with.
Is the secret-detection catalog the engine scans with.
GET /v1/security/rules
| Address | https://api.hanzo.ai/v1/security/rules |
| Method | GET |
| Operation | get_security_rules |
| Auth | Authorization: Bearer $HANZO_API_KEY |
Is 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
| Status | Body | Meaning |
|---|---|---|
200 | ruleList | ok |
200 body — 5 fields.
| Field | In | Type | Always | Description |
|---|---|---|---|---|
data | body | RuleView[] | — | Data is every rule a scan can fire, each with the id, name and severity a finding cites. |
data[].description | body | string | — | what kind of secret this rule recognises |
data[].id | body | string | — | the rule identifier a finding cites |
data[].name | body | string | — | the rule's human name |
data[].severity | body | string | — | how serious a match is: critical, high, medium or low |
Failure carries the platform error shape — see Errors.
Examples
hanzo security rulesimport { 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 := cloud.NewConfiguration()
cfg.AddDefaultHeader("Authorization", "Bearer "+os.Getenv("HANZO_API_KEY"))
client := cloud.NewAPIClient(cfg)
resp, _, err := client.SecurityAPI.GetSecurityRules(context.Background()).Execute()
if err != nil {
return err
}use hanzo_cloud::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.setRequestInterceptor(b -> b.header("Authorization", "Bearer " + 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"The door reaches security through the security tool, which names its 7 operations with its own verbs — this one among them, under a name only the door 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"
}
}
}'How is this guide?