Add KICS scan for image #87
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
name: Repository Checks | |
on: [ push ] | |
jobs: | |
lint: | |
runs-on: ubuntu-latest | |
steps: | |
# Get the code from the repository to be packaged | |
- name: Get Repo | |
uses: actions/checkout@v3 | |
# Install pre-commit and run the checks | |
- name: Pre-commit Checks | |
run: | | |
pip -q install pre-commit | |
pre-commit run --all-files | |
# Lint the Dockerfile for syntax correctness and conformance with | |
# standards. | |
- name: Docker Lint | |
uses: luke142367/[email protected] | |
with: | |
target: Dockerfile | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
# Scan the Dockerfile with KICS to check for security issues. | |
- name: Docker Scan | |
uses: Checkmarx/[email protected] | |
with: | |
path: . | |
fail_on: high,medium | |
output_path: results | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
# Upload the results of the KICS scan as a build artifact. | |
- name: Upload SARIF file | |
uses: github/codeql-action/upload-sarif@v2 | |
with: | |
sarif_file: results-dir/results.sarif | |
test: | |
runs-on: ubuntu-latest | |
steps: | |
# Get the code from the repository to be packaged | |
- name: Get Repo | |
uses: actions/checkout@v3 | |
- name: Run Action - Specific File | |
uses: ./ | |
with: | |
case-path: "./tests/data/simple-case.jsonld" | |
case-version: "case-1.2.0" | |
- name: Run Action - Directory Filter | |
uses: ./ | |
with: | |
case-path: "./tests/data/" | |
case-version: "case-1.2.0" | |
extension-filter: "jsonld" | |
- name: Run Action - Directory No Filter | |
uses: ./ | |
with: | |
case-path: "./tests/data/" | |
case-version: "case-1.2.0" |