Skip to content
Snippets Groups Projects
Commit f5d5f2e9 authored by Pytgaen's avatar Pytgaen
Browse files

fix: README for trivy now enabled by default

parent ce26d5ab
Branches
Tags
No related merge requests found
...@@ -236,7 +236,9 @@ In addition to a textual report in the console, this job produces the following ...@@ -236,7 +236,9 @@ In addition to a textual report in the console, this job produces the following
### `py-trivy` job (dependency check) ### `py-trivy` job (dependency check)
This job is **disabled by default** and performs a dependency check analysis using [Trivy](https://github.com/aquasecurity/trivy/). This job performs a dependency check analysis using [Trivy](https://github.com/aquasecurity/trivy/).
:warning: This job is now **enabled by default** since version 7.0.0
It is bound to the `test` stage, and uses the following variables: It is bound to the `test` stage, and uses the following variables:
......
...@@ -844,7 +844,7 @@ variables: ...@@ -844,7 +844,7 @@ variables:
function github_get_latest_version() { function github_get_latest_version() {
if command -v curl &> /dev/null if command -v curl &> /dev/null
then then
curl -sSf -I "https://github.com/$1/releases/latest" | awk -F '/' '/location:/ {sub(/(\r|\n)*$/, "", $NF); print $NF}' curl -sSf -I "https://github.com/$1/releases/latest" | awk -F '/' -v RS='\r\n' '/location:/ {print $NF}'
elif command -v python3 &> /dev/null elif command -v python3 &> /dev/null
then then
python3 -c "import urllib.request;url='https://github.com/$1/releases/latest';opener=urllib.request.build_opener(type('NoRedirection', (urllib.request.HTTPErrorProcessor,), {'http_response': lambda self, req, resp: resp, 'https_response': lambda self, req, resp: resp})());req=urllib.request.Request(url, method='HEAD');print(opener.open(req).headers.get('Location').split('/')[-1])" python3 -c "import urllib.request;url='https://github.com/$1/releases/latest';opener=urllib.request.build_opener(type('NoRedirection', (urllib.request.HTTPErrorProcessor,), {'http_response': lambda self, req, resp: resp, 'https_response': lambda self, req, resp: resp})());req=urllib.request.Request(url, method='HEAD');print(opener.open(req).headers.get('Location').split('/')[-1])"
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment