From 5e0a0d2918fd7539bd2e1cb955e99ef5857db1f5 Mon Sep 17 00:00:00 2001
From: Bertrand Goareguer <bertrand.goareguer@gmail.com>
Date: Fri, 4 Oct 2024 13:01:10 +0000
Subject: [PATCH] fix(trivy): use --pkg-types instead of deprecated --vuln-type
 option

---
 README.md                      | 2 +-
 kicker.json                    | 2 +-
 templates/gitlab-ci-python.yml | 2 +-
 3 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/README.md b/README.md
index 08b2bef..1c82570 100644
--- a/README.md
+++ b/README.md
@@ -246,7 +246,7 @@ It is bound to the `test` stage, and uses the following variables:
 | ---------------- | ----------------------------------------------------------------------- | ----------------- |
 | `trivy-disabled` / `PYTHON_TRIVY_DISABLED` | Set to `true` to disable Trivy job                                 | _none_ (enabled) |
 | `trivy-dist-url` / `PYTHON_TRIVY_DIST_URL` | Url to the `tar.gz` package for `linux_amd64` of Trivy to use (ex: `https://github.com/aquasecurity/trivy/releases/download/v0.51.1/trivy_0.51.1_Linux-64bit.tar.gz`)<br/>_When unset, the latest version will be used_ | _none_ |
-| `trivy-args` / `PYTHON_TRIVY_ARGS`       | Additional [Trivy CLI options](https://aquasecurity.github.io/trivy/v0.21.1/getting-started/cli/fs/) | `--vuln-type library`   |
+| `trivy-args` / `PYTHON_TRIVY_ARGS`       | Additional [Trivy CLI options](https://aquasecurity.github.io/trivy/v0.21.1/getting-started/cli/fs/) | `--pkg-types library`   |
 
 In addition to a textual report in the console, this job produces the following reports, kept for one day:
 
diff --git a/kicker.json b/kicker.json
index bccbcb0..cec169c 100644
--- a/kicker.json
+++ b/kicker.json
@@ -145,7 +145,7 @@
         {
           "name": "PYTHON_TRIVY_ARGS",
           "description": "Additional [Trivy CLI options](https://aquasecurity.github.io/trivy/v0.21.1/getting-started/cli/fs/)",
-          "default": "--vuln-type library",
+          "default": "--pkg-types library",
           "advanced": true
         }
       ]
diff --git a/templates/gitlab-ci-python.yml b/templates/gitlab-ci-python.yml
index ed1eb56..73eed2c 100644
--- a/templates/gitlab-ci-python.yml
+++ b/templates/gitlab-ci-python.yml
@@ -108,7 +108,7 @@ spec:
       default: ''
     trivy-args:
       description: Additional [Trivy CLI options](https://aquasecurity.github.io/trivy/v0.21.1/getting-started/cli/fs/)
-      default: --vuln-type library
+      default: --pkg-types library
     sbom-disabled:
       description: Disable Software Bill of Materials
       type: boolean
-- 
GitLab