-
Notifications
You must be signed in to change notification settings - Fork 124
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
1 changed file
with
29 additions
and
0 deletions.
There are no files selected for viewing
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 |
---|---|---|
@@ -0,0 +1,29 @@ | ||
name: kics scanning | ||
on: | ||
push: | ||
branches: dev | ||
jobs: | ||
kics: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- name: run kics Scan | ||
uses: checkmarx/[email protected] | ||
with: | ||
path: . | ||
ignore_on_exit: results | ||
output_path: res/ | ||
- name: display kics results | ||
run: | | ||
cat res/results.json | ||
- name: upload scan results | ||
run: | | ||
set -eu | ||
apt-get update | ||
apt-get install awscli -y | ||
KEY="`date +%Y`/`date +%m`/`date +%d`/${GITHUB_REPOSITORY#*/}_${GITHUB_REF#refs/heads/}_kics_`date +%s`.json" | ||
echo "[i] writing to s3 object '$KEY'" | ||
mv res/results.json res/${KEY#*/*/*/*} | ||
export AWS_ACCESS_KEY_ID=${{ secrets.VULN_REPORTS_AWS_KEY_ID }} | ||
export AWS_SECRET_ACCESS_KEY=${{ secrets.VULN_REPORTS_AWS_SECRET_ACCESS_KEY }} | ||
aws s3 cp res/${KEY#*/*/*/*} s3://${{ secrets.VULN_REPORTS_AWS_BUCKET }}/$KEY |