cd /news/ai-agents/airlock-egress-firewall-for-ai-agent… · home › topics › ai-agents › article
[ARTICLE · art-182117] src=github.com ↗ pub= topic=ai-agents verified=true sentiment=↑ positive

Airlock – Egress firewall for AI agents with hash-chained immutable ledger

Ramon Cortez, an AI systems architect, released Airlock, an open-source Node.js egress firewall that intercepts every outbound API call an AI agent attempts and scores it against a threat rules engine before it fires. Airlock assigns points for risky behavior — +40 for blocked HTTP methods such as DELETE, +50 for blocked endpoints including localhost, internal addresses and AWS metadata, +20 per sensitive payload field and +15 per sensitive header — and returns ALLOW below a score of 25, QUARANTINE at 25 or above and BLOCK at 40 or above, logging every verdict to an append-only SHA-256 hash-chained ledger.jsonl that the /verify endpoint checks for tampering. The zero-dependency server runs on port 3000 and ships with 13 passing tests covering safe actions, blocked methods, sensitive payloads, internal endpoints, rollback and ledger integrity.

key takeaway

Airlock scores each agent API call before it fires — +40 for blocked methods like DELETE, +50 for internal or AWS-metadata endpoints, +20 per sensitive payload field — blocking at 40 and quarantining at 25, with every verdict written to a SHA-256 hash-chained ledger checked by /verify.

read3 min views1 publishedDec 4, 2026
Airlock – Egress firewall for AI agents with hash-chained immutable ledger
Image: Michielbdejong (auto-discovered)

Egress & API Action Firewall for Autonomous AI Agents

Airlock intercepts every outbound API call an AI agent attempts to make — scoring it against a threat rules engine before it fires. Blocked and quarantined actions are logged to a tamper-evident immutable ledger. Nothing gets out without clearance.

Built to bridge threat detection and immutable state into an active defense layer.

Autonomous agents make decisions fast. Too fast. Without a firewall layer, a misconfigured agent can:

  • Exfiltrate sensitive data through an unguarded API call
  • Hit internal endpoints it was never meant to reach
  • Fire DELETE requests that can't be undone
  • Leak credentials or tokens in outbound payloads

Airlock stops all of that — before it happens.

Agent Action Request
        │
        ▼
┌───────────────────┐
│   Airlock Server  │  POST /intercept
│                   │
│  ┌─────────────┐  │
│  │ Rules Engine │  │  Scores: method, endpoint, payload, headers
│  └──────┬──────┘  │
│         │         │
│  ┌──────▼──────┐  │
│  │   Verdict   │  │  ALLOW / QUARANTINE / BLOCK
│  └──────┬──────┘  │
│         │         │
│  ┌──────▼──────┐  │
│  │   Ledger    │  │  Append-only, hash-chained, tamper-evident
│  └─────────────┘  │
└───────────────────┘
        │
        ▼
  200 ALLOW or 403 BLOCK
Method Route Description
POST /intercept Evaluate an action before it fires
POST /rollback Trigger rollback on a previously allowed action
GET /ledger Read the full immutable action log
GET /verify Verify ledger integrity (hash chain check)
GET /health Health check
git clone https://github.com/rcortez056-spec/airlock.git
cd airlock
node src/index.js

Server starts on port 3000 (configurable via PORT env var).

curl -X POST http://localhost:3000/intercept \
  -H "Content-Type: application/json" \
  -d '{
    "method": "POST",
    "endpoint": "https://api.example.com/submit",
    "payload": { "data": "clean payload" },
    "agent_id": "my-agent",
    "source": "relevance-ai"
  }'

ALLOW response (200):

{
  "allowed": true,
  "verdict": "ALLOW",
  "score": 0,
  "reasons": [],
  "ledger_id": "uuid-here",
  "timestamp": "2026-12-04T..."
}

BLOCK response (403):

{
  "allowed": false,
  "verdict": "BLOCK",
  "score": 75,
  "reasons": ["Blocked endpoint pattern: /localhost/", "Endpoint failed format validation"],
  "ledger_id": "uuid-here",
  "timestamp": "2026-12-04T..."
}
curl -X POST http://localhost:3000/rollback \
  -H "Content-Type: application/json" \
  -d '{ "ledger_id": "uuid-of-action", "reason": "Agent misfired" }'
curl http://localhost:3000/verify
Trigger Score Added
Blocked HTTP method (DELETE) +40
Blocked endpoint (localhost, internal, AWS metadata) +50
Sensitive field in payload (api_key, secret, token, etc.) +20 each
Sensitive field in headers +15 each
Endpoint fails format validation +25

Thresholds:

  • BLOCK → score ≥ 40
  • QUARANTINE → score ≥ 25
  • ALLOW → score < 25

Every intercepted action is logged to ledger.jsonl as an append-only, hash-chained record. Each entry includes:

  • Unique ID and timestamp
  • Hash of the previous entry (tamper-evident chain)
  • Verdict, score, and reasons
  • Action metadata (method, endpoint, agent_id, payload size)

The /verify endpoint checks the full chain and reports any tampering.

node src/test.js

All 13 tests pass. Covers: safe actions, blocked methods, sensitive payloads, internal endpoints, rollback, and ledger integrity.

  • Runtime: Node.js (zero dependencies)
  • Storage: Append-only JSONL ledger
  • Integrity: SHA-256 hash chain
  • Transport: HTTP (deploy behind your existing infrastructure)

Built by Ramon Cortez — AI Systems Architect

Part of the autonomous defense stack alongside:

  • GitBridge AI — GitHub event automation
  • Sentinel Guard Engine — pre-execution safety layer
  • Email Threat Detector — AI triage pipeline
── more in #ai-agents 4 stories · sorted by recency
── more on @airlock 3 stories trending now
sponsored brought to you by zahid.host 4,200+ EU-deployed projects
reading about agents? ship yours in a single git push.

Run your AI side-project on zahid.host

EU-based hosting, git-push deploys, automatic HTTPS, no cold starts. Free tier with a custom domain — perfect for shipping the agent you just read about.

$git push zahid main
→ Live at https://your-agent.zahid.host ✓
Get free account → Pricing
from €0/mo · no card required
LIVE [news/airlock-egress-firew…] indexed:0 read:3min 2026-12-04 · —