AliAmmar15/Velonus
GitHub: AliAmmar15/Velonus
Velonus 是一款专为 Python 开发者设计的 AI 原生安全工具,能够一站式扫描代码漏洞、依赖项 CVE 和硬编码密钥,并提供清晰的修复指导。
Stars: 33 | Forks: 2
[](https://github.com/AliAmmar15/Velonus/actions)
[](https://pypi.org/project/velonus)
[](https://pypi.org/project/velonus)
[](LICENSE)
[]()
# Velonus
**为 Python 开发者打造的安全扫描工具,真正能告诉你如何修复问题。**
一条命令。五个扫描器。零噪音。
```
pip install velonus
velonus scan ./your-project
```
## 演示
```
$ velonus scan ./myapp
Scanning with 5 tools...
secrets ████████████████████ 0.3s
bandit ████████████████████ 2.1s
semgrep ████████████████████ 4.2s
pip-audit ████████████████████ 1.8s
safety ████████████████████ 1.2s
┌──────────────┬──────────────────────────────────────────┬──────────────────┬──────────┐
│ Severity │ Finding │ Location │ Tool │
├──────────────┼──────────────────────────────────────────┼──────────────────┼──────────┤
│ 🔴 CRITICAL │ Hardcoded AWS secret key │ config.py:14 │ secrets │
│ 🔴 CRITICAL │ Hardcoded OpenAI API key │ llm_client.py:8 │ secrets │
│ 🔴 CRITICAL │ SQL injection via string format │ db/queries.py:41 │ semgrep │
│ 🟠 HIGH │ Use of MD5 for password hashing │ auth/utils.py:27 │ bandit │
│ 🟠 HIGH │ requests 2.28.0 — CVE-2023-32681 (8.1) │ requirements.txt │ pip-aud │
│ 🟡 MEDIUM │ Shell injection via subprocess │ runner.py:19 │ bandit │
│ 🟡 MEDIUM │ Hardcoded JWT secret │ auth/tokens.py:3 │ secrets │
└──────────────┴──────────────────────────────────────────┴──────────────────┴──────────┘
3 CRITICAL │ 7 HIGH │ 12 MEDIUM │ 34 LOW
```
## 检测内容
| 类别 | 工具 | 捕获内容 |
|---|---|---|
| 硬编码 secrets | trufflehog + entropy | API 密钥、AWS 凭证、JWT token、PEM 密钥 |
| Python SAST | Bandit | 注入、弱加密、不安全的 shell 执行 |
| 模式分析 | Semgrep | OWASP Top 10 漏洞模式 |
| 依赖 CVE | pip-audit | 具有 CVSS v3 分数的已知 CVE |
| 漏洞库 | Safety | 包漏洞交叉引用 |
所有发现的结果都会被标准化为统一的 schema,带有 **CWE 标签**、**OWASP Top 10 类别**和用于去重的**确定性指纹**。
## 输出格式
```
velonus scan ./ # Rich terminal table (default)
velonus scan ./ --format json # JSON array — pipe to jq, scripts, etc.
velonus scan ./ --sarif # SARIF file → GitHub Security tab
velonus scan ./ --severity high # Filter to HIGH and CRITICAL only
velonus scan ./ -o results/scan.sarif # Write SARIF to a custom path
```
## CI 集成
```
- name: Velonus security scan
run: |
pip install velonus
velonus scan . --sarif -o velonus.sarif
- name: Upload to GitHub Security tab
uses: github/codeql-action/upload-sarif@v4
with:
sarif_file: velonus.sarif
```
Velonus 在发现 CRITICAL 或 HIGH 级别的问题时会以退出码 `1` 退出——将其用作严格的 CI 门禁。
## 路线图
| | 阶段 | 状态 |
|---|---|---|
| ✅ | 阶段 0 — CLI + secret 检测 | 已完成 |
| ✅ | 阶段 1 — 完整扫描器流水线 (Bandit, Semgrep, pip-audit, Safety) | 已完成 |
| 🔨 | 阶段 2 — AI 上下文引擎(可利用性评分 + 修复生成) | 开发中 |
| 🔜 | 阶段 3 — GitHub PR 集成(行内修复,一键接受) | 已计划 |
| 🔜 | 阶段 4 — Web 仪表板 | 已计划 |
## Alpha 版本须知
Velonus 目前处于 Alpha 阶段。它是可用的——我们自己也在使用——同时我们期待您的反馈。
可能会存在一些不完善的地方。[报告问题](https://github.com/AliAmmar15/Velonus/issues),我们会迅速修复。
## 许可证
MIT — 请参阅 [LICENSE](LICENSE)。
# 如果没有安装 uv,请先安装
pip install uv
# 安装所有工作区包
uv sync --all-extras --dev
# 激活虚拟环境
source .venv/bin/activate # macOS/Linux
.venv\Scripts\Activate.ps1 # Windows PowerShell
# 以可编辑模式安装 CLI
pip install -e apps/cli
pip install -e packages/scanner
pip install -e packages/normalizer
```
**Verify the install:**
```bash
velonus --help
```
## 使用方法
### 扫描项目
```
# 扫描当前目录
velonus scan ./
# 扫描特定路径
velonus scan ./src
# 仅显示 HIGH 及以上
velonus scan ./ --severity high
# Verbose 输出(显示每个工具的耗时)
velonus scan ./ --verbose
```
### 输出格式
```
# 默认:rich 终端表格
velonus scan ./
# JSON(便于 pipe)
velonus scan ./ --format json
# 写入 SARIF 文件(用于 GitHub Security 标签页)
velonus scan ./ --sarif
# 将 SARIF 写入自定义路径
velonus scan ./ -o results/velonus.sarif
```
### 在 CI 中使用 (GitHub Actions)
```
- name: Velonus security scan
run: velonus scan . --sarif -o velonus-results.sarif
- name: Upload to GitHub Security tab
uses: github/codeql-action/upload-sarif@v4
with:
sarif_file: velonus-results.sarif
```
当检测到 CRITICAL 或 HIGH 级别的问题时,Velonus 会以退出码 `1` 退出——将此作为 CI 门禁。
### Pre-commit 钩子
```
# .pre-commit-config.yaml
repos:
- repo: local
hooks:
- id: velonus
name: Velonus security scan
entry: velonus scan
language: system
pass_filenames: false
args: ["./", "--severity", "high"]
```
## 输出示例
```
✓ Running secret detection... [0.3s]
✓ Running Bandit... [2.1s]
✓ Running Semgrep... [4.2s]
✓ Running pip-audit... [1.8s]
✓ Running Safety... [1.2s]
──────────────────────────────────────────────
3 CRITICAL │ 7 HIGH │ 12 MEDIUM │ 34 LOW
⚠ CRITICAL Hardcoded AWS key detected
→ src/config.py:14
CWE-798 · A07:2021
```
## 技术栈
- **CLI** — Python, Typer, Rich
- **API** — FastAPI, PostgreSQL, ARQ
- **AI** — Anthropic Claude (Sonnet 用于修复,Haiku 用于分类)
- **扫描器** — Semgrep, Bandit, pip-audit, Safety
- **仪表板** — Next.js, Tailwind, shadcn/ui
- **认证** — Clerk
- **基础设施** — Docker, Railway
## 目标用户
- Python 开发者和 AI 初创公司
- 没有专门安全团队的小型 SaaS 团队
- 希望安全机制能融入其工作流的工程师
## 许可证
私有 — 在开源发布前保留所有权利。
标签:AI原生, Bandit, CI/CD安全, CISA项目, CLI, CVE审计, DevSecOps, Llama, pip-audit, Python开发, Safety, SAST, Semgrep, StruQ, WiFi技术, WordPress安全扫描, 上游代理, 人工智能, 代码安全, 依赖安全, 修复建议, 安全专业人员, 安全副驾驶, 开发安全, 测试用例, 漏洞枚举, 用户模式Hook绕过, 盲注攻击, 网络安全, 请求拦截, 逆向工具, 隐私保护, 静态应用安全测试