diff --git a/README.md b/README.md index fda70ead3df721d8188407cffeda5aeeb6c33168..1fcd1bc0eab032f2da7206df9e940dcf3376ba99 100644 --- a/README.md +++ b/README.md @@ -236,7 +236,9 @@ In addition to a textual report in the console, this job produces the following ### `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: diff --git a/templates/gitlab-ci-python.yml b/templates/gitlab-ci-python.yml index ce84ae3cb650b16d77483b20090cdc8c880af3bb..2c49db0a39f963e7036340237924b42ca902c870 100644 --- a/templates/gitlab-ci-python.yml +++ b/templates/gitlab-ci-python.yml @@ -844,7 +844,7 @@ variables: function github_get_latest_version() { if command -v curl &> /dev/null 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 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])"