Add Prisma Cloud Code Security Scanner as a Pre-Commit Hook
PreviousAdd Prisma Cloud Code Security Scanner as a Pre-Receive HookNextManage Transporter (Network Tunnels)
Last updated
Was this helpful?
Was this helpful?
export BC_API_KEY=<Your Prisma Cloud Access Key>::<Your Prisma Cloud Secret Key>
export PRISMA_API_URL=<Your Prisma Cloud API URL> # Example: https://api3.prismacloud.ioset BC_API_KEY=<Your Prisma Cloud Access Key>::<Your Prisma Cloud Secret Key>
set PRISMA_API_URL=<Your Prisma Cloud API URL> # Example: https://api3.prismacloud.iorepos:
- repo: https://github.com/bridgecrewio/checkov.git
rev: '3.2.390' # It is recommended to change to tag or sha, such as 3.2.390
hooks:
- id: checkov # Alternatively, use checkov_container for an image based scan
args: [--skip-results-upload, --repo-id, organization/repository, --use-enforcement-rules]pre-commit install --install-hooksrepos:
- repo: https://github.com/bridgecrewio/checkov.git
rev: '3.2.390' # update the tag or use a sha
hooks:
- id: checkov_secrets # Alternatively, use checkov_secrets_container
args: [--skip-results-upload, --repo-id, organization/repository, --use-enforcement-rules, -f]repos:
- repo: https://github.com/bridgecrewio/checkov.git
rev: '3.2.390' # update the tag or use a sha
hooks:
- id: checkov_diff # Alternatively, use checkov_diff_container
args: [--skip-results-upload, --repo-id, organization/repository, --use-enforcement-rules, --skip-check, "CKV2*", -f]repos:
- repo: https://github.com/bridgecrewio/checkov.git
rev: '3.2.390' # update the tag or use a sha
hooks:
- id: checkov_diff
entry: checkov --framework cloudformation --skip-results-upload --repo-id organization/repository --use-enforcement-rules -d .