-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Mettre à jour le workflow Kubelinter pour utiliser l'action de téléch…
…argement de SARIF
- Loading branch information
Showing
2 changed files
with
8 additions
and
58 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
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 |
---|---|---|
|
@@ -13,26 +13,14 @@ jobs: | |
- name: Checkout code | ||
uses: actions/checkout@v2 | ||
|
||
- name: Install Kubelinter | ||
run: | | ||
curl -Lo kubelinter.tar.gz https://github.com/stackrox/kube-linter/releases/latest/download/kube-linter-linux.tar.gz | ||
tar -xzf kubelinter.tar.gz | ||
chmod +x kube-linter | ||
sudo mv kube-linter /usr/local/bin/ | ||
- name: lint and post a sarif report | ||
run: | | ||
kube-linter lint --output-format=sarif --output kube-linter-report.sarif | ||
continue-on-error: true | ||
- name: Scan repo with kube-linter | ||
uses: stackrox/[email protected] | ||
with: | ||
directory: . | ||
format: sarif | ||
output-file: kube-linter-results.sarif | ||
|
||
- name: Upload SARIF report | ||
- name: Upload kube-linter results | ||
uses: github/codeql-action/upload-sarif@v3 | ||
with: | ||
sarif_file: kube-linter-report.sarif | ||
|
||
- name: Fail if the kube-linter report contains lines | ||
run: | | ||
if grep -q . kube-linter-report.txt; then | ||
echo "kube-linter found issues in the repository" | ||
exit 1 | ||
fi | ||
sarif_file: kube-linter-results.sarif |