File tree Expand file tree Collapse file tree 2 files changed +11
-3
lines changed
ci/images/static-checks/content/bin Expand file tree Collapse file tree 2 files changed +11
-3
lines changed Original file line number Diff line number Diff line change @@ -118,7 +118,7 @@ spec:
118118 image : quay.io/redhat-pipeline-service/static-checks:$(params.target_branch)
119119 script : |
120120 #!/usr/bin/env bash
121- /opt/ static-checks/bin/checkov.sh --workspace_dir $(workspaces.source.path)
121+ $(workspaces.source.path)/ci/images/ static-checks/content/ bin/checkov.sh --workspace_dir $(workspaces.source.path) --config-file $(workspaces.source.path)/ci/images/static-checks/content/config/checkov.yaml
122122 workspaces :
123123 - name : source
124124 workspaces :
Original file line number Diff line number Diff line change @@ -33,12 +33,15 @@ usage() {
3333Usage:
3434 ${0##*/ } [options]
3535
36- Run yamllint in the content of the workspace directory
36+ Run checkov against the content of the workspace directory
3737
3838Optional arguments:
3939 -w, --workspace_dir WORKSPACE_DIR.
4040 Workspace directory.
4141 Default: $PROJECT_DIR
42+ -c, --config-file CONFIG_FILE
43+ Configuration file.
44+ Default: the path '../config/checkov.yaml' from this script
4245 -d, --debug
4346 Activate tracing/debug mode.
4447 -h, --help
@@ -51,6 +54,7 @@ Example:
5154
5255parse_args () {
5356 WORKSPACE_DIR=" $PROJECT_DIR "
57+ CONFIG_FILE=" $SCRIPT_DIR /../config/checkov.yaml"
5458 while [[ $# -gt 0 ]]; do
5559 case $1 in
5660 -w | --workspace_dir)
@@ -66,6 +70,10 @@ parse_args() {
6670 usage
6771 exit 0
6872 ;;
73+ -c | --config-file)
74+ shift
75+ CONFIG_FILE=" $1 "
76+ ;;
6977 * )
7078 echo " [ERROR] Unknown argument: $1 " >&2
7179 usage
@@ -81,7 +89,7 @@ init() {
8189}
8290
8391run () {
84- checkov --directory " $WORKSPACE_DIR " --config-file " $SCRIPT_DIR /../config/checkov.yaml "
92+ checkov --directory " $WORKSPACE_DIR " --config-file " $CONFIG_FILE "
8593}
8694
8795main () {
You can’t perform that action at this time.
0 commit comments