cognis-digital/maritimeint
GitHub: cognis-digital/maritimeint
一款可自托管的 AIS 船舶追踪与制裁逃避异常检测工具,通过解析船舶轨迹数据并与全球制裁清单交叉比对,快速生成优先级排序的灰色舰队监视列表。
Stars: 1 | Forks: 0

# MARITIMEINT
### AIS 船舶追踪与逃避制裁异常检测

[](https://pypi.org/project/cognis-maritimeint/) [](https://github.com/cognis-digital/maritimeint/actions) [](LICENSE) [](https://github.com/cognis-digital)
*OSINT / SIGINT — 开源情报收集与关联。*
```
pip install cognis-maritimeint
maritimeint locate demos/ais_sample.json # → prioritized grey-fleet watchlist in seconds
```
## 目录
- [为什么选择 maritimeint?](#why) · [功能](#features) · [快速开始](#quick-start) · [示例](#example) · [架构](#architecture) · [AI 技术栈](#ai-stack) · [对比](#how-it-compares) · [集成](#integrations) · [任意平台安装](#install-anywhere) · [相关项目](#related) · [贡献](#contributing)
## 为什么选择 maritimeint?
AIS 船舶追踪与逃避制裁异常检测 —— 无需搭建重量级基础设施。
`maritimeint` 是单一用途、可脚本化且可自托管的:将其指向目标,以您工作流已有的格式(表格 · JSON · SARIF)获取优先级排序的结果,将其设为 CI 的门控,并让 agent 通过 MCP 驱动它。
## 功能
- ✅ 解析消息
- ✅ 加载消息
- ✅ 半正矢海里计算
- ✅ 检测信号盲区
- ✅ 检测航速突变
- ✅ 检测徘徊行为
- ✅ 检测欺骗行为
- ✅ 检测会合(船对船转移特征)
- ✅ **LocateAnything 监视列表** —— 一次调用 → 优先排序且*有解释*的灰色舰队(grey-fleet)监视列表(HIGH/MEDIUM/LOW + 自然语言原因)
- ✅ **制裁交叉比对** —— 通过 MMSI / IMO / 名称将追踪到的船舶与 OFAC/EU/OFSI 样式的列表进行匹配
- ✅ **可组合的 AI 插件** —— 可选的视觉(图像筛查)+ 推理(叙事评估)功能,可通过 Cognis 舰队 / **edgemesh** *叠加*到 stdlib 核心上;受硬件/可用性限制(无后端则关闭)
- ✅ **多级交互式菜单** (`maritimeint menu`)
- ✅ 运行于 Linux/macOS/Windows · Docker · devcontainer
- ✅ 支持 Python、JavaScript、Go 和 Rust 多语言移植 (`ports/`)
## 灰色舰队监视列表 + AI 插件
```
maritimeint locate demos/ais_sample.json --sanctions demos/sanctions_sample.json
# [HIGH ] 210111000 NEPTUNE STAR [SANCTIONED] score=12
# - 在 SANCTIONS LIST 上 (...) - AIS gap 9h (going dark)
# - rendezvous 90分钟, 0.008nm (可能发生 ship-to-ship transfer)
maritimeint addins # which AI add-ins are reachable right now
maritimeint locate
--ai # augment with the reasoning model if a backend is up
maritimeint menu # interactive, multi-level
# 将 add-ins 指向 LIVE edgemesh gateway (或任何 OpenAI-compatible /v1):
maritimeint locate --endpoint http://:8780 --model
maritimeint vision https://.../sentinel1_scene.png --endpoint http://:8780 --model
```
### 真实的制裁数据 —— 涵盖所有主要列表,统一格式
基于实际的政府指定数据进行筛查,而非样本。从任意单一数据源拉取,
或使用 `--source all` 获取并**合并**所有公开数据源(通过 IMO → MMSI →
名称进行去重,并合并每艘船的来源列表):
```
maritimeint import-sanctions --source all --out sanctions.json # OFAC + OpenSanctions, merged
maritimeint import-sanctions --source opensanctions # aggregates OFAC/EU/UK/UN
maritimeint import-sanctions --source ofsi --from-file ConList.csv # UK OFSI (downloaded)
maritimeint import-sanctions --source eu --from-file eu_list.xml # EU consolidated (downloaded)
maritimeint locate fleet.csv --sanctions sanctions.json --fail-on high
```
| `--source` | 机构 | 格式 | 获取方式 |
|---|---|---|---|
| `ofac` | US Treasury OFAC SDN | CSV | 实时 URL |
| `opensanctions` | OpenSanctions (OFAC/EU/UK/UN) | FtM JSONL | 实时 URL |
| `ofsi` | UK HM Treasury OFSI | CSV | `--from-file` |
| `eu` | EU 综合列表 | XML | `--from-file` |
| `all` | OFAC + OpenSanctions,已合并 | — | 实时 URLs |
### 输入实时 AIS,输出监视列表
将任何 AIS 提供商的导出数据(或拉取实时边界框)标准化后输入检测器 — —
字段名会自动设置别名,且 unix 时间戳会转换为 ISO UTC:
```
maritimeint fetch-ais --source file --from-file provider_export.csv --out ais.json
maritimeint fetch-ais --source aishub --username YOU --latmin 24 --latmax 27 --lonmin 54 --lonmax 57
maritimeint analyze ais.json # then run the detectors
```
(aisstream.io 是一个 websocket 流 —— 将 `PositionReport` 消息收集为 JSON,然后
使用 `fetch-ais --source file`。)
检测核心是**纯 stdlib 实现,且始终有效**。当可以访问模型后端时,插件可*叠加*
额外功能 —— 将它们指向 **edgemesh** 网关
(该网关在统一的
`/v1` 路径下整合了 `uncensored-fleet`、`cognis-code` 和视觉/VL 后端),或直接指向那些
舰队端点。如果没有可用服务,插件将保持关闭状态,但核心
监视列表仍会运行。仅限检测/态势感知 —— 请参阅免责声明。
## 快速开始
```
pip install cognis-maritimeint
maritimeint --version
maritimeint analyze demos/ais_sample.json # full detector suite + risk ranking
maritimeint locate demos/ais_sample.json # prioritized, explained watchlist
maritimeint locate demos/ais_sample.csv # CSV in too (real AIS-provider exports)
maritimeint --format json locate demos/ais_sample.json # machine-readable
maritimeint locate fleet.csv --sanctions ofac.json --fail-on high # compliance/CI gate (exit≠0)
maritimeint menu # interactive multi-level menu
```
**兼容您运行的任何模型后端** —— 将 `MARITIMEINT_ENDPOINT`(或
`OPENAI_BASE_URL`)设置为您的舰队/网关,或者让它在常见的
本地端口上自动发现。没有后端?stdlib 检测核心仍然会运行;AI 插件只会保持关闭状态。
## 示例
```
$ maritimeint locate demos/ais_sample.json --sanctions demos/sanctions_sample.json
MARITIMEINT watchlist (3 vessels, highest risk first):
[HIGH ] 210111000 NEPTUNE STAR [SANCTIONED] score=12
- ON SANCTIONS LIST (SAMPLE-EO14024)
- AIS gap 9.0h (going dark)
- rendezvous 90.0min, min 0.008nm (possible ship-to-ship transfer)
[MEDIUM] 210444000 GHOST RUNNER score=3
- implausible 462.2kn position jump (possible spoofing)
```
## 架构
```
flowchart LR
AIS[AIS tracks
JSON / CSV] --> DET[detectors
gaps · spoofing · loitering · rendezvous]
SANC[(sanctions list
OFAC / EU / OFSI)] --> SC
DET --> SC[risk scoring
tier + plain-language reasons]
SC --> WL[prioritized watchlist]
WL --> GATE{--fail-on
compliance gate}
WL -. optional .-> AI[vision / reasoning add-ins
via edgemesh / your fleet]
```
## 在任何 AI 技术栈中使用
`maritimeint` 可以与每种流行的 AI 使用方式互操作:
- **MCP server** —— `maritimeint mcp` (Claude Desktop, Cursor, Cognis.Studio, [uncensored-fleet](https://github.com/cognis-digital/uncensored-fleet))
- **兼容 OpenAI / JSON** —— 将 `maritimeint --format json locate ` 通过管道传递给任何 agent 或 LLM
- **LangChain · CrewAI · AutoGen · LlamaIndex** —— 一行代码将 CLI/JSON 封装为工具
- **CI / 脚本** —— 为非 AI 流水线提供退出代码 + SARIF
## 对比
| | **Cognis maritimeint** | bellingcat |
|---|:---:|:---:|
| 可自托管,无需账号 | ✅ | 视情况而定 |
| 单一命令,零配置 | ✅ | ⚠️ |
| 用于 CI 的 JSON + SARIF | ✅ | 视情况而定 |
| MCP 原生支持 (AI agents) | ✅ | ❌ |
| 多语言移植 (JS/Go/Rust) | ✅ | ❌ |
| 开源许可 | ✅ COCL | 视情况而定 |
*秉承 **bellingcat/toolkit** 的精神,以 Cognis 的方式重新构建。缺少致谢?欢迎提交 PR。*
## 集成
可接入您的技术栈:用于代码扫描的 **SARIF**,用于一切的 **JSON**,用于 AI agent 的 **MCP server** (`maritimeint mcp`),以及用于 SIEM/Slack/Jira 的 webhook 转发器。请参阅 [`docs/INTEGRATIONS.md`](docs/INTEGRATIONS.md)。
通过 [`cognis-connect`](https://github.com/cognis-digital/cognis-connect) **将监视列表转发至您的 SOC** —— 支持在一个标志位内输出 STIX/MISP/Sigma/Splunk/Elastic/Slack/Discord/webhook:
```
pip install "cognis-maritimeint[connect]"
maritimeint locate fleet.csv --sanctions s.json --emit stix > bundle.stix.json
maritimeint locate fleet.csv --sanctions s.json --emit splunk --emit-url $HEC --emit-token $TOK
maritimeint locate fleet.csv --sanctions s.json --emit slack --emit-url $SLACK --emit-dry-run
```
每个被标记的船只都会成为规范的 `Finding`(受制裁 → critical)。`--emit-dry-run` 可在不发送的情况下预览确切的请求。
## 安装 —— 各种方式,全平台
```
pip install "git+https://github.com/cognis-digital/maritimeint.git" # pip (works today)
pipx install "git+https://github.com/cognis-digital/maritimeint.git" # isolated CLI
uv tool install "git+https://github.com/cognis-digital/maritimeint.git" # uv
pip install cognis-maritimeint # PyPI (when published)
docker run --rm ghcr.io/cognis-digital/maritimeint:latest --help # Docker
brew install cognis-digital/tap/maritimeint # Homebrew tap
curl -fsSL https://raw.githubusercontent.com/cognis-digital/maritimeint/main/install.sh | sh
```
| Linux | macOS | Windows | Docker | 云平台 |
|---|---|---|---|---|
| `scripts/setup-linux.sh` | `scripts/setup-macos.sh` | `scripts/setup-windows.ps1` | `docker run ghcr.io/cognis-digital/maritimeint` | [DEPLOY.md](docs/DEPLOY.md) (AWS/Azure/GCP/k8s) |
## 相关 Cognis 工具 —— 海事 / 无人机 / 防御 OSINT 集群
maritimeint 隶属于一个更广泛的**防御性、分析性**开源情报工具开源套件。
组合使用它们:在您自己的硬件上对图像进行地理定位、绘制被标记船只背后的所有权关系、筛查
制裁情况,并关联无人机检测事件。
**海事与无人机领域感知**
- [`uaslog`](https://github.com/cognis-digital/uaslog) —— 反无人机遥测/日志分析器:标记无人机检测事件、RF 频段和航迹
- [`awesome-drone-warfare-osint`](https://github.com/cognis-digital/awesome-drone-warfare-osint) —— 引用级数据集:涵盖 195+ 个平台的 8,300+ 个外国组件 + `query.py` 合规 CLI
- [`frontline-drones`](https://github.com/cognis-digital/frontline-drones) —— 前线与商用无人机描述性目录 + 反无人机传感器选择指南
**地理空间 / GEOINT**
- [`locateanything`](https://github.com/cognis-digital/locateanything) —— 使用本地视觉 + 推理模型推断照片拍摄地点(OSINT 地理定位)
- [`geolens`](https://github.com/cognis-digital/geolens) —— 图像地理定位工具包:EXIF、太阳阴影、OCR、反向搜索
- [`geoaoi-pro`](https://github.com/cognis-digital/geoaoi-pro) —— MIL-STD-2525 / APP-6 符号 + 感兴趣区域辅助工具(兼容 QGIS)
**制裁 · 所有权 · 金融**
- [`corpmap`](https://github.com/cognis-digital/corpmap) —— 公司结构与受益所有权映射器(谁真正拥有那艘船)
- [`cryptotrace`](https://github.com/cognis-digital/cryptotrace) —— 区块链调查工具:ETH/BTC 聚类 + 制裁交叉比对
**威胁情报 · 身份**
- [`personagraph`](https://github.com/cognis-digital/personagraph) —— 身份解析档案(用户名/电子邮件/电话,跨平台)
- [`stixgen`](https://github.com/cognis-digital/stixgen) · [`iocextract`](https://github.com/cognis-digital/iocextract) · [`attackmap`](https://github.com/cognis-digital/attackmap) · [`ttphunt`](https://github.com/cognis-digital/ttphunt) —— IOC → STIX,ATT&CK 映射与追踪
- [`darkmirror`](https://github.com/cognis-digital/iocextract) —— 用于品牌/暴露监控的公共泄露站点镜像
**完全私有化运行 →** [`edgemesh`](https://github.com/cognis-digital/edgemesh)(在整个舰队中提供一个兼容 OpenAI 的 `/v1` 接口)· [`uncensored-fleet`](https://github.com/cognis-digital/uncensored-fleet)
**探索套件 →** 300+ 开源安全与 OSINT 工具,尽在 [github.com/cognis-digital](https://github.com/cognis-digital) · [⭐ awesome-cognis](https://github.com/cognis-digital/awesome-cognis)
## 许可证
源码可见,基于 **Cognis Open Collaboration License (COCL) v1.0** —— 个人、内部评估、研究和教育用途免费;**商业/生产用途需要许可证** (licensing@cognis.digital)。请参阅 [LICENSE](LICENSE)。
📡 **[互操作映射图](INTEROP.md)** —— 本仓库如何与 Cognis 套件的其余部分(私有 AI 骨干、agent 语言与认知、领域情报)进行组合。
📚 **[来源与数据](SOURCES.md)** —— 检测器、风险模型和制裁筛查背后真实权威的海事领域数据源(OFAC SDN、AIS 数据源、Sentinel-1、Equasis、C4ADS、CSIS/RUSI)。 标签:AIS船舶追踪, Python, 代码示例, 可视化界面, 合规审查, 异常检测, 数据分析, 数据可视化, 无后门, 日志审计, 海事监控, 请求拦截, 逆向工具