diff --git a/Dockerfile b/Dockerfile index 041c43fa..0f2676a0 100644 --- a/Dockerfile +++ b/Dockerfile @@ -19,7 +19,7 @@ FROM mvdan/shfmt:v3.4.1 as shfmt FROM accurics/terrascan:1.12.0 as terrascan FROM hadolint/hadolint:latest-alpine as dockerfile-lint FROM assignuser/chktex-alpine:v0.1.1 as chktex -FROM zricethezav/gitleaks:v7.6.1 as gitleaks +FROM zricethezav/gitleaks:v8.0.4 as gitleaks FROM garethr/kubeval:0.15.0 as kubeval FROM ghcr.io/awkbar-devops/clang-format:v1.0.2 as clang-format FROM scalameta/scalafmt:v3.2.1 as scalafmt diff --git a/Dockerfile-slim b/Dockerfile-slim index 70de9bc5..5d76262e 100644 --- a/Dockerfile-slim +++ b/Dockerfile-slim @@ -25,7 +25,7 @@ FROM mvdan/shfmt:v3.4.1 as shfmt FROM accurics/terrascan:1.12.0 as terrascan FROM hadolint/hadolint:latest-alpine as dockerfile-lint FROM assignuser/chktex-alpine:v0.1.1 as chktex -FROM zricethezav/gitleaks:v7.6.1 as gitleaks +FROM zricethezav/gitleaks:v8.0.4 as gitleaks FROM garethr/kubeval:0.15.0 as kubeval FROM ghcr.io/assignuser/lintr-lib:0.3.0 as lintr-lib FROM ghcr.io/awkbar-devops/clang-format:v1.0.2 as clang-format diff --git a/lib/functions/buildFileList.sh b/lib/functions/buildFileList.sh index 5c298ff3..46620adc 100755 --- a/lib/functions/buildFileList.sh +++ b/lib/functions/buildFileList.sh @@ -316,8 +316,12 @@ function BuildFileList() { FILE_ARRAY_EDITORCONFIG+=("${FILE}") # jscpd also runs an all files FILE_ARRAY_JSCPD+=("${FILE}") - # GitLeaks also runs an all files - FILE_ARRAY_GITLEAKS+=("${FILE}") + # Need to make sure we dont check the secrets paterns + # for secrets, as it will pop! + if [ "${BASE_FILE}" != ".gitleaks.toml" ]; then + # GitLeaks also runs an all files + FILE_ARRAY_GITLEAKS+=("${FILE}") + fi ####################### # Get the shell files # diff --git a/lib/linter.sh b/lib/linter.sh index 85f13e7c..c66d8657 100755 --- a/lib/linter.sh +++ b/lib/linter.sh @@ -869,7 +869,7 @@ LINTER_COMMANDS_ARRAY['DOCKERFILE_HADOLINT']="hadolint -c ${DOCKERFILE_HADOLINT_ LINTER_COMMANDS_ARRAY['EDITORCONFIG']="editorconfig-checker -config ${EDITORCONFIG_LINTER_RULES}" LINTER_COMMANDS_ARRAY['ENV']="dotenv-linter" LINTER_COMMANDS_ARRAY['GITHUB_ACTIONS']="actionlint -config-file ${GITHUB_ACTIONS_LINTER_RULES}" -LINTER_COMMANDS_ARRAY['GITLEAKS']="gitleaks -q -c ${GITLEAKS_LINTER_RULES} --no-git -p" +LINTER_COMMANDS_ARRAY['GITLEAKS']="gitleaks detect --no-git -c ${GITLEAKS_LINTER_RULES} -v -s" LINTER_COMMANDS_ARRAY['GHERKIN']="gherkin-lint -c ${GHERKIN_LINTER_RULES}" LINTER_COMMANDS_ARRAY['GO']="golangci-lint run -c ${GO_LINTER_RULES}" LINTER_COMMANDS_ARRAY['GOOGLE_JAVA_FORMAT']="java -jar /usr/bin/google-java-format"