sovereign-interceptor-patterns
Build L3 sovereign security interceptors for agent runtimes. AST scanning of agent-generated code, command allow-lists, honey-vault canary token detection, and SHA256 payload fingerprinting.
- License 许可
- Apache-2.0
- 最近更新
- 2026-11-14
- Stars
- ★ 13
- Forks
- 2
01 前言 Front Matter
- name
- sovereign-interceptor-patterns
- origin
- YAMTAM Engine v1.4.00 — internal design (Anti-Graffiti sovereign gate)
- license
- Apache-2.0
- version
- 1.0.0
- description
- Build L3 sovereign security interceptors for agent runtimes. AST scanning of agent-generated code, command allow-lists, honey-vault canary token detection, and SHA256 payload fingerprinting.
- compatibility
- claude-sonnet-4-6, claude-opus-4-7
03 SKILL.md 正文
Sovereign Interceptor Patterns
Two-stage security gate that sits above anti-injection guards: AST scan of generated code + honey-vault canary detection.
When to Use
- Building an agent system that self-generates and executes code at runtime
- Hardening an existing agent pipeline against supply-chain or code-injection attacks
- Adding canary token infrastructure to detect compromised agents early
- Auditing tool-call payloads before execution in a multi-agent swarm
Do NOT use for
- Static linting of developer-written code (use ESLint/SonarQube instead)
- Runtime performance profiling (use chrome-devtools-performance-trace)
- Replacing sandboxing — interceptor is a gate, not a jail
Stage 1: AST Scan
import { SovereignSecurityInterceptor } from 'core/gates/sovereign-interceptor.js';
const interceptor = new SovereignSecurityInterceptor({
allowedCommands: ['git', 'node', 'python3'],
});
// Scan agent-generated code before hot-loading
const result = interceptor.scanCode(agentGeneratedSource, 'agent-42:task-7');
if (!result.safe) {
// violations: [{ type: 'PROCESS_ENV_ACCESS', loc: {...} }]
throw new Error(`AST violation: ${result.violations[0].type}`);
}
Stage 2: Honey-Vault Detection
// Any payload touching STRIPE_SECRET_KEY, OPENAI_API_KEY, HONEY_* → quarantine
try {
interceptor.checkHoneyVault({ command: 'send', agentId: 'a-42', args: [somePayload] });
} catch (e) {
if (e instanceof HoneyVaultTripError) {
swarmRouter.quarantine(e.agentId, 'HONEY_VAULT_TRIP');
}
}
Command Allow-List
// Block any command not in the approved set
interceptor.verifyCommand('curl', ['https://api.example.com']); // PASS if curl in list
interceptor.verifyCommand('eval', []); // THROW SovereignBlockError
Fingerprinting for Audit Chain
const fp = interceptor.fingerprint({ command, args, agentId, ts: Date.now() });
secureLogger.logAction(agentId, command, 'PASS', { fingerprint: fp });
AST Violations Detected
| Violation | Pattern |
|---|---|
DANGEROUS_CALL |
eval(), exec(), execSync(), spawnSync() |
PROCESS_ENV_ACCESS |
process.env.* |
CHILD_PROCESS_ACCESS |
child_process.* |
PATH_TRAVERSAL_STRING |
String literals containing ../ |
HONEY_STRING_LITERAL |
Known honey-vault key names in literals |
Anti-Fake-Pass Checklist
- [ ] AST scan result
safe: truebefore executing generated code - [ ]
checkHoneyVault()called on ALL payloads, not just suspicious ones - [ ]
scanCode()called with source string, not file path (avoid TOCTOU) - [ ] Violations array inspected — not just
safeboolean - [ ]
SovereignBlockError.exitCodepropagated up to kill the pipeline
04 同仓库更多 Skills
openai--sentry--sentry
Use when the user asks to inspect Sentry issues or events, summarize recent production errors, or pull basic Sentry health data via the Sentry API; perform read-only queries with the bundled script and require `SENTRY_AUTH_TOKEN`.
ito-basket-compare
Compare Itô prediction-market baskets against a user's knowledge base, portfolio notes, financial context, watchlist, or research thesis. Use for read-only basket comparison and gap analysis without investment advice or live trading.
implementing-network-traffic-baselining
Build network traffic baselines from NetFlow/IPFIX data using Python pandas for statistical analysis, z-score anomaly detection, and hourly/daily traffic pattern profiling
detecting-evasion-techniques-in-endpoint-logs
Detects defense evasion techniques used by adversaries in endpoint logs including log tampering, timestomping, process injection, and security tool disabling. Use when investigating suspicious endpoint behavior, building detection rules for evasion tactics, or conducting threat hunting for stealthy adversary activity. Activates for requests involving evasion detection, defense evasion analysis, log tampering detection, or MITRE ATT&CK TA0005.
implementing-microsegmentation-with-guardicore
Implementing microsegmentation using Akamai Guardicore Segmentation to map application dependencies, create granular network policies, visualize east-west traffic flows, and enforce least-privilege communication between workloads across data centers and cloud.
ramdisk-tmpfs-patterns
暂无简介