【问题标题】:Trivy Scan failed on Qcow2 ImageTrivy 扫描在 Qcow2 图像上失败
【发布时间】:2021-07-09 04:39:48
【问题描述】:

我正在尝试使用 Trivy 扫描 qcow2 图像,但它没有通过测试?

trivy --debug fs /home/user/fedora32_image.qcow2
2021-04-13T14:01:53.535-0700 DEBUG Severities: UNKNOWN,LOW,MEDIUM,HIGH,CRITICAL
2021-04-13T14:01:53.557-0700 DEBUG cache dir: /home/user/.cache/trivy
2021-04-13T14:01:53.558-0700 DEBUG DB update was skipped because DB is the latest
2021-04-13T14:01:53.558-0700 DEBUG DB Schema: 1, Type: 1, UpdatedAt: 2021-04-13 12:07:40.493338704 +0000 UTC, NextUpdate: 2021-04-14 00:07:40.493338404 +0000 UTC, DownloadedAt: 2021-04-13 17:17:26.74233259 +0000 UTC
2021-04-13T14:01:53.558-0700 DEBUG Vulnerability type: [os library]
2021-04-13T14:01:53.624-0700 DEBUG Artifact ID: sha256:3404e98968ad338dc60ef74c0dd5bdd893478415cd2296b0c265a5650b3ae4d6
2021-04-13T14:01:53.624-0700 DEBUG Blob IDs: [sha256:3404e98968ad338dc60ef74c0dd5bdd893478415cd2296b0c265a5650b3ae4d6]
2021-04-13T14:01:53.624-0700 WARN OS is not detected and vulnerabilities in OS packages are not detected.
2021-04-13T14:01:53.624-0700 INFO Trivy skips scanning programming language libraries because no supported file was detected

关于调试有什么建议吗?

【问题讨论】:

    标签: linux kubernetes virtual-machine qemu trivy


    【解决方案1】:

    Trivy 的fs 模式需要一个实际的解压文件系统才能读取。您可以挂载该磁盘映像并将 Trivy 指向它,或者从 VM 内部运行 Trivy。它唯一能理解的打包图像格式是容器,因为它主要是一个容器工具。

    【讨论】:

    • 感谢您的回复,我尝试在 Fedora 虚拟机中运行它,但目前 trivy 似乎不支持 Fedora。您是否知道任何可以对 VM 映像执行漏洞扫描的工具?
    • 取决于您要查找的内容,推荐工具通常超出了 StackOverflow 的范围,因为有很多可能的选项和要求。
    • 当然,我看到 trivy 不支持 Fedora 映像?我用 qcow2 镜像开发了一个 docker 文件并将其转换为容器镜像,但是 trivy 无法扫描镜像
    猜你喜欢
    • 2023-01-29
    • 2022-08-24
    • 2013-07-02
    • 1970-01-01
    • 2011-09-01
    • 1970-01-01
    • 2016-02-09
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多