01What HazelJS covers
- Tool authorization (allow / deny / require-approval)
- Least privilege via explicit policies and Skillgate skill sets
- Secrets: hazel secret set/delete/has against hazeld EncryptedFileSecretStore
- Isolation: agents run in your Node process / local node — design isolation accordingly
- Audit trails: AgentRun timelines and CLI logs
- Sensitive operations: Gatekeeper + HITL approval queues
- Cross-agent calls: still go through tool authorization
02Related app security
HTTP-level headers, CSRF, and rate limits for the broader HazelJS app stack are documented in the security guide. Content/PII filters live in @hazeljs/guardrails when you opt in.
03Gatekeeper policy sketch
typescript
import { AgentGatekeeper, fromFunction } from '@hazeljs/agent-gatekeeper';
const gatekeeper = new AgentGatekeeper({
policies: [
fromFunction('refunds.create', async (ctx) =>
ctx.amount > 50 ? 'require-approval' : 'allow',
),
],
});