blacklatch-cybersecurity/supply-chain-security-scanner
GitHub: blacklatch-cybersecurity/supply-chain-security-scanner
一款开源的软件供应链安全扫描器,支持多语言依赖漏洞检测、SBOM 生成与许可证合规性检查。
Stars: 0 | Forks: 0
# 供应链安全扫描器 🔐
一款轻量级、开源的工具,能够扫描依赖项、生成软件物料清单 (SBOM)、检测易受攻击的包,并实时追踪许可证合规性。
## 🎯 为什么这很重要
供应链攻击是 2026 年 top 级别的网络安全威胁之一:
- **SolarWinds**、**Log4Shell**、**npm 后门** —— 均为供应链漏洞利用
- 组织需要即时洞察其依赖项
- 现有工具要么价格昂贵,要么属于闭源软件
## ✨ 核心功能
✅ **实时依赖项扫描** —— 即时检测易受攻击的包
✅ **SBOM 生成** —— 导出软件物料清单(SPDX/CycloneDX 格式)
✅ **CVE 关联** —— 自动将包与已知漏洞进行匹配
✅ **许可证合规性** —— 检查许可证(MIT、Apache、GPL、BSD 等)
✅ **多语言支持** —— Node.js、Python、Go、Rust、Java(可扩展)
✅ **CI/CD 集成** —— 内置支持 GitHub Actions、GitLab CI、Jenkins
✅ **风险评分** —— 基于严重程度的漏洞优先级排序
✅ **合规报告** —— 支持 SOC 2、ISO 27001 的就绪报告
✅ **JSON/CSV 导出** —— 便于与其他工具集成
✅ **本地分析** —— 完全在您的本机运行(无需上传至云端)
## 🚀 快速开始
### 安装
```
# 从 npm 安装(即将推出)
npm install -g supply-chain-security-scanner
# 或使用 Docker
docker pull blacklatch/supply-chain-scanner
```
### 基本用法
```
# 扫描当前目录
sscs scan
# 扫描特定项目
sscs scan --path ./my-project
# 生成 SBOM
sscs sbom --output sbom.json
# 检查 license compliance
sscs license --strict
# 导出报告
sscs report --format json --output report.json
```
### Docker 用法
```
docker run -v $(pwd):/workspace blacklatch/supply-chain-scanner scan --path /workspace
```
## 📊 示例输出
```
{
"scan_id": "scan_12345",
"timestamp": "2026-06-12T10:30:00Z",
"project": "my-app",
"language": "nodejs",
"summary": {
"total_dependencies": 245,
"critical_vulnerabilities": 3,
"high_vulnerabilities": 12,
"license_issues": 2
},
"vulnerabilities": [
{
"package": "lodash",
"version": "4.17.19",
"severity": "HIGH",
"cve": "CVE-2021-23337",
"description": "Lodash versions before 4.17.21 are vulnerable to Prototype Pollution",
"remediation": "Update to lodash@>=4.17.21"
}
],
"licenses": [
{
"package": "viral-lib",
"license": "GPL-3.0",
"status": "RESTRICTED",
"reason": "GPL license in production code"
}
]
}
```
## 🏗️ 项目结构
```
supply-chain-security-scanner/
├── README.md # This file
├── LICENSE # Apache 2.0
├── package.json # Node.js metadata
├── tsconfig.json # TypeScript config
├── jest.config.js # Test configuration
├── .eslintrc.json # Linting rules
├── .prettierrc.json # Code formatting
├── docker-compose.yml # Local development setup
├── Dockerfile # Container setup
├── docs/
│ ├── INSTALLATION.md # Detailed setup guide
│ ├── API.md # CLI & API reference
│ ├── ARCHITECTURE.md # How it works
│ └── CONTRIBUTING.md # Developer guide
├── src/
│ ├── index.ts # Main entry point
│ ├── cli/ # Command-line interface
│ ├── scanner/ # Core scanning logic
│ │ ├── index.ts
│ │ ├── nodejs.ts # npm/yarn scanner
│ │ ├── python.ts # pip scanner
│ │ ├── go.ts # go.mod scanner
│ │ └── rust.ts # Cargo.lock scanner
│ ├── sbom/ # SBOM generation
│ │ ├── index.ts
│ │ ├── spdx.ts # SPDX format
│ │ └── cyclonedx.ts # CycloneDX format
│ ├── vulnerability/ # CVE detection
│ │ ├── index.ts
│ │ ├── cvedb.ts # CVE database integration
│ │ └── matcher.ts # Vulnerability matching
│ ├── compliance/ # License checking
│ │ ├── index.ts
│ │ ├── licenses.ts # License database
│ │ └── validator.ts # License validation
│ └── report/ # Report generation
│ ├── index.ts
│ ├── json.ts
│ ├── csv.ts
│ └── html.ts
├── tests/
│ ├── unit/ # Unit tests
│ ├── integration/ # Integration tests
│ └── fixtures/ # Test data
├── examples/
│ ├── package.json # Example Node.js project
│ ├── requirements.txt # Example Python project
│ └── go.mod # Example Go project
├── .github/
│ ├── workflows/
│ │ ├── ci.yml # CI/CD pipeline
│ │ └── release.yml # Release automation
│ └── ISSUE_TEMPLATE/
└── .gitignore # Git exclusions
```
## 🔧 技术栈
- **语言:** TypeScript/Node.js
- **CLI:** Commander.js, Chalk
- **解析:** 各种特定语言的解析器
- **扫描:** Trivy API、NVD 数据库、OSV 数据库
- **测试:** Jest, Mocha
- **容器化:** Docker, Docker Compose
## 📖 文档
- [安装指南](./docs/INSTALLATION.md)
- [API 参考](./docs/API.md)
- [架构](./docs/ARCHITECTURE.md)
- [贡献](./docs/CONTRIBUTING.md)
## 🛣️ 路线图
### 阶段 1(MVP - 8 周)
- [x] 项目初始化
- [ ] Node.js 依赖项扫描
- [ ] 基础 CVE 检测
- [ ] SBOM 生成 (SPDX)
- [ ] 许可证合规性检查
- [ ] JSON 报告导出
### 阶段 2(扩展支持 - 12 周)
- [ ] Python/pip 支持
- [ ] Go/mod 支持
- [ ] Rust/cargo 支持
- [ ] CycloneDX SBOM 格式
- [ ] CSV 导出
- [ ] Docker 镜像发布
### 阶段 3(企业版 - 16 周)
- [ ] REST API
- [ ] Web 仪表板
- [ ] 数据库持久化
- [ ] Webhook 集成
- [ ] CI/CD 插件 (GitHub Actions, GitLab CI, Jenkins)
- [ ] 高级报告
## 💻 开发环境配置
```
# Clone repository
git clone https://github.com/blacklatch-cybersecurity/supply-chain-security-scanner
cd supply-chain-security-scanner
# 安装依赖项
npm install
# 运行测试
npm test
# 在 development 模式下运行
npm run dev
# 为 production 构建
npm run build
```
## 📝 许可证
Apache License 2.0 —— 请参阅 [LICENSE](./LICENSE) 文件
## 🔒 安全
该工具可帮助保护您的供应链。如果您在本项目本身中发现漏洞,请通过 security@blacklatch.dev 负责任地报告。
## 📞 支持
- 📖 [文档](./docs/)
- 🐛 [问题追踪器](https://github.com/blacklatch-cybersecurity/supply-chain-security-scanner/issues)
- 💬 [讨论区](https://github.com/blacklatch-cybersecurity/supply-chain-security-scanner/discussions)
## 🌟 灵感
专为有以下需求的组织打造:
- 即时的供应链可视化
- SOC 2/ISO 27001 合规
- 集成到现有的 DevSecOps pipeline 中
- 开源、可审计的安全扫描
**由 Blacklatch 网络安全团队打造** 🛡️
标签:IPv6支持, MITM代理, SBOM生成, WebSocket, 依赖分析, 开源合规, 文档安全, 自动化攻击, 请求拦截, 软件供应链安全, 远程方法调用, 配置审计