Skip to main content

Scans API

Trigger and manage automated security scans.

Trigger Scan​

POST /api/v1/scans

Trigger a security scan against a target. Scans run synchronously and return results upon completion.

Request Body​

FieldTypeRequiredDescription
targetstringYesURL or resource identifier to scan
scan_typestringNodast (default), api, cloud_config
configurationobjectNoScan-specific settings

Scan Types​

TypeDescriptionScanners Used
dastDynamic application security testingWeb vulnerability scanner
apiAPI endpoint security testingAPI-specific checks
cloud_configCloud configuration reviewConfiguration scanner

Example Request​

curl -X POST https://api.clawgrc.com/api/v1/scans \
-H "Authorization: Bearer YOUR_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"target": "https://api.example.com",
"scan_type": "api"
}'

Example Response (201 Created)​

{
"id": "scan-uuid",
"org_id": "org-uuid",
"target": "https://api.example.com",
"scan_type": "api",
"status": "completed",
"results": {
"findings_count": 3,
"critical": 0,
"high": 1,
"medium": 2,
"low": 0,
"info": 0,
"duration_ms": 12450
},
"findings": [
{
"id": "finding-uuid-1",
"title": "Missing HSTS header",
"severity": "medium"
},
{
"id": "finding-uuid-2",
"title": "Insecure cookie flags",
"severity": "medium"
},
{
"id": "finding-uuid-3",
"title": "Server version disclosure",
"severity": "high"
}
],
"started_at": "2025-01-15T14:30:00Z",
"completed_at": "2025-01-15T14:30:12Z"
}

Built-in Scanners​

Claw GRC includes three built-in security scanners:

Dependency Scanner​

Checks package dependencies for known CVEs. Supports:

  • Python (requirements.txt, pyproject.toml)
  • Node.js (package.json, package-lock.json)
  • Go (go.mod)

Configuration Scanner​

Validates configurations against security baselines:

  • TLS configuration (minimum version, cipher suites)
  • HTTP security headers (HSTS, CSP, X-Frame-Options)
  • Cloud service configurations (S3 bucket policies, IAM roles)

Secrets Scanner​

Detects leaked credentials in code and configuration:

  • API keys, tokens, and passwords
  • AWS access keys
  • Private keys and certificates
  • Database connection strings

Timeouts​

Scan requests have a 60-second timeout. For large targets, the scan may return partial results.

Error Responses​

StatusDescription
400Invalid target URL or scan type
422Validation error in scan configuration
408Scan timed out

SSRF Protection​

The scan endpoint includes SSRF (Server-Side Request Forgery) protection. The following targets are blocked:

  • Private IP ranges (10.x.x.x, 172.16-31.x.x, 192.168.x.x)
  • Loopback addresses (127.x.x.x)
  • Link-local addresses (169.254.x.x)
  • Cloud metadata endpoints (169.254.169.254)