智能防火墙 是 AI Skill Hub 本期精选Agent工作流之一。综合评分 8.0 分,整体质量较高。我们强烈推荐将其纳入你的 AI 工具库,帮助提升工作效率。
基于eBPF/BPF-LSM的语义防火墙,强化AI安全
智能防火墙 是一套完整的 AI Agent 自动化工作流方案。通过可视化的节点编排,将复杂的多步骤任务拆解为清晰的自动化流程,实现全程无人值守的智能处理。支持与数百种外部服务和 API 无缝集成,适合构建数据处理管线、业务自动化和 AI 辅助决策系统。
基于eBPF/BPF-LSM的语义防火墙,强化AI安全
智能防火墙 是一套完整的 AI Agent 自动化工作流方案。通过可视化的节点编排,将复杂的多步骤任务拆解为清晰的自动化流程,实现全程无人值守的智能处理。支持与数百种外部服务和 API 无缝集成,适合构建数据处理管线、业务自动化和 AI 辅助决策系统。
# 方式一:cargo install(推荐) cargo install the-jinn-guard # 方式二:从源码编译 git clone https://github.com/AlphaReasoning/The-Jinn-Guard cd The-Jinn-Guard cargo build --release # 二进制在 ./target/release/the-jinn-guard
# 查看帮助 the-jinn-guard --help # 基本运行 the-jinn-guard [options] <input> # 详细使用说明请查阅文档 # https://github.com/AlphaReasoning/The-Jinn-Guard
# the-jinn-guard 配置说明 # 查看配置选项 the-jinn-guard --config-example > config.yml # 常见配置项 # output_dir: ./output # log_level: info # workers: 4 # 环境变量(覆盖配置文件) export THE_JINN_GUARD_CONFIG="/path/to/config.yml"
Jinn Guard is an asynchronous, kernel-aware semantic firewall designed to enforce mathematical safety constraints on autonomous AI agents before any tool execution is permitted. It intercepts high-level natural language intents and processes them through a lifetime-anchored Z3 SMT solver pipeline — verifying state transitions and risk ceilings against formalized compliance models before granting or denying execution authority.
Operating locally over high-throughput UNIX domain sockets, the platform binds user-space proxy validation with low-level eBPF kernel telemetry and namespace tracking to enforce zero-trust process isolation and anti-replay protection for governed cgroups.
- Linux kernel 5.16+ - CONFIG_BPF_LSM=y - bpf present in the active LSM list (cat /sys/kernel/security/lsm) - Debian cloud kernels often have it pre-armed. - Ubuntu does not — append bpf to the existing list via the lsm= boot parameter, then update-grub and reboot. For example, in /etc/default/grub:
GRUB_CMDLINE_LINUX="lsm=lockdown,capability,landlock,yama,apparmor,ima,evm,bpf"
(List the modules already in /sys/kernel/security/lsm plus bpf; an explicit lsm= replaces the kernel default, so include the full set.) - rpm-ostree / immutable hosts should not hand-edit grub. On a booted ostree host, stage the full active LSM set plus bpf declaratively: sudo deploy/arm-lsm-ostree.sh
sudo systemctl reboot
The helper prints the exact rpm-ostree kargs change before applying it and prints the one-line revert (rpm-ostree kargs --delete=lsm=...; or rpm-ostree rollback before reboot). Off ostree hosts, it is a no-op. On daemon startup, the audit chain records a boot marker with the booted ostree commit, kernel release, and ostree/non-ostree flag. rpm-ostree provides platform immutability; it does not perform Jinn Guard action blocking. - bpftool installed for vmlinux.h generation (Debian: bpftool; Ubuntu: linux-tools-generic)
Validated on three distributions / three kernel generations: Debian 13 / kernel 6.12 (BENCHMARKS-01.md, BENCHMARKS-02.md), Ubuntu 24.04 / kernel 6.17 (BENCHMARKS-03.md), and AlmaLinux 9 / kernel 5.14 under SELinux Enforcing (BENCHMARKS-04.md).
---
```bash
sudo apt install clang llvm libbpf-dev linux-headers-$(uname -r) bpftool
git clone https://github.com/AlphaReasoning/The-Jinn-Guard
cd The-Jinn-Guard
sudo ./deploy/install.sh
The installer will: 1. Create the jinnguard system user 2. Generate a 256-bit HMAC secret → /etc/jinnguard/secret 3. Load the key into the kernel keyring 4. Build and install /usr/sbin/jinnguard 5. Enable and start jinnguard.service
```bash
cd bpf && make
sudo make install ```
The merged object is loaded at runtime by the aya-rs backend inside the daemon when built with the kernel_telemetry feature.
---
cargo check ```
---
from jinnguard_py import JinnGuardClient
client = JinnGuardClient(
socket_path="/run/jinnguard/jinnguard.sock",
secret_key="<your-hmac-secret>", # or use keyring lookup
agent_id="fabric_swarm_production_01",
)
result = client.propose(
intent_name="read_file",
sequence_counter=1,
action_risk_score=20.0,
proposed_action={"kind": "file_write", "path": "/tmp/out.txt", "contents": "hello"},
context_vars={"spending_ceiling_usd": 50.0},
)
if result.allowed:
print("Execution permitted:", result.signal)
else:
print("Blocked:", result.signal)
---
This repository includes a reproducible Rust sandbox for development, CI-style builds, and Step 1 capability-broker testing. It installs Rust/Cargo, native Z3, SQLite/OpenSSL headers, Python 3, and Clang/LLVM in a Docker image.
make docker-build
make dev-shell
make docker-smoke
For the full workflow, see docs/rust_sandbox.md. If the sandbox MCP gateway port is busy, set JINN_GUARD_MCP_PORT, for example:
JINN_GUARD_MCP_PORT=4860 make smoke
global_safety_ceiling: 75.0 # fused_risk must be below this
agent_nodes:
- id: fabric_swarm_production_01
privilege_tier: 1
# Optional: bind this signed agent_id to local Unix users observed through
# SO_PEERCRED. Empty/omitted preserves the shared-key legacy behavior.
allowed_peer_uids:
- 10001
allowed_intents:
- read_file
- model_inference
- write_temp
max_sequence_quota: 500 # max decisions per lineage session (0 = unlimited)
invariants:
- "spending_ceiling_usd <= 150.00"
- "privilege_escalation_depth < 3"
- "fused_risk <= 74.0"
- id: admin_agent_00
privilege_tier: 3
allowed_intents: [] # empty = all intents allowed
max_sequence_quota: 0 # 0 = unlimited
invariants:
- "trust_score >= 30.0"
jinnguard [OPTIONS]
Options:
--socket-path <PATH> UDS socket path [default: /run/jinnguard/jinnguard.sock]
--lineage-file <PATH> Lineage persistence file [default: /var/lib/jinnguard/lineage.json]
--audit-log <PATH> Audit log path [default: /var/log/jinnguard/audit.log]
--policy-file <PATH> Policy YAML [default: /etc/jinnguard/policy.yaml]
-h, --help Print help
---
| Crate / Directory | Purpose |
|---|---|
ts_cli/ | Main daemon — UDS listener, enforcement pipeline, audit logger |
ts_checker/ | Z3 SMT policy engine — state transition proofs + declarative invariants |
jinnguard_py/ | Python SDK for agent integration |
bpf/ | eBPF C programs (execve, openat, connect, cap_capable) + Makefile |
deploy/ | systemd unit + install.sh provisioner |
tests/ | Integration test harness |
---
sudo apt install linux-tools-generic # provides bpftool for vmlinux.h generation
cargo test
| Component | Status |
|---|---|
| UDS IPC transport (framed, version-tagged) | ✅ Production |
| HMAC-SHA256 authentication | ✅ Production |
| Kernel keyring secret management | ✅ Production |
| Bounded HMAC key rotation grace | ✅ Production |
SO_PEERCRED process identity | ✅ Production |
| Z3 totality audit | ✅ Production |
| Z3 per-agent invariant verification (G2) | ✅ Production |
| Per-agent intent allowlist enforcement (G1) | ✅ Production |
| Per-agent sequence quota enforcement (G1) | ✅ Production |
| Replay attack protection | ✅ Production |
| Behavioral drift detection | ✅ Production |
| Hash-chained audit log | ✅ Production |
| ExecutionBroker hard denylist | ✅ Production |
| Lineage persistence | ✅ Production |
| systemd unit + installer | ✅ Production |
Python SDK (jinnguard_py) | ✅ Functional |
| eBPF C sources (4 programs + Makefile) | ✅ Source complete |
| UDS saturation benchmark | ✅ Implemented |
高质量的AI安全项目,值得关注
AI Skill Hub 为第三方内容聚合平台,本页面信息基于公开数据整理,不对工具功能和质量作任何法律背书。
建议在沙箱或测试环境中充分验证后,再部署至生产环境,并做好必要的安全评估。
✅ Apache 2.0 — 宽松开源协议,可商用,需保留版权声明和 NOTICE 文件,含专利授权条款。
经综合评估,智能防火墙 在Agent工作流赛道中表现稳健,质量优秀。如果你已有明确的使用需求,可以直接上手体验;如果还在评估阶段,建议对比同类工具后再做决策。
| 原始名称 | The-Jinn-Guard |
| Topics | AI安全eBPFRust工作流 |
| GitHub | https://github.com/AlphaReasoning/The-Jinn-Guard |
| License | Apache-2.0 |
| 语言 | Rust |
收录时间:2026-06-25 · 更新时间:2026-06-25 · License:Apache-2.0 · AI Skill Hub 不对第三方内容的准确性作法律背书。
选择 Agent 类型,复制安装指令后粘贴到对应客户端