Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 13 additions & 9 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -1,10 +1,14 @@
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.6.0
hooks:
- id: check-executables-have-shebangs
exclude: (.*/.*.(ps1|bat|bash)$)
- id: check-shebang-scripts-are-executable
exclude: (.*/.*.(tmpl|tftpl)$)
- id: check-merge-conflict
args: ['--assume-in-merge']
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.6.0
hooks:
- id: check-executables-have-shebangs
exclude: (.*/.*.(ps1|bat|bash)$)
- id: check-shebang-scripts-are-executable
exclude: (.*/.*.(tmpl|tftpl)$)
- id: check-merge-conflict
args: ['--assume-in-merge']
- repo: https://github.com/elastic/infosec-precommit
rev: v1.0.0
hooks:
- id: infosec-precommit
7 changes: 7 additions & 0 deletions .pre-commit-hooks.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
- id: infosec-precommit
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It seems this step is unnecessary. This is for creating new hooks, see https://pre-commit.com/#creating-new-hooks.

However, to use existing hooks like infosec-precommit, you only need a .pre-commit-config.yaml, as shown in https://pre-commit.com/#adding-pre-commit-plugins-to-your-project.

name: PreCommit from InfoSec for Secret Scanning
description: This hook detects whether a secret is being committed
entry: pre-commit
language: script
stages:
- pre-commit
Loading