From e1bbc8bf3dda5820c8b4351aabca8b4d04e7cef2 Mon Sep 17 00:00:00 2001 From: Romain Arnaud Date: Wed, 11 Oct 2023 16:11:10 -0400 Subject: [PATCH] Add pre-commit-config.yaml rh-pre-commit will add some information to every commit message. This will help reviewers make sure that developers are using rh-pre-commit, preventing secrets from being leaked. How to install and configure rh-pre-commit: `curl --silent "https://gitlab.corp.redhat.com/infosec-public/developer-workbench/tools/-/raw/rh-pre-commit-2.0.0/rh-pre-commit/quickstart.sh" | bash && rh-multi-pre-commit --hook-type commit-msg install` c.f. https://source.redhat.com/departments/it/it-information-security/leaktk/leaktk_components/rh_pre_commit rh-pre-commit.version: 2.0.1 rh-pre-commit.check-secrets: ENABLED --- .pre-commit-config.yaml | 14 ++++++++++++++ 1 file changed, 14 insertions(+) create mode 100644 .pre-commit-config.yaml diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml new file mode 100644 index 000000000..1c5fa3e93 --- /dev/null +++ b/.pre-commit-config.yaml @@ -0,0 +1,14 @@ +--- +repos: + - repo: https://gitlab.corp.redhat.com/infosec-public/developer-workbench/tools.git + rev: rh-pre-commit-2.0.0 + hooks: + # If you have not run this hook on your system before, it may prompt you to + # log in for patterns, and you will need to try again. + # + # Docs: https://source.redhat.com/departments/it/it-information-security/leaktk/leaktk_components/rh_pre_commit + - id: rh-pre-commit + # Commit-msg attestation + # Make sure to run `rh-multi-pre-commit --hook-type commit-msg install` + # to enable the hook. + - id: rh-pre-commit.commit-msg