面向 CI/CD 的免费、快速 Insomnia SAST + SCA + 密钥扫描。跨 16 种语言的 AST 污点分析,支持 SARIF 报告。
免费的 SAST + SCA + 密钥扫描——在每次推送时捕获代码漏洞和硬编码密钥——只需一行 YAML。
检测结果直接呈现在你的 GitHub Security 标签页中。无需账户、无需上传、无需安装任何东西。
添加 .github/workflows/sast.yml:
name: SAST
on:
push:
branches: [main]
pull_request:
permissions:
contents: read
security-events: write # lets findings show in the Security tab
jobs:
sast:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: vulnz/vulnerability@v1
with:
fail-on: high
该操作使用 pip install sast 安装引擎,扫描仓库,在发现高危问题时使构建失败,将 SARIF 上传到 Security 标签页,并将 HTML/JSON 报告保存为构件。
更倾向于可视化构建流水线?使用 Pipeline Builder → insom.ai/en/sdlc 生成 YAML。
一步替代五个工具——全部在你的 runner 上运行,不会离开 CI:
| Insomnia SAST | CodeQL | Semgrep | Snyk | Trivy | |
|---|---|---|---|---|---|
| 私有仓库免费 | ✅ | ⚠️ | ✅ | ⚠️ | ✅ |
| 完全在你的 runner 上运行 | ✅ | ✅ | ✅ | ❌ | ✅ |
| 跨文件污点分析 | ✅ | ✅ | ⚠️ | ✅ | ❌ |
| 密钥检测 | ✅ | ❌ | ⚠️ | ✅ | ✅ |
| 密钥实时验证 | ✅ | ❌ | ❌ | ❌ | ❌ |
| 依赖 / 容器 CVE | ✅ | ❌ | ❌ | ✅ | ✅ |
| IaC 配置错误 | ✅ | ❌ | ✅ | ✅ | ✅ |
| CMS / web-shell / 恶意软件 | ✅ | ❌ | ❌ | ❌ | ❌ |
✅ 内置 · ⚠️ 部分支持或有条件 · ❌ 不可用。名称是其各自所有者的商标。
| 输入 | 默认值 | 描述 |
|---|---|---|
path | . | 要扫描的目录。 |
fail-on | (空) | 在此严重级别或以上使任务失败:critical/high/medium/low/info。为空 = 仅报告。 |
format | sarif,json,html | 报告格式(sarif 始终包含)。 |
output | sast-report | 报告输出目录。 |
upload-sarif | true | 将 SARIF 上传到 GitHub 代码扫描(需要 security-events: write)。 |
secrets-only | false | 仅扫描密钥 / 凭据(快速)。 |
no-sca | false | 跳过依赖 CVE(SCA)扫描。 |
changed-only | false | 仅扫描相对于 git HEAD 变更的文件。 |
version | latest | 要下载的引擎版本。 |
args | (空) | 传给 sast CLI 的额外原始标志。 |
artifact-name | insomnia-sast-report | 上传的报告构件名称(为每个矩阵任务提供唯一值)。 |
输出: sarif-file(SARIF 报告的路径)· exit-code(0 干净 / 2 已拦截 / 1 错误)。
# PR gate — changed files only, fail on high
- uses: actions/checkout@v4
with: { fetch-depth: 0 }
- uses: vulnz/vulnerability@v1
with: { changed-only: true, fail-on: high }
# Fast secrets-only check
- uses: vulnz/vulnerability@v1
with: { secrets-only: true, fail-on: medium }
| 位置 | 方式 |
|---|---|
| CI / CD | uses: vulnz/vulnerability@v1 |
| 终端 | pip install sast · brew install vulnz/sast/sast · apt-get install sast |
| 编辑器 | VS Code · JetBrains · Visual Studio |
可在 ubuntu-*、macos-* 和 windows-* 运行器上运行——该引擎通过 pip install sast 安装。
insom.ai/en/sdlc ·
insom.ai/en/plugin
免费 · 与 Insomnia CLI 及 IDE 插件使用同一引擎 · © CQR Cybersecurity LLC