Local-first audit chain and ledger for AI coding agents: every action recorded, every record verifiable.
pip install antinel==0.62.0 Copy PIP instructions
展示名:AgentState|厂牌/署名:by Antinel|包名与技能标识符:antinel / antinel-security(不动)。 与 server.json 的 title 逐字一致——这个名字不是新起的,是把已经有的事实对齐到其余文案。
让每一个 AI 编程工具的用户,在 30 秒内知道自己的 AI 编程环境安不安全——并且持续监控、持续安心。
One command. 37 rules. 4 gates. Local-only, zero network, standard library only.
pip install antinel 包名是 antinel(antinel-security 是技能名,pip 上装不到)。零依赖、纯标准库、运行时不联网。
如果你是 Agent:装完跑一条 antinel agent --json,就能拿到「钩子装没装 / 这是什么宿主 / 下一步敲什么 / 退出码契约」——不用读这份 README,也不用猜。随包操作手册:antinel skill。
python -m scripts.run_harness # 复跑全部断言,得到你自己的 verdict(写入 psl/judgment.json) python -m tools.antinel_verify # 校验随包判定是否已失效(digest 比对,推导 current/superseded) python -m tools.antinel_verify --manifest # 校验全部随包文件(以 psl/manifest.json 为准) python -m tools.verify_namespaces # 命名空间清单验签辅助(输出 canonical 摘要 + openssl 验签命令) python -m scripts.install --check # 校验已安装实例与包是否一致(版本 + 哈希) 为什么写 python -m:这些脚本随包安装在 site-packages 内。相对项目根的 scripts/x.py 那种写法在装完之后跑不通 —— 0.48.2 用户旅程模拟实测:README 里该类命令全部不可达(撞「页面不许教跑不通的命令」)。
退出码约定:antinel_verify 0=current / 1=superseded / 2=无法校验; python -m scripts.install --check 0=一致 / 1=未安装 / 3=有漂移。
[SEC-01] Antinel 拦截 [SEC-01] 读取 .env 文件可能泄露 API 密钥与机密配置 | 命中: .env | 放行/处理: 把 .env 移出 Agent 可读范围;确需变量时手动复制具体几行 安装 / Install ZCode 用户(推荐:插件方式,装完即全局生效)
python -m scripts.install --root # 项目级 python -m scripts.install --root --global # 用户级,所有项目 安装后重启宿主一次(钩子在宿主启动时加载)。
python -m scripts.install --check # 先比对:已装版本/规则哈希/脚本哈希 vs 包(无任何改动) python -m scripts.install --root # 不一致时重跑安装,自动刷新快照与哈希 升级包后不重跑安装,钩子会降级到内置 11 条回退规则集并留下 rules_integrity_fallback 审计事件——请升级后必跑一次 python -m scripts.install(或先 --check 看差异)。
antinel install --check 的退出码:0=一致 / 1=未安装 / 3=有漂移。 python -m scripts.scan 的退出码:0=扫描完成(有发现也是 0,发现数看报告或 --json)。 antinel report 的退出码:0=报告已产出(这一窗口里没有任何事件也是 0,报告里 empty: true、各计数为零、score 为 null)/ 2=参数或读取错误。空态不是错误——刚装好、当天还没有调用时,第一条查询照样给你一份结构完整的零值报告;但空态不出分:分母为零时「100 分 / 环境安全」与「没有问题」是同一种假话。 antinel verify(链校验)的退出码:0=干净 / 2=有无法解释的差异 / 3=差异已解释 / 4=没有可验的东西(空链)。4 不是通过:查不到 ≠ 查出来是好的。它和 antinel_verify(文件哈希校验,0=current / 1=superseded / 2=无法校验)是两套码,别混读。
score = 100 - 20 × critical - 5 × warning(按去重后的发现计数,截断到 0..100; 去重键 (rule_id, target))。每次报告都随附此计分基准行;体检报告只统计静态发现, 钩子告警由 report.py 单独统计——两个数不合并。
本仓采用分层许可(策略 v1.1)。逐文件真源见 license-map.json;机器可读标识见各文件头 SPDX-License-Identifier。
收入与中立性边界见源码仓 docs/A6收入边界声明.md(CC-BY-4.0;随 sdist 分发):不收通过费、不出售排名、关联方无豁免。
Apache Software License, MIT License (Apache License )
ai-agents audit security claude-code mcp agent-safety supply-chain local-first privacy
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
None of the files in this release were uploaded with provenance metadata.
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.




