-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #32 from bjoern-reetz/add-trivy-plugin
feat: add plugin for Trivy
- Loading branch information
Showing
3 changed files
with
56 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
# Trivy plugin | ||
|
||
[Trivy](https://aquasecurity.github.io/trivy) plugin for [proto](https://github.com/moonrepo/proto). | ||
|
||
## Installation | ||
|
||
This is a community plugin and is thus not built-in to proto. In order to use it, first either add it to your global or project-based `.prototools` by running: | ||
|
||
### Global install | ||
|
||
```shell | ||
proto plugin add trivy "source:https://raw.githubusercontent.com/appthrust/proto-toml-plugins/main/trivy/plugin.toml" --global | ||
proto install trivy | ||
``` | ||
|
||
### Per-project install | ||
|
||
```shell | ||
proto plugin add trivy "source:https://raw.githubusercontent.com/appthrust/proto-toml-plugins/main/trivy/plugin.toml" | ||
proto pin trivy latest --resolve | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
import { run } from "../testkit.js"; | ||
|
||
run({ | ||
name: "trivy", | ||
afterInstall: async ($) => { | ||
await $`trivy --version`; | ||
}, | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
# A TOML plugin for Trivy: | ||
# https://moonrepo.dev/docs/proto/toml-plugin | ||
|
||
name = "Trivy" | ||
type = "cli" | ||
|
||
[platform.freebsd] | ||
download-file = "trivy_{version}_FreeBSD-{arch}.tar.gz" | ||
|
||
[platform.linux] | ||
download-file = "trivy_{version}_Linux-{arch}.tar.gz" | ||
|
||
[platform.macos] | ||
download-file = "trivy_{version}_macOS-{arch}.tar.gz" | ||
|
||
[install] | ||
checksum-url = "https://github.com/aquasecurity/trivy/releases/download/v{version}/trivy_{version}_checksums.txt" | ||
download-url = "https://github.com/aquasecurity/trivy/releases/download/v{version}/{download_file}" | ||
|
||
[install.arch] | ||
x86 = "36bit" | ||
x86_64 = "64bit" | ||
arm = "ARM" | ||
aarch64 = "ARM64" | ||
|
||
[resolve] | ||
git-url = "https://github.com/aquasecurity/trivy" |