credkellar-boop/Insta-Repo

GitHub: credkellar-boop/Insta-Repo

Insta-Repo 是一款用 Rust 编写的递归式仓库安全扫描器,结合静态签名、AI 语义分析和 eBPF 运行时监控,帮助开发者在运行未知代码前检测隐藏的恶意 payload 和供应链攻击。

Stars: 2 | Forks: 1

# Insta-Repo 🛡️

Profile Image

![GitHub stars](https://img.shields.io/github/stars/credkellar-boop/Insta-Repo?style=social) ![GitHub forks](https://img.shields.io/github/forks/credkellar-boop/Insta-Repo?style=social) **语言与框架** ![Rust](https://img.shields.io/badge/rust-%23000000.svg?style=for-the-badge&logo=rust&logoColor=white) ![Bash](https://img.shields.io/badge/bash-%23121011.svg?style=for-the-badge&logo=gnu-bash&logoColor=white) ![Solidity](https://img.shields.io/badge/Solidity-%23363636.svg?style=for-the-badge&logo=solidity&logoColor=white) **基础设施与 DevOps** ![Docker](https://img.shields.io/badge/docker-%230db7ed.svg?style=for-the-badge&logo=docker&logoColor=white) ![GitHub Actions](https://img.shields.io/badge/github%20actions-%232671E5.svg?style=for-the-badge&logo=githubactions&logoColor=white) ![Linux](https://img.shields.io/badge/Linux-FCC624?style=for-the-badge&logo=linux&logoColor=black) **网络安全与取证** ![eBPF](https://img.shields.io/badge/eBPF-Runtime_Monitor-FF4081?style=for-the-badge) ![Google Gemini](https://img.shields.io/badge/Gemini_AI-Semantic_Analysis-8E75B2?style=for-the-badge&logo=google) ![Security Audit](https://img.shields.io/badge/Security-DevSecOps-red?style=for-the-badge&logo=owasp) ## 📖 这是什么? **Insta-Repo** 是一款使用 Rust 编写的高度专业化、快速且递归的安全扫描器。它旨在分析整个项目目录,查找安全危险信号、供应链攻击、隐藏的恶意 payload 以及存在漏洞的智能合约。它作为前线的自动化防御机制,将闪电般的快速静态 regex 解析与由 AI 驱动的深度语义推理,以及通过 eBPF 进行的 runtime 监控结合在一起。 ## ⚡ 为什么它很酷(6 秒概览) * **极速(Blazing Fast):** 使用 Rust 构建,积极地递归遍历目录,同时智能地跳过大型二进制文件(>5MB)以优化内存开销。 * **AI 驱动的威胁狩猎:** 将高度混淆的脚本或变形 payload 发送给推理模型(Gemini 1.5 Pro / Flash-Lite),以解码代码背后的真实意图。 * **Web3 与加密货币取证:** 积极寻找针对 `.ethereum/keystore` 文件、被盗 SSH 密钥的定向攻击,以及恶意的 Web3 模式(例如,Solidity 中未经授权的 `selfdestruct`)。 * **供应链防御:** 即时标记可疑的构建时执行行为,例如在 `build.rs` 或 `Makefiles` 中恶意的 `Command::new()` 生成。 ## 🛡️ 网络安全威胁模型与能力 Insta-Repo 建立在严格的威胁模型(`docs/THREAT_MODEL.md`)之上,旨在捕获静态和行为上的入侵指标: * **静态启发式引擎:** 根据自定义的 YARA 风格签名(`signatures.yaml`、`smart_contract.yaml`)解析源代码,以检测 base64 混淆、硬编码的钱包目标以及 `curl | bash` 执行路径。 * **智能合约审计:** 专用的规则集,用于在部署前识别后门合约、隐藏的矿机和钱包清空器(drainer)。 * **eBPF Runtime 监控:** (`src/ebpf_monitor.rs`)挂钩到内核层,监控依赖项解析期间意外的 syscalls 和网络连接。 ## 🏗️ 基础设施与部署架构 专为无缝集成到现代 DevSecOps pipeline 中而构建: * **容器化执行:** 通过 Docker 实现完全隔离的扫描环境。`make docker-scan` 确保扫描器在运行时不会将宿主 OS 暴露给潜在的活跃 payload。 * **CI/CD 原生:** 将报告直接推送到 `stdout` 或将其序列化为 JSON(`src/reporter.rs`),以便自动摄取到 GitHub Actions 或 GitLab CI 中。 * **自动化审计:** 集成了 Dependabot 配置(`.github/dependabot.yml`)和本地审计脚本(`scripts/audit.sh`),以维护扫描器自身的完整性。 ## 🚀 如何安装与运行 ### 前置条件 * **Rust & Cargo**(用于本地编译) * **Docker**(用于隔离的基础设施扫描) * **Gemini API Key**(用于语义 AI 分析) ### 快速开始 1. **克隆仓库:** git clone [https://github.com/credkellar-boop/Insta-Repo.git](https://github.com/credkellar-boop/Insta-Repo.git) cd Insta-Repo
标签:DevSecOps, Docker镜像, Rust, 上游代理, 可视化界面, 应用安全, 智能合约审计, 网络流量审计, 请求拦截, 通知系统, 错误基检测, 静态代码分析