README.md1.9 KB
View on GitHubhooks-kics
Demonstrates the kics hook kind: a before-terraform-plan hook that
runs kics scan against the component and renders the SARIF findings
summary in the terminal.
What this shows
kind: kicswith zero configuration.- KICS writes its results into an output directory (
results.sarifinside$ATMOS_OUTPUT_DIR), unlike most scanners which take a single output file path. The kind handles this by reading$ATMOS_OUTPUT_DIR/results.sarifin its ResultHandler.
Requirements
tofuon PATH.- The
kicsbinary auto-installs via the per-project toolchain registry override in this example'satmos.yaml. The upstream Aqua registry models KICS astype: go_build(which the Atmos installer doesn't support yet), so we declare it ourselves as agithub_releasetarball — the same pattern works for any tool the upstream registry doesn't handle well. KICS_QUERIES_PATHenv var pointing at the KICS query library. KICS's GitHub release tarballs contain only the binary — the query library is shipped separately. Set it before running:- Homebrew:
export KICS_QUERIES_PATH=$(brew --prefix kics)/share/kics/assets/queries - Source clone:
git clone https://github.com/Checkmarx/kics && export KICS_QUERIES_PATH=$(pwd)/kics/assets/queries
- Homebrew:
- No AWS credentials needed — kics parses HCL directly.
Cross-platform notes
The toolchain registry override gives you auto-install of the KICS
binary on macOS, Linux, and Windows — all of which have proper KICS
release tarballs (darwin_amd64, darwin_arm64, linux_amd64,
linux_arm64, windows_amd64, windows_arm64). The query library
question is the same on every platform.
Run
atmos terraform plan bucket -s test
Expected: kics runs before plan and reports findings on the over-permissive security group and S3 misconfigurations.