cognis-digital/ipasnitch

GitHub: cognis-digital/ipasnitch

针对 iOS .ipa 包的轻量级静态安全扫描器,无需 Mac 即可在任意 CI 环境中检测 ATS 配置、密钥泄露与传输安全缺陷。

Stars: 0 | Forks: 0

IPASNITCH # IPASNITCH ### 针对 iOS .ipa 包的静态扫描工具,用于标记 ATS 例外、缺失的 entitlements 加固、内嵌的 URL/密钥以及薄弱的 Info.plist 传输安全配置。 [![PyPI](https://img.shields.io/pypi/v/cognis-ipasnitch.svg?color=6b46c1)](https://pypi.org/project/cognis-ipasnitch/) [![CI](https://static.pigsec.cn/wp-content/uploads/repos/2026/06/20e5f96241182739.svg)](https://github.com/cognis-digital/ipasnitch/actions) [![License: COCL 1.0](https://img.shields.io/badge/License-COCL%201.0-2b6cb0.svg)](LICENSE) [![Suite](https://img.shields.io/badge/Cognis-Neural%20Suite-6b46c1.svg)](https://github.com/cognis-digital) *应用与移动安全 — 轻量级 SAST/DAST 及二进制分析。*
``` pip install cognis-ipasnitch ipasnitch scan . # → prioritized findings in seconds ``` ## 使用说明 — 分步指南 1. **安装:** pip install ipasnitch 2. **扫描 Info.plist** — 静态扫描 ATS 例外、薄弱的传输配置以及内嵌的密钥: ipasnitch scan Info.plist 扫描结果按严重程度(critical / high / medium / low / info)进行分组,并为每项提供修复建议。 3. **一次性扫描多个 plist 文件:** ipasnitch scan App/Info.plist Extension/Info.plist 4. **读取输出** — 输出 JSON 格式以便通过管道处理,然后进行过滤: ipasnitch scan Info.plist --format json | jq '.results[].findings' 5. **CI 拦截** — 仅在达到或超过所选严重程度时使构建失败(退出码 0 表示正常,1 表示触发拦截,2 表示读取/解析错误): ipasnitch scan Info.plist --fail-on medium ## 目录 - [为什么选择 ipasnitch?](#why) · [功能](#features) · [快速开始](#quick-start) · [示例](#example) · [架构](#architecture) · [AI 技术栈](#ai-stack) · [横向对比](#how-it-compares) · [集成](#integrations) · [任意平台安装](#install-anywhere) · [相关项目](#related) · [贡献指南](#contributing) ## 为什么选择 ipasnitch? 几乎不存在优秀的独立 CLI 工具可以在 Linux CI 运行器上对 .ipa 进行静态审查;ipasnitch 无需 Mac 即可解析 Mach-O + plist,使得在任何 pipeline 中实现对 iOS 应用安全(appsec)的拦截成为可能。 `ipasnitch` 专一、可脚本化且支持自托管:将其指向目标,以你的工作流已支持的格式(表格 · JSON · SARIF)获取优先级排序的结果,据此对 CI 进行拦截,并允许 agent 通过 MCP 驱动它。
↑ 回到顶部
## 功能 - ✅ 解析 Plist - ✅ 扫描 Plist - ✅ 扫描文件 - ✅ 可在 Linux/macOS/Windows · Docker · devcontainer 上运行 - ✅ 提供 Python、JavaScript、Go 和 Rust 版本(`ports/`)
↑ 回到顶部
## 快速开始 ``` pip install cognis-ipasnitch ipasnitch --version ipasnitch scan . # scan current project ipasnitch scan . --format json # machine-readable ipasnitch scan . --fail-on high # CI gate (non-zero exit) ```
↑ 回到顶部
## 示例 ``` $ ipasnitch scan . [HIGH ] IPA-001 example finding (./src/app.py) [MEDIUM ] IPA-002 another signal (./config.yaml) 2 findings · risk score 5 · 38ms ```
↑ 回到顶部
## 架构 ``` flowchart LR IN[target / export] --> P[ipasnitch
collect + correlate] P --> OUT[ranked findings] ```
↑ 回到顶部
## 从任何 AI 技术栈中使用 `ipasnitch` 与所有主流的 AI 使用方式兼容: - **MCP 服务器** — `ipasnitch mcp`(Claude Desktop、Cursor、Cognis.Studio、[uncensored-fleet](https://github.com/cognis-digital/uncensored-fleet)) - **兼容 OpenAI / JSON** — 将 `ipasnitch scan . --format json` 通过管道传递给任何 agent 或 LLM - **LangChain · CrewAI · AutoGen · LlamaIndex** — 用一行代码将 CLI/JSON 封装为工具 - **CI / 脚本** — 退出码 + SARIF 适用于非 AI pipeline
↑ 回到顶部
## 横向对比 | | **Cognis ipasnitch** | objection | |---|:---:|:---:| | 支持自托管,无需账号 | ✅ | 视情况而定 | | 单一命令,零配置 | ✅ | ⚠️ | | 支持 CI 的 JSON + SARIF | ✅ | 视情况而定 | | MCP 原生支持(AI agent) | ✅ | ❌ | | 多语言端口(JS/Go/Rust) | ✅ | ❌ | | 开源许可 | ✅ COCL | 视情况而定 | *秉承 **objection / iMAS 的精神,但也像 MobSF 的 iOS 扫描路径一样作为非越狱的静态分析器**,并以 Cognis 的方式重新构建。如果遗漏了某项来源说明?欢迎提交 PR。*
↑ 回到顶部
## 集成 可接入你的技术栈:用于代码扫描的 **SARIF**,用于任何场景的 **JSON**,用于 AI agent 的 **MCP 服务器**(`ipasnitch mcp`),以及用于 SIEM/Slack/Jira 的 webhook 转发器。详见 [`docs/INTEGRATIONS.md`](docs/INTEGRATIONS.md)。
↑ 回到顶部
## 安装 — 各种方式,全平台支持 ``` pip install "git+https://github.com/cognis-digital/ipasnitch.git" # pip (works today) pipx install "git+https://github.com/cognis-digital/ipasnitch.git" # isolated CLI uv tool install "git+https://github.com/cognis-digital/ipasnitch.git" # uv pip install cognis-ipasnitch # PyPI (when published) docker run --rm ghcr.io/cognis-digital/ipasnitch:latest --help # Docker brew install cognis-digital/tap/ipasnitch # Homebrew tap curl -fsSL https://raw.githubusercontent.com/cognis-digital/ipasnitch/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/ipasnitch` | [DEPLOY.md](docs/DEPLOY.md) (AWS/Azure/GCP/k8s) |
↑ 回到顶部
## 相关的 Cognis 工具 - [`apkpeek`](https://github.com/cognis-digital/apkpeek) — 一键静态分析 Android APK/AAB 二进制文件:提取硬编码的密钥、导出的组件、危险的权限以及不安全的 manifest 标志,并汇总为单一的 SARIF 报告。 - [`hookcraft`](https://github.com/cognis-digital/hookcraft) — 根据 YAML 意图(例如“绕过 SSL pinning”、“导出 crypto keys”)生成可直接运行的 Frida 插桩脚本,并验证它们是否能附加到目标进程。 - [`hookcraft`](https://github.com/cognis-digital/dastlite) — 一个无头(headless)、配置即代码的 DAST 运行器,可爬取经过身份验证的 Web/移动 API 接口,并运行精选的主动扫描规则集,最终输出去重后的 SARIF。 - [`semsift`](https://github.com/cognis-digital/semsift) — 轻量级的语义感知 SAST 工具,仅对 diff 运行精选的污点分析规则,让 PR 获得快速的增量 SAST 扫描,避免全仓库扫描的疲劳。 - [`cheatsense`](https://github.com/cognis-digital/cheatsense) — 反作弊遥测分析器,可摄入游戏会话日志,并标记出在统计上异常的输入/瞄准/移动特征,且提供可解释的逐项评分。 - [`binhunt`](https://github.com/cognis-digital/binhunt) — 游戏/桌面二进制完整性扫描器,可对可执行文件进行指纹识别,检测常见的 packer/混淆器,并与已知的良好基线进行差异对比,以捕获篡改行为。 **探索完整工具套件 →** [🗂️ 全部 170+ 工具](https://github.com/cognis-digital/cognis-neural-suite) · [⭐ awesome-cognis](https://github.com/cognis-digital/awesome-cognis) · [🔗 cognis-sources](https://github.com/cognis-digital/cognis-sources) · [🤖 uncensored-fleet](https://github.com/cognis-digital/uncensored-fleet) · [🧠 engram](https://github.com/cognis-digital/engram)
↑ 回到顶部
## 互操作性 `{}` 与包含 300+ 工具的 Cognis 套件无缝组合 — 支持 JSON 输入/输出以及共享的 兼容 OpenAI 的 `/v1` 核心主干。有关套件映射、组合模式以及参考技术栈, 请参阅 **[INTEROP.md](INTEROP.md)**。 ## 许可证 源码可见,基于 **Cognis Open Collaboration License (COCL) v1.0** 授权 — 可免费用于个人用途、内部评估、研究和教育用途;**商业 / 生产环境使用需要获取许可** (licensing@cognis.digital)。详见 [LICENSE](LICENSE)。
Cognis Digital · Cognis Neural Suite 中 170+ 工具之一 · 让明天在今天变得更美好
标签:Info.plist, iOS, SAST, StruQ, 可视化界面, 数据可视化, 日志审计, 目录枚举, 盲注攻击, 移动安全, 请求拦截, 逆向工具, 静态代码扫描