Aikido Secrets Pre-Commit Hook
Installation
curl -fsSL https://raw.githubusercontent.com/AikidoSec/pre-commit/2235fe0536f9135aa561ce108702fac708b38977/installation-samples/install-global/install-aikido-hook.sh | bashiex (iwr "https://raw.githubusercontent.com/AikidoSec/pre-commit/2235fe0536f9135aa561ce108702fac708b38977/installation-samples/install-global/install-aikido-hook.ps1" -UseBasicParsing)repos:
- repo: https://github.com/AikidoSec/pre-commit
rev: main # or pin to a specific commit
hooks:
- id: aikido-local-scannerpre-commit installcurl -fsSL https://raw.githubusercontent.com/AikidoSec/pre-commit/2235fe0536f9135aa561ce108702fac708b38977/installation-samples/install-global/install-aikido-hook.sh | bash -s -- --download-onlyirm https://raw.githubusercontent.com/AikidoSec/pre-commit/2235fe0536f9135aa561ce108702fac708b38977/installation-samples/install-global/install-aikido-hook.ps1 | % { iex \"& { $_ } -DownloadOnly\" }Testing the the pre-commit hook
const password = "eRwjQKVUSRX7uYV017B0cRHVKv45Gv8G"Detected secrets in staged files!
Secret #1:
File: sample.js
Line: 1
Secret: password = "****************************Gv8G"
Description: Detected a Generic API Key, potentially exposing access to various services and sensitive operations.Skipping a specific secret
Disable the Aikido Secrets pre-commit scan
Uninstall
Manual uninstall of global pre-commit hooks
Manual uninstall of only Aikido Git Hook
Related articles
Last updated
Was this helpful?