Skip to content
KitploitKITPLOIT
工具博客
提交
工具博客
提交

黑客、渗透测试和网络安全工具,武装您的安全武器库!

Kitploit 是一个黑客、网络安全和渗透测试工具的目录。发现最新的项目更新,查找漏洞、分析系统、自动化测试并加强你的安全。

··订阅源·联系·隐私·© 2026 Kitploit

工具目录

分类

查看所有分类
Loading categories
trivy-db — 通过聚合来自 NVD、Red Hat、Debian 等来源的安全公告,构建并管理 Trivy 漏洞数据库。一款用于数据库创建、压缩和分发的 CLI 工具和库。 | Kitploit
工具/GitHubGitHub/aquasecurity/trivy-db
漏洞分析实用工具与框架威胁情报
GitHubaquasecurity/trivy-db

trivy-db

通过聚合来自 NVD、Red Hat、Debian 等来源的安全公告,构建并管理 Trivy 漏洞数据库。一款用于数据库创建、压缩和分发的 CLI 工具和库。

查看仓库
3411976天前Kitploit 审核通过

最受欢迎

查看全部 →

发现我们社区最常用的工具。

探索所有工具

浏览我们的工具集合

查看所有工具 →
分享

trivy-db

Build DB GitHub Release Downloads Go Report Card Go Doc License

概述

trivy-db 是一个用于操作 Trivy DB 的 CLI 工具和库。

库

Trivy 在内部使用 trivy-db 来操作漏洞数据库。该数据库包含来自 NVD、Red Hat、Debian 等的漏洞信息。

CLI

trivy-db CLI 工具用于构建漏洞数据库。GitHub Actions 工作流 会定期使用 trivy-db 构建新版本的漏洞数据库,并将其上传到 GitHub Container Registry(请参阅下面的下载漏洞数据库)。

root@kitploit:~
NAME:
   trivy-db - Trivy DB builder

USAGE:
   main [global options] command [command options] image_name

VERSION:
   0.0.1

COMMANDS:
     build    build a database file
     help, h  Shows a list of commands or help for one command

GLOBAL OPTIONS:
   --help, -h     show help
   --version, -v  print the version

构建数据库

要在本地构建 trivy-db,可以按以下顺序使用 Makefile 中的命令:

root@kitploit:~
make db-fetch-langs db-fetch-vuln-list  # To download all advisories and other required files (`./cache` dir by default)
make build  # Build `trivy-db` binary
make db-build  # Build database (`./out` dir by default)
make db-compact  # Compact database (`./assets` dir by default)
make db-compress  # Compress database into `db.tar.gz` file

要构建 trivy-db 镜像并推送到 registry,你需要使用 Oras CLI。例如对于 ghcr:

root@kitploit:~
./oras push --artifact-type application/vnd.aquasec.trivy.config.v1+json \
"ghcr.io/aquasecurity/trivy-db:2" \
db.tar.gz:application/vnd.aquasec.trivy.db.layer.v1.tar+gzip

更新间隔

Trivy DB 每 6 小时构建一次。 默认情况下,元数据文件中指定的更新间隔为 24 小时。 如果你需要更频繁地更新 Trivy DB,你可以手动上传一个新的 Trivy DB。

下载漏洞数据库

版本 1(已弃用)

Trivy DB v1 已于 2023 年 2 月停止支持。请升级 Trivy 至 v0.23.0 或更高版本。

在讨论中阅读更多关于 Trivy DB v1 弃用的信息。

版本 2

Trivy DB v2 托管在 GHCR 上。 虽然 GitHub 默认显示 docker pull 命令,但请注意它不能被 docker pull 下载,因为它不是容器镜像。

你可以通过 Trivy 或 Oras CLI 下载实际编译好的数据库。

Trivy:

root@kitploit:~
TRIVY_TEMP_DIR=$(mktemp -d)
trivy --cache-dir $TRIVY_TEMP_DIR image --download-db-only
tar -cf ./db.tar.gz -C $TRIVY_TEMP_DIR/db metadata.json trivy.db
rm -rf $TRIVY_TEMP_DIR

oras >= v0.13.0:

root@kitploit:~
$ oras pull ghcr.io/aquasecurity/trivy-db:2

oras < v0.13.0:

root@kitploit:~
$ oras pull -a ghcr.io/aquasecurity/trivy-db:2

该数据库可用于离线环境。

下载工具