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

adds kics scanning #171

Merged
merged 3 commits into from
Oct 28, 2022
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
29 changes: 29 additions & 0 deletions .github/workflows/kics-iac.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
name: kics scanning
on:
push:
branches: master
jobs:
kics:
runs-on: ubuntu-latest
env:
AWS_ACCESS_KEY_ID: ${{ secrets.VULN_REPORTS_AWS_KEY_ID }}
AWS_SECRET_ACCESS_KEY: ${{ secrets.VULN_REPORTS_AWS_SECRET_ACCESS_KEY }}
VULN_REPORTS_AWS_BUCKET: ${{ secrets.VULN_REPORTS_AWS_BUCKET }}
AWS_EC2_METADATA_DISABLED: true
steps:
- uses: actions/checkout@v2
- name: run kics Scan
uses: checkmarx/kics-github-action@v1.6
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
KEY="`date +%Y`/`date +%m`/`date +%d`/${GITHUB_REPOSITORY#*/}_${GITHUB_REF#refs/heads/}_kics_`date +%s`.json"
echo "[i] writing to s3 object '$KEY'"
aws s3 cp res/results.json s3://$VULN_REPORTS_AWS_BUCKET/$KEY