There are multiple ways to get KICS up and running:
KICS is available as a Docker image and can be used as follows:
To scan a directory/file on your host you have to mount it as a volume to the container and specify the path on the container filesystem with the -p KICS parameter (see Scan Command Options section below)
docker pull checkmarx/kics:latest
docker run -v {path_to_host_folder_to_scan}:/path checkmarx/kics:latest scan -p "/path" -o "/path/results.json"You can provide your own path to the queries directory with -q CLI option (see CLI Options section below), otherwise the default directory will be used The default ./assets/queries is built-in in the image.
KICS release process is pretty straightforward. When we're releasing a new version, we'll pack KICS executables for both Linux and Windows operating systems. Our security queries will be included in the ZIP files and tarballs, so that you can scan your IaC code with the out-of-the-box queries
So all you need is:
- Go to KICS releases
- Download KICS binaries based on your OS
- Extract files
- Run kics executable with the cli options as described below (note that kics binary should be located in the same directory as queries directory)
./kics scan -p <path-of-your-project-to-scan> -o <output-results.json>
- Download and install Go from https://golang.org/dl/
- Clone the repository:
git clone https://github.com/Checkmarx/kics.gitcd kics - Kick a scan!
go run ./cmd/console/main.go scan -p <path-of-your-project-to-scan> -o <output-results.json>
generate-id Generates uuid for query
help Help about any command
scan Executes a scan analysis
version Displays the current version-h, --help help
-o, --output-path string file path to store result in json format
-p, --path string path to file or directory to scan
-d, --payload-path string file path to store source internal representation in JSON format
-q, --queries-path string path to directory with queries (default "./assets/queries")
-v, --verbose verbose scan- Check how you can easily integrate it into your CI for any project.
- Explore the output results format and quickly fix the issues detected.
Want to go the next mile and contribute? You're welcome!