AegisCore

io.github.Sandeep-Hipparagi由 GitHub 帳號 Sandeep-Hipparagi 發布v0.1.3更新於 Oct 25, 2026

Deterministic zero-trust policy enclave and cryptographic WORM audit ledger for MCP tools.

發布方自己的服務:core.blue

已驗證STDIO僅桌面開發者工具安全與監控

概覽

AI 產生的概覽

AegisCore 是本地 stdio MCP 伺服器,作為零信任策略閘道,以確定性規則檢核 AI 代理的工具呼叫,並寫入防竄改稽核帳本。

可以做什麼
  • 攔截代理的工具呼叫意圖,在執行前依嚴格 schema 與確定性策略不變量進行檢核
  • 對 PAN、Aadhaar、電話、電子郵件等個人識別資訊做在途權杖化,並支援保險庫銷毀以實現刪除
  • 將每次決策寫入僅可追加的 SHA-256 Merkle 鏈稽核帳本,並可驗證其完整性
  • 把高風險動作掛起為待處理的人工審核(HITL)挑戰,直到審核人簽署
  • 在隔離沙箱中執行已核准的動作,清除環境變數並設定強制逾時
  • 套用內建策略包:DPDP 資料保護、金融交易上限、銀行轉帳上限與破壞性 DDL 攔阻
適用情境
當代理可存取資料庫、支付 API 或客戶紀錄等敏感後端,而你希望以確定性、可稽核的關卡取代提示詞護欄時使用。也適合需要合規稽核紀錄或高額動作人工核准的團隊。
執行需求
以 stdio 本機程序執行,可透過 npm 套件以 npx 啟動,或使用 Python 套件;README 中 Claude Desktop 與 Cursor 的範例是以 node 啟動本機腳本。未宣告驗證、環境變數或標頭。HTTP 閘道模式監聽本機連接埠(例如 8080)。
安裝前請注意
它位於代理與真實系統之間,策略設定不當可能誤擋正常操作,或過於寬鬆而放行動作。已核准的動作仍會觸及真實資料庫、支付閘道與 API,內建策略涉及轉帳上限與制裁名單檢查。README 中的稽核、效能基準與認證結論皆為專案自述,採用前應自行查證。

安裝

在 SourceWeft 中

  1. 開啟 儀表板中的 AegisCore,將其新增到工作區。
  2. 為需要使用其工具的對話啟用該服務。

Desktop only,透過 STDIO。 STDIO 服務會啟動本機處理程序,因此需要 SourceWeft 桌面主機。

其他 MCP 客戶端

參照 儲存庫 中的啟動說明。

README

🛡️ AegisCore: The Zero-Trust Deterministic Governance Enclave for AI Agents

[npm version] [npm sdk] [PyPI version] [License] [CI] [Zero-Trust] [DPDP Ready] [Security Policy] [Changelog]

AegisCore is an open-source reverse-proxy, deterministic invariant policy enclave, and cryptographic WORM audit ledger for autonomous AI agents. It intercepts model tool calls, validates them against strict schemas and deterministic invariants, and only executes approved actions within an isolated boundary.


📺 Terminal Showcases & Scenario Deep-Dives

[AegisCore Deterministic Gateway Overview]

🎯 Focused Scenario Showcases (Click to Expand)
Scenario 01: Model Tool Hijack & Data Exfiltration Defense

Threat Vector: Indirect prompt injection instructs an autonomous agent to dump users.credentials.
AegisCore Defense: Deterministic boundary rejection in $<2\text{ ms}$ with 0 CPU cycles or sockets opened to the host database.

[Scenario 1: Model Hijack Intercept]

Run live: node --experimental-strip-types scripts/demo-scenario-1.js


Scenario 02: In-Flight DPDP PII Masking & Cryptographic Shredding

Threat Vector: Agent processes personal identifiers (Indian PAN / Aadhaar), conflicting with statutory Right to Erasure under India's DPDP Act.
AegisCore Defense: In-flight salted tokenization before WORM ledgering. shredVault() enforces complete erasure while preserving 100% of the cryptographic Merkle chain.

[Scenario 2: In-Flight DPDP PII Masking]

Run live: node --experimental-strip-types scripts/demo-scenario-2.js


Scenario 03: Cryptographic Merkle Chain & Tamper-Evident Audit

Threat Vector: Retrospective tampering of agent execution logs to conceal unauthorized actions.
AegisCore Defense: Write-Once-Read-Many (WORM) append-only ledger with cryptographic SHA-256 block traversal back to Genesis. Any bit alteration breaks chain validation.

[Scenario 3: Tamper-Evident WORM Audit]

Run live: node --experimental-strip-types scripts/demo-scenario-3.js


📦 Developer Packages & Distribution

PackageLanguage / ProtocolStatusDescription
@aegiscore-ai/coreNode.js / TypeScript (v0.1.3)AvailableCore deterministic engine, WORM ledger, bundled policies, and HTTP gateway daemon
@aegiscore-ai/sdkTypeScript (v0.1.3)AvailableZero-dependency client for OpenAI tool calls, LangGraph, and MCP with full parity
aegiscore-aiPython (>=3.8, v0.1.3)AvailableZero-dependency Python client for LangGraph, CrewAI, AutoGen (pip install aegiscore-ai)
MCP Registry ServerMCP Registry (v0.1.3)CertifiedOfficial MCP Registry server (io.github.Sandeep-Hipparagi/aegiscore)
MCP AdapterJSON-RPC StdioAvailableNative sidecar for Claude Desktop, Cursor, and LibreChat
DPDP GuideDocumentationCompleteIndia DPDP Act 2023 compliance architecture & cryptographic shredding
Security PolicySecurity & DisclosureActiveVulnerability disclosure SLAs, disclosure address, and runtime invariants
ChangelogRelease Historyv0.1.3Keep-a-Changelog history, security hardening, and test parity log
Audit ReportSecurity & AuditCertified (v0.1.2)External production readiness audit, DevSecOps report & empirical benchmarks
Show HNCommunityReadyHacker News launch narrative & technical breakdown

⚡ Empirical Performance & Security Audit (v0.1.2)

AegisCore underwent an end-to-end production readiness audit, fault isolation analysis, high-concurrency stress testing, and adversarial penetration testing probing (SkillSpector static analysis & PentAGI-style adversarial evasion probes). Read the complete audit and verification report in AUDIT_REPORT.md.

Verified Micro-Benchmarks (v0.1.2)

Benchmark MetricMeasurementOperational Impact
Cold Start Time0.291 msInstant container startup with zero JVM/Python runtime warm-up
P50 (Median) Pipeline Overhead58.2 µs (0.058 ms)Negligible sub-millisecond impact on agentic loop latency
Average Execution Overhead78.1 µs (0.078 ms)Full invariant verification, PII tokenization, and Merkle chaining
In-Memory Gateway Throughput>12,500 req/secSustained high-concurrency event loops without thread contention
Memory Footprint Delta (1k reqs)+1.30 MB HeapHighly bounded GC pressure suitable for memory-constrained edge sidecars
WORM Ledger Tamper Detection100% DeterministicPinpoints exact mutated entry index from Genesis hash pointer
SkillSpector Security Score0 Risk Score (0 findings)Certified compliant with the official Model Context Protocol Registry

[!TIP] Production Readiness Score: 9.8 / 10 (Enterprise), 9.9 / 10 (Startup), 9.9 / 10 (OSS).
Remediations across SEC-01 through SEC-09 (prototype pollution defense, deep nesting DoS protection, persistent session rate-limiting, fail-closed CLI audit verification, lowercase PII tokenization, case-insensitive sanctions enforcement, and non-positive/non-finite transfer boundaries) are verified with 100% test pass rates in Release v0.1.2. See AUDIT_REPORT.md.


⚡ The Core Problem: Why Prompt Guardrails Fail

Modern AI agent architectures couple model intent directly to tool execution. Developers pass raw database connections, payments API credentials, and write privileges directly to the LLM agent runtime:

[User / Jailbreak Prompt] ──> [LLM Model Weights] ──> [Direct Tool Execution] ──> 🔥 Disaster

Why prompt guardrails cannot guarantee security:

  1. Probabilistic Non-Determinism: System prompts ("Never delete user records") are probabilistic suggestions, not mathematical guarantees. Adversarial jailbreaks, indirect prompt injections, and context drift routinely bypass prompt instructions.
  2. Credential Proliferation: Giving tools directly to the agent exposes infrastructure secrets, database passwords, and third-party API keys to the model runtime.
  3. Irreversible Mutations: Once an LLM hallucinates an out-of-bounds transfer or destructive DROP TABLE, the damage is irreversible.

The AegisCore Solution: Strict Intent-Execution Decoupling

AegisCore strips all execution power from the agent. The agent produces only an Intent Proposal. AegisCore evaluates the proposal through a deterministic, zero-trust policy enclave before any downstream code is triggered:

                                  AEGIS-CORE GATEWAY ENCLAVE                             ┌────────────────────────────────────────┐                             │ 1. DPDP PII Tokenizer & Vault          │                             │ 2. Strict Schema Quarantine            │[Agent Intent] ──(Proposal)──>│ 3. Invariant Engine (Rate / Bounds)   │──(Only if APPROVED)──> [Isolated Execution Boundary]                             │ 4. WORM Cryptographic Merkle Chain    │                          │ (Sanitized Env / Timeout)                             │ 5. Asynchronous HITL Escalation Gating │                          ▼                             └────────────────────────────────────────┘                 [Real Backend / DB / API]

📊 Core Architecture

text
               +-------------------------------------------------------------+               |                       AI AGENT LOOP                         |               |             (LangGraph / MCP / Raw OpenAI)                  |               +-------------------------------------------------------------+                                              |                                     (POST /v1/gateway/dispatch)                                              v+-------------------------------------------------------------------------------------------+|                                 AEGIS-CORE GATEWAY PIPELINE                               ||                                                                                           ||  [Step 1: PII Sanitizer]   ──> Detects PAN, Aadhaar, Phone, Email & tokenizes via salt     ||  [Step 2: Schema Validate] ──> Enforces strict types; extra fields fail closed            ||  [Step 3: Policy Engine]   ──> Invariants: param_boundary, rate_limit, disallowed_targets  ||                                                                                           ||       |                              |                                       |            ||       | (BLOCKED)                    | (REQUIRES_HITL)                       | (APPROVED) ||       v                              v                                       v            ||  [WORM Ledger Entry]        [HITL Challenge Created]                   [WORM Ledger Entry]||  Return 403 Forbidden       Wait for Supervisor Signoff               Dispatch to Sandbox |+------------------------------------------------------------------------------|------------+                                                                               v                                                          +---------------------------------+                                                          |    ISOLATED SANDBOX RUNNER      |                                                          |  - process.env secrets scrubbed |                                                          |  - Hard safety timeout abort    |                                                          |  - Stack trace leak isolation   |                                                          +---------------------------------+                                                                               |                                                                               v                                                                  [Protected Real System]

📐 Architectural Execution Flow: sdk/ ➔ core/ ➔ policies/

AegisCore decouples probabilistic model decisions from irreversible execution by routing every tool call through a deterministic enclave. The monorepo architecture cleanly separates client bindings (sdk/), gateway runtime (core/ & src/), and declarative security invariants (policies/):

mermaid
flowchart TD    subgraph ClientSDK["Client Enclave Layer (sdk/ & sdk/python)"]        Agent["AI Agent Loop<br/>(LangGraph / CrewAI / OpenAI)"]        AegisClient["AegisClient<br/>(Persistent Session ID, Nonce, Intent Framing)"]        Agent -->|"Tool Call Intent"| AegisClient    end
    subgraph CoreGateway["AegisCore Deterministic Gateway (core/ & src/)"]        Pipeline["Gateway Pipeline (src/gateway/pipeline.ts)<br/>⚡ Cold Start: 0.291 ms"]        PII["Step 1: DPDP Tokenizer (src/privacy/sanitizer.ts)<br/>⚡ Latency: ~12.4 µs"]        Schema["Step 2: Schema Quarantine (src/validator/)<br/>⚡ Latency: ~18.6 µs"]        Engine["Step 3: Invariant Engine (src/policy/engine.ts)<br/>⚡ Latency: ~27.2 µs"]        WORM["Step 4: WORM Audit Ledger (src/audit/ledger.ts)<br/>⚡ Latency: ~19.9 µs"]        HITL["Step 5: HITL Interceptor (src/hitl/interceptor.ts)<br/>Async Ticket Signature"]        Sandbox["Step 6: Ephemeral Sandbox (src/executor/)<br/>process.env Scrubbed | Hard Timeout"]                AegisClient -->|"HTTP POST /v1/gateway/dispatch"| Pipeline        Pipeline --> PII        PII --> Schema        Schema --> Engine    end
    subgraph Policies["Declarative Invariant Packs (policies/)"]        DPDP["dpdp-india.json<br/>(PII Tokenization & DPO Authorization)"]        Fintech["fintech-guardrails.json<br/>(Bounds & Dual-Custody Approval)"]        Banking["banking-policy.json<br/>(Transfer Ceilings & Sanctions)"]        DataGov["data-governance.json<br/>(DDL Quarantine: DROP/TRUNCATE)"]                Engine <-->|"Zero-Trust Rule Matching"| DPDP        Engine <-->|"Zero-Trust Rule Matching"| Fintech        Engine <-->|"Zero-Trust Rule Matching"| Banking        Engine <-->|"Zero-Trust Rule Matching"| DataGov    end
    Engine -->|"BLOCKED (e.g. Sanctions, DDL)"| WORM    WORM -->|"403 Forbidden Response"| AegisClient        Engine -->|"REQUIRES_HITL (> $25,000)"| HITL    HITL -->|"Pending Ticket"| AegisClient
    Engine -->|"APPROVED (Valid Invariants)"| WORM    WORM --> Sandbox    Sandbox -->|"Protected Execution"| Target["Protected DB / Payment Gateways / APIs"]
⏱️ Gateway Interception Latency Breakdown
Execution StageComponentP50 (Median)Max OverheadSecurity Guarantee
0. Container WarmupProcess Bootstrap0.291 ms<0.5 msSub-millisecond cold start with zero runtime dependencies
1. PII Sanitizationsrc/privacy/sanitizer.ts12.4 µs18 µsIn-flight PAN/Aadhaar tokenization; cryptographic shredding
2. Schema Quarantinesrc/validator/schemaValidator.ts18.6 µs25 µsDeep nesting guard (depth <= 32); prototype pollution rejection
3. Policy Matchingsrc/policy/engine.ts27.2 µs35 µsMathematical invariants, rate limits, DDL quarantine (policies/)
4. Cryptographic Chainingsrc/audit/ledger.ts19.9 µs28 µsSHA-256 Merkle chaining back to Genesis; single-bit tamper detection
Total Enclave OverheadFull Pipeline Interception58.2 µs (0.058 ms)78.1 µsNegligible sub-millisecond impact on agentic execution loop

🚀 60-Second Quickstart

Option A: Local CLI

bash
# Clone and verifygit clone https://github.com/Sandeep-Hipparagi/aegis-core.gitcd aegis-core
# Run full test suite (73 TypeScript tests + 15 Python tests across 24 suites)npm testnpm run test:python
# Start HTTP Gateway daemon on port 8080node --experimental-strip-types bin/aegis.ts start --port 8080

Option B: Docker Compose

bash
# Spin up AegisCore gateway with persistent audit volumedocker compose up -d
# Check healthcurl http://localhost:8080/health# {"status":"healthy","version":"0.1.1"}

Option C: Run Banking Invariant Demonstration

bash
npm run demo:banking

🧩 Model Context Protocol (MCP) Integration

AegisCore provides a native stdio Model Context Protocol (MCP) server.

Claude Desktop Setup

Add AegisCore to your Claude Desktop configuration (claude_desktop_config.json):

macOS / Linux:

json
{  "mcpServers": {    "aegiscore": {      "command": "node",      "args": ["--experimental-strip-types", "/path/to/AegisCore/bin/aegis.ts", "mcp"]    }  }}

Windows:

json
{  "mcpServers": {    "aegiscore": {      "command": "node",      "args": ["--experimental-strip-types", "C:\\Users\\username\\Downloads\\AegisCore\\bin\\aegis.ts", "mcp"]    }  }}

Cursor IDE Setup

In Cursor Settings ➔ Features ➔ MCP Servers ➔ Add New MCP Server:

  • Name: AegisCore
  • Type: command
  • Command: node --experimental-strip-types <PATH_TO_AEGISCORE>/bin/aegis.ts mcp

💎 Feature Matrix

FeatureAegisCore GuaranteeTraditional Prompt Guardrails
Schema QuarantineFail-closed. Extra or injected fields throw REJECTED_SCHEMA immediately.Vulnerable to prompt injection parameter smuggling.
Invariant Policy EngineDeterministic. Mathematical rules (e.g., amount <= 10000, max 5 calls/min).Probabilistic instructions that degrade with conversation length.
DPDP ComplianceAutomated. Aadhaar, PAN, phone numbers & emails tokenized; vault shredding.Raw PII permanently leaked into model context & logs.
WORM Audit LedgerCryptographic Merkle Chain. SHA-256 hash chaining detects any tampering.Mutable, unchained plain text log files.
Ephemeral SandboxScrubbed Environment. process.env stripped of keys; timeout guards.Full environment and network socket access given to LLM.
Async HITL GatingCryptographic Gating. High-risk actions held in PENDING state until signed."Please ask user" prompts easily bypassed by prompt injection.

🛡️ Pre-Configured Policy Packs

AegisCore ships with enterprise policy packs in /policies:

  • policies/dpdp-india.json: Enforces India's Digital Personal Data Protection Act. Restricts bulk customer data exports, blocks unmasked identity table access, and requires Data Protection Officer authorization for customer profile purges.
  • policies/fintech-guardrails.json: Enforces transaction ceilings, whitelists operating currencies (USD, EUR, INR, GBP), and requires dual-custody supervisor approval for transactions over $25,000.
  • policies/banking-policy.json: Limits autonomous transfers to $10,000, blocks sanctioned/blacklisted destinations, and escalates mid-value transfers.
  • policies/data-governance.json: Prohibits destructive DDL statements (DROP TABLE, TRUNCATE) and unauthorized account deletions.

📜 HTTP Gateway API Reference

POST /v1/gateway/dispatch

Submit an intent proposal for evaluation and execution.

bash
curl -X POST http://localhost:8080/v1/gateway/dispatch \  -H "Content-Type: application/json" \  -d '{    "tool": "transfer_funds",    "parameters": {      "amount": 250,      "recipient": "ACC-SUPPLIER-01"    },    "context": {      "sessionId": "sess-prod-001",      "agentId": "copilot-agent",      "role": "finance-operator"    }  }'

POST /v1/hitl/challenges/:ticketId/resolve

Resolve a pending Human-in-the-Loop approval challenge.

bash
curl -X POST http://localhost:8080/v1/hitl/challenges/hitl-uuid-1234/resolve \  -H "Content-Type: application/json" \  -d '{    "decision": "APPROVED",    "approverSignature": "sig-compliance-officer-99"  }'

GET /v1/audit/integrity

Cryptographically verify ledger Merkle chain integrity.

bash
curl http://localhost:8080/v1/audit/integrity# {"isValid":true}

🤝 Contributing

We welcome community contributions! Please review CONTRIBUTING.md for local environment setup, zero-trust invariants, and pull request guidelines.


📄 License

Licensed under the Apache License 2.0. See LICENSE for details.

來源:README.md,提交 486f16b

工具

0
SourceWeft 曾在隔離沙箱中以無憑證方式啟動該軟體包一次,以列出其工具,但未能完成:伺服器未能啟動。

版本歷史

1
  1. v0.1.3最新Oct 25, 2026

評分

已滿足適用檢查項的 40%

該評分衡量此收錄條目的完整程度,依據註冊中心條目、端點與公開來源計算得出。它不是對伺服器本身的評價,也不表示伺服器安全或目前可用:可連通性是帶日期的檢查結果,評分也不包含安裝量或使用者評價。

  • 近 30 天內可連通25 分

    請保持端點能夠回應 MCP 握手;SourceWeft 每 30 天探測一次。

  • 已宣告認證方式10 分

    請在註冊中心條目中宣告憑證請求標頭,或保持端點能夠回應探測,以便判定其認證方式。

  • 已列出工具15 分

    請讓伺服器在無憑證時回應 tools/list,或發布可在沙箱中無憑證啟動的軟體包。

  • 描述必需15 分
  • 圖示10 分
  • 文件15 分
  • 授權條款10 分

    請在儲存庫或註冊中心條目中宣告授權條款。

其他 Core 整合