Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add kube version argument #118

Merged

Conversation

oliver-equinix
Copy link
Contributor

trivy has a helm-kube-version which by default is currently 1.20. When scanning charts if the chart has a minimum chart version higher than the helm-kube-version the scan returns an error.

trivy supports setting this version with --helm-kube-version. This pull request adds the ability to set --helm-kube-version in the plugin for example:

- label: ":trivy: scan"
  command: "echo '--- Running the Trivy security scanner'"
  plugins:
    - equinixmetail-buildkite/trivy#v1.20.0:
        kube-version: "1.21"

Comment on lines +115 to +119
if [[ -n "${BUILDKITE_PLUGIN_TRIVY_KUBE_VERSION:-}" ]] ; then
fsargs+=("--helm-kube-version" "${BUILDKITE_PLUGIN_TRIVY_KUBE_VERSION}")
echo "using non-default kube-version"
fi

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

looks like trivy accepts helm-kube-version flag regardless of which subcommand or scanner is used, so we should be ok

plugin.yml Outdated Show resolved Hide resolved
@prezha prezha merged commit 52cf2f7 into equinixmetal-buildkite:main Jan 14, 2025
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants