Repository navigation
ci(checkov): integrate Checkov for IaC security scanning - #417
Open
DoloresGarciaE wants to merge 3 commits into
Open
DoloresGarciaE wants to merge 3 commits into
DoloresGarciaE wants to merge 3 commits into
Conversation
Run Checkov on pushes and pull requests to dev/main (plus manual dispatch) against GitHub Actions workflows, Dockerfiles and Kubernetes manifests. Findings are surfaced as run annotations, in the job summary and as code scanning alerts (SARIF upload, skipped on fork PRs where the token is read-only). Phase 1 is informational: .checkov.yml sets soft-fail: true and keeps the blocking hard-fail-on list commented out. The secrets framework is intentionally excluded (high-entropy false positives on tx hashes and test keys; Gitleaks is tracked separately in openscan-explorer#369), and worker/wrangler.toml is out of scope because Checkov has no TOML parser. Refs openscan-explorer#393
The repository holds no Hardhat test keys; the high-entropy values that would trip the secrets framework are tx hashes, contract addresses and other chain data in the e2e fixtures. Refs openscan-explorer#393
This branch has not been deployed
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Adds Checkov infrastructure-as-code scanning to CI. The new
Checkovworkflow scans GitHub Actions workflows (plus any Dockerfile or Kubernetes manifest added later) on pushes and pull requests todev/main, and can be run manually. Findings are surfaced three ways: inline run annotations (the action's problem matcher), a job summary, and code scanning alerts (SARIF upload under thecheckovcategory).Phase 1 is informational:
.checkov.ymlsetssoft-fail: true, so the check stays green while findings are reported. The blockinghard-fail-onlist for the critical GitHub Actions checks is already written in the config, commented out.Related Issue
Closes #393 (part of #369)
Type of Change
Changes Made
.github/workflows/checkov.yml: new workflow (push/PR todevandmain,workflow_dispatch);bridgecrewio/checkov-actionpinned to a commit SHA (v12.3135.0); outputscli,sarif,github_failed_only; failed checks appended to the job summary; SARIF uploaded withgithub/codeql-action/upload-sarif@v4, skipped on fork PRs whereGITHUB_TOKENis read-only. Top-levelpermissions: contents: read, job-levelsecurity-events: write..checkov.yml: explicit frameworks (github_actions,dockerfile,kubernetes),soft-fail: true, documented phase-2hard-fail-onblock andskip-checkplaceholder,quiet/compactfor console output.README.md: Checkov workflow badge..claude/rules/commands.md: local scan commands (pipxand Docker) and where findings show up.Screenshots (if applicable)
N/A
Checklist
npm run format:fixandnpm run lint:fix(N/A: nosrc/changes; Biome does not cover YAML/Markdown)npm run typecheckwith no errors (N/A)npm run test:run(N/A)Additional Notes
bridgecrew/checkovDocker image, Checkov 3.3.30): 469 passed, 11 failed, allCKV2_GHA_1. That check fails whenever a workflow has no top-levelpermissions:block, even when permissions are set at job level. The 11 workflows areaudit,lint,publish-npm,e2e-all,e2e-nightlyand the sixe2e-*suites. They are left as informational findings in this PR; the fix is addingpermissions:/contents: readat the top of each file, and it is a prerequisite for enablinghard-fail-onwithCKV2_GHA_1.CRITICAL/HIGH) does not work without a Prisma Cloud API key (built-in checks carry no severity), so phase 2 uses explicit check IDs.secretsframework is intentionally excluded: tx hashes, addresses and the Hardhat test keys trip high-entropy detection, and secret scanning is tracked separately (Gitleaks, Quality Tooling Rollout #369).worker/wrangler.tomlcannot be covered by built-in policies (Checkov has no TOML parser); it only holds variable names.main.::remove-matcher owner=checkov::if they get in the way.