From 61ec312f22acfea22116a4b640b072b2f179fca3 Mon Sep 17 00:00:00 2001 From: John Vandenberg Date: Thu, 22 May 2025 21:19:10 +0800 Subject: [PATCH] Add trivy (#970) --- TOOLS.md | 1 + manifests/trivy.json | 76 +++++++++++++++++++++++++++++++++++ tools/codegen/base/trivy.json | 23 +++++++++++ 3 files changed, 100 insertions(+) create mode 100644 manifests/trivy.json create mode 100644 tools/codegen/base/trivy.json diff --git a/TOOLS.md b/TOOLS.md index d5abd56d..3cf18b57 100644 --- a/TOOLS.md +++ b/TOOLS.md @@ -62,6 +62,7 @@ See the [Supported tools section in README.md](README.md#supported-tools) for ho | [**shfmt**](https://github.com/mvdan/sh) | `$HOME/.install-action/bin` | [GitHub Releases](https://github.com/mvdan/sh/releases) | Linux, macOS, Windows | [BSD-3-Clause](https://github.com/mvdan/sh/blob/master/LICENSE) | | [**syft**](https://github.com/anchore/syft) | `$HOME/.install-action/bin` | [GitHub Releases](https://github.com/anchore/syft/releases) | Linux, macOS, Windows | [Apache-2.0](https://github.com/anchore/syft/blob/main/LICENSE) | | [**taplo**](https://github.com/tamasfe/taplo) | `$CARGO_HOME/bin` | [GitHub Releases](https://github.com/tamasfe/taplo/releases) | Linux, macOS, Windows | [MIT](https://github.com/tamasfe/taplo/blob/master/LICENSE) | +| [**trivy**](https://github.com/aquasecurity/trivy) | `$HOME/.install-action/bin` | [GitHub Releases](https://github.com/aquasecurity/trivy/releases) | Linux, macOS, Windows | [Apache-2.0](https://github.com/aquasecurity/trivy/blob/main/LICENSE) | | [**trunk**](https://github.com/trunk-rs/trunk) | `$CARGO_HOME/bin` | [GitHub Releases](https://github.com/trunk-rs/trunk/releases) | Linux, macOS, Windows | [MIT](https://github.com/trunk-rs/trunk/blob/main/LICENSE-MIT) OR [Apache-2.0](https://github.com/trunk-rs/trunk/blob/main/LICENSE-APACHE) | | [**typos**](https://github.com/crate-ci/typos) | `$CARGO_HOME/bin` | [GitHub Releases](https://github.com/crate-ci/typos/releases) | Linux, macOS, Windows | [MIT](https://github.com/crate-ci/typos/blob/master/LICENSE-MIT) OR [Apache-2.0](https://github.com/crate-ci/typos/blob/master/LICENSE-APACHE) | | [**valgrind**](https://valgrind.org/) | `/snap/bin` | [snap](https://snapcraft.io/install/valgrind/ubuntu) | Linux | [GPL-2.0](https://sourceware.org/git/?p=valgrind.git;a=blob;f=COPYING;hb=HEAD) | diff --git a/manifests/trivy.json b/manifests/trivy.json new file mode 100644 index 00000000..dd6e2c8c --- /dev/null +++ b/manifests/trivy.json @@ -0,0 +1,76 @@ +{ + "rust_crate": null, + "template": { + "x86_64_linux_gnu": { + "url": "https://github.com/aquasecurity/trivy/releases/download/v${version}/trivy_${version}_Linux-64bit.tar.gz", + "bin": "trivy" + }, + "x86_64_macos": { + "url": "https://github.com/aquasecurity/trivy/releases/download/v${version}/trivy_${version}_macOS-64bit.tar.gz", + "bin": "trivy" + }, + "x86_64_windows": { + "url": "https://github.com/aquasecurity/trivy/releases/download/v${version}/trivy_${version}_windows-64bit.zip", + "bin": "trivy.exe" + }, + "aarch64_linux_gnu": { + "url": "https://github.com/aquasecurity/trivy/releases/download/v${version}/trivy_${version}_Linux-ARM64.tar.gz", + "bin": "trivy" + }, + "aarch64_macos": { + "url": "https://github.com/aquasecurity/trivy/releases/download/v${version}/trivy_${version}_macOS-ARM64.tar.gz", + "bin": "trivy" + } + }, + "license_markdown": "[Apache-2.0](https://github.com/aquasecurity/trivy/blob/main/LICENSE)", + "latest": { + "version": "0.62.1" + }, + "0.62": { + "version": "0.62.1" + }, + "0.62.1": { + "x86_64_linux_gnu": { + "etag": "0x8DD8CD66B2C973F", + "checksum": "7da92b2ca503d08eb15e717585fa4ffb95ef2c5dc4c554204882d7d26d386a6a" + }, + "x86_64_macos": { + "etag": "0x8DD8CD66B02A920", + "checksum": "819bf4dad9c3bb4e78bbd11d08b61bdc4663b33777121b3f43372986f7cb3d3e" + }, + "x86_64_windows": { + "etag": "0x8DD8CD66CA4E62B", + "checksum": "f6d9b422f10af2d7a21b4924d36400d8a76932c9159b5feefaa8aee3e45a82bd" + }, + "aarch64_linux_gnu": { + "etag": "0x8DD8CD669AB51A2", + "checksum": "50e13c5cdd3e3b610e0dc554e3bc58bc6f58eabe3e42a6b28961a23ac6eff0df" + }, + "aarch64_macos": { + "etag": "0x8DD8CD66C735F7B", + "checksum": "0bbfa581a4139c6fef21f4129233ae6f02a9f4b53039327e62eccd7956af2ba1" + } + }, + "0.62.0": { + "x86_64_linux_gnu": { + "etag": "0x8DD880CCF3EE84C", + "checksum": "1be4420999ffde59b9a6900f2c2481a2f4e50fd2e0ac738ad028944563ee6c60" + }, + "x86_64_macos": { + "etag": "0x8DD880CCD4C9C5F", + "checksum": "8f6d54c7de5c7247bb92b51d29d2542be8006111515ceaf50fe8185adb59ad89" + }, + "x86_64_windows": { + "etag": "0x8DD880CCD7359BB", + "checksum": "b30da5d15587824335cbb88a62585f00a3aac18f3f754d3ad74d68327e2efc46" + }, + "aarch64_linux_gnu": { + "etag": "0x8DD880CCF085E40", + "checksum": "82c8acca00390bf5e014b26abb03e24ba754824c4f87ead5564cd56375df07c1" + }, + "aarch64_macos": { + "etag": "0x8DD880CCF853F18", + "checksum": "727a8865c2caf6841a1f4668fd7702f442ae088fd08e3c3719e4f731c1f11333" + } + } +} diff --git a/tools/codegen/base/trivy.json b/tools/codegen/base/trivy.json new file mode 100644 index 00000000..d9761604 --- /dev/null +++ b/tools/codegen/base/trivy.json @@ -0,0 +1,23 @@ +{ + "repository": "https://github.com/aquasecurity/trivy", + "tag_prefix": "v", + "bin": "${package}${exe}", + "version_range": ">= 0.62.0", + "platform": { + "x86_64_linux_gnu": { + "asset_name": "${package}_${version}_Linux-64bit.tar.gz" + }, + "x86_64_macos": { + "asset_name": "${package}_${version}_macOS-64bit.tar.gz" + }, + "x86_64_windows": { + "asset_name": "${package}_${version}_windows-64bit.zip" + }, + "aarch64_linux_gnu": { + "asset_name": "${package}_${version}_Linux-ARM64.tar.gz" + }, + "aarch64_macos": { + "asset_name": "${package}_${version}_macOS-ARM64.tar.gz" + } + } +}