chore: synced file(s) with honestbank/.github #637
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: "Checkov GitHub Action" | |
permissions: read-all | |
on: | |
pull_request: | |
branches: [test, dev, qa, prod, main] | |
jobs: | |
checkov: | |
name: checkov | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v3 | |
with: | |
submodules: "recursive" | |
token: ${{ secrets.GITHUB_TOKEN }} | |
- name: Create empty baseline (if needed) | |
run: | | |
if [ -f .checkov.baseline ]; then | |
echo "⏩⏩⏩ Baseline file exists - do nothing." | |
else | |
echo "🆕🆕🆕 Baseline file does not exist - creating empty baseline file." | |
echo "{}" >> .checkov.baseline | |
fi | |
- name: Output baseline contents to console | |
run: | | |
echo "Checkov baseline file (.checkov.baseline) contents:" | |
cat .checkov.baseline | |
- name: Run Checkov | |
id: checkov | |
uses: bridgecrewio/checkov-action@master | |
with: | |
config_file: ".checkov.yaml" |