Skip to content

Commit

Permalink
feat: add checkov security scan
Browse files Browse the repository at this point in the history
  • Loading branch information
pmoscode committed May 25, 2023
1 parent 2cea8da commit 041708a
Showing 1 changed file with 53 additions and 0 deletions.
53 changes: 53 additions & 0 deletions .github/workflows/checkov.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
name: checkov

on:
push:
branches: [ "main" ]
pull_request:
# The branches below must be a subset of the branches above
branches: [ "main" ]
schedule:
- cron: '35 15 * * 5'
workflow_dispatch:

jobs:
lint:
name: Checkov
runs-on: ubuntu-20.04
permissions:
actions: read
contents: read
security-events: write
steps:
- name: Checkout code
uses: actions/checkout@v3

- name: Set up Helm
uses: azure/setup-helm@v3
with:
version: v3.11.2

- name: Checkov GitHub Action
uses: bridgecrewio/checkov-action@v12
with:
directory: .
framework: helm
quiet: true
soft_fail: true
enable_secrets_scan_all_files: true
# This will add both a CLI output to the console and create a results.sarif file
output_format: cli,sarif
output_file_path: console,results.sarif
api-key: ${{ secrets.BC_API_KEY }}

- name: Upload SARIF file
uses: github/codeql-action/upload-sarif@v2

# Results are generated only on a success or failure
# this is required since GitHub by default won't run the next step
# when the previous one has failed. Security checks that do not pass will 'fail'.
# An alternative is to add `continue-on-error: true` to the previous step
# Or 'soft_fail: true' to checkov.
if: success() || failure()
with:
sarif_file: results.sarif

0 comments on commit 041708a

Please sign in to comment.