Skip to main content

Verification Checklist

After integrating Sec0, confirm each layer is working:

Instrumentation

  • initializeSec0App() or loadStandardConfig() completes without errors
  • Decorated methods execute and return results normally
  • Audit files appear in the configured appenderDir

Middleware

  • sec0SecurityMiddleware(options)(server) wraps without errors
  • Tool calls succeed and audit envelopes are written to sec0.dir
  • Registry freeze is active (registering new tools after wrapping throws)

Gateway

  • startGatewayServer() binds to the configured port
  • POST /mcp/:server/:tool@version returns valid responses
  • Response headers include x-trace-id and x-span-id
  • Audit envelopes are written for each gateway call

Adaptive Approvals

  • Policy includes security.side_effects.human_escalation for the intended scope
  • Policy includes security.side_effects.approve_high_risk: true
  • enforcement.escalate_on is set (or omitted so it falls back to enforcement.deny_on)
  • Denied responses include escalation_id and escalation_status when escalation is created
  • Audit envelopes include escalation_id for escalated denials

Audit Output

Check your configured audit directory for daily-rotated files:
Each line is a valid JSON envelope:

Common Errors

[sec0] Config file not found

Cause: sec0.config.yaml is missing or the path is incorrect. Fix: Ensure the file exists and the path is correct:

[sec0] localDir is required

Cause: Missing localDir in configuration or controlPlane.sec0Dir in standard config. Fix: Add an absolute path:

[sec0] localSignerPath is required

Cause: Missing or invalid signing key path. Fix:
  1. Generate a key:
  1. Set the key path in config:

[sec0] Signing key file not found

Cause: The key file doesn’t exist at the configured path. Fix: Verify the file exists and has proper permissions:

[sec0] No hop configuration found for "ClassName.method"

Cause: The decorator can’t find a matching entry in app.hops. Fix: Add the hop entry to sec0.config.yaml:

[sec0] app.environment must be dev, staging, or prod

Cause: Invalid environment value. Fix: Set app.environment to one of dev, staging, or prod.

Control Plane Errors

  • API key validation failed: Verify your SEC0_API_KEY is valid and the control plane is reachable
  • controlPlaneUrl could not be resolved: Set SEC0_CONTROL_PLANE_URL environment variable or configure controlPlane.apiBaseUrl
  • Policy fetch fails: Ensure auth.apiKey or auth.bearerToken is set when using control-plane policy source

Gateway Errors

  • audit.append must be a function: Pass a valid Sec0Appender instance
  • quotas adapter required: Use InMemoryAdapter for development
  • Missing x-idempotency-key: The gateway requires this header on all requests

Approvals Errors

  • no_approvers_configured: Human review is required, but no reviewer group resolved for this request.
  • Frequent timeout decisions: Increase reviewer coverage or adjust strategy/quorum values in human_escalation.
  • Unexpected approvals/rejections: Re-check required_roles, veto_roles, and timeout_action in policy.
  • Missing escalation_id on denied responses: Verify approve_high_risk is enabled and the denial reason is included in enforcement.escalate_on (or enforcement.deny_on when escalate_on is not set).

Middleware Errors

  • REGISTRY_FROZEN: Cannot register new tools after wrapping. Register all tools before calling sec0SecurityMiddleware(options)(server)
  • HANDLER_SWAP: A tool handler was reassigned after wrapping. This is blocked for integrity
  • Cannot read properties of undefined (reading 'serviceName'): otel config is missing. Include otel.endpoint, otel.serviceName, and otel.environment in middleware options.

Environment Variables

Debug Tips

Enable Debug Logging

Inspect Audit Envelopes

Verify Signing

If issues persist, cross-check your configuration against the reference pages: