Skip to content

Gateway de seguridad

Documentación en español de Gateway de seguridad, alineada con el monorepo y la guía inglesa.

Entrada rápida

entry_1 → SHA256(prev_hash | entry_1) → hash_1
entry_2 → SHA256(hash_1 | entry_2) → hash_2
typescript
// buildSandboxedLoadContext() — only for third-party plugins
const sandboxContext = {
  registerHook: enforcer.wrapRegisterHook(...),
  readFile: enforcer.wrapReadFile(...),
  writeFile: enforcer.wrapWriteFile(...),  // mode 0o600
  fetch: enforcer.wrapFetch(...),          // domain + port check
  getEnvVar: enforcer.wrapGetEnvVar(...),
  getConfig: enforcer.wrapGetConfig(...),
  log: enforcer.wrapLog(...),
};
// hookManager is NOT included — prevents privilege escalation
LayerNamePurpose
1Zero-Trust SignatureIntegrity verification + replay prevention
2AuthenticationAPI Key validation with timing-safe comparison
3Rate LimitingGlobal token bucket + tiered IP limits
4Input ScanningContent injection detection + input validation
5Cost Pre-CheckBill explosion prevention (pre-call estimation)
6Request ProcessingBusiness logic execution
7Output ScanningDLP data leak prevention + cost recording
PatternExample
API Keysk-..., sk-ant-...
JWTeyJ...
Private Key (PEM)-----BEGIN PRIVATE KEY-----
Credit Card (Luhn)4111 1111 1111 1111
SSN123-45-6789
Emailuser@example.com
Phone+1-555-0123
Internal IP10.0.0.1, 192.168.1.1
Database Connection Stringmongodb://user:pass@host:port
AWS/GCP/Azure CredentialsAKIA..., AIza...
China ID Card (checksum)110101199003077735
Bank AccountNumeric with branch code

Notas

  • CLI monorepo: cliEntry.ts · tras build: commander
  • Métricas: 25 proveedores · 5 topologías · 18 tools · 6700+ tests
  • Firmas API exactas: monorepo / API overview

Relacionado

MIT — Hecho para orquestación multi-agente.