From 29334bb613be01fd24a2f57b4e451db89d54340a Mon Sep 17 00:00:00 2001 From: Sandeep Kulange Date: Fri, 10 May 2024 20:36:12 +0530 Subject: [PATCH] Added pre-commit hook repos --- .pre-commit-config.yaml | 38 +++++++++++++++++++++----------------- 1 file changed, 21 insertions(+), 17 deletions(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index a98dc3be9..938a48d1b 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -13,22 +13,26 @@ repos: # - id: talisman-push - id: talisman-commit entry: cmd --githook pre-commit - - -# - id: gitleaks -# name: Detect hardcoded secrets -# description: Detect hardcoded secrets using Gitleaks -# entry: gitleaks protect --verbose --redact --staged -# language: golang -# pass_filenames: false -# - id: pretty-format-java -# name: Google Java Formatter -# description: Runs Google Java Formatter over Java source files -# entry: pretty-format-java -# language: python -# types: [ java ] -# # this is needed because the hook downloads google-java-formatter and -# # we don't have yet a nice way of ensuring a single download over multiple runs -# require_serial: true -# minimum_pre_commit_version: '1' + + - repo: https://github.com/gitleaks/gitleaks + rev: v8.16.1 + hooks: + - id: gitleaks + name: Detect hardcoded secrets + description: Detect hardcoded secrets using Gitleaks + entry: gitleaks protect --verbose --redact --staged + language: golang + pass_filenames: false + + - id: pretty-format-java + name: Google Java Formatter + description: Runs Google Java Formatter over Java source files + entry: pretty-format-java + language: python + types: [ java ] + # this is needed because the hook downloads google-java-formatter and + # we don't have yet a nice way of ensuring a single download over multiple runs + require_serial: true + minimum_pre_commit_version: '1'