The Aikido Secrets pre-commit hook scans your staged code for secrets, passwords and API keys. It stops sensitive data from ever reaching your repository, which reduces the risk of leaks and accidental exposure.
To install and setup the hook globally (applies to all repositories):
macOS/Linux:
curl -fsSL https://raw.githubusercontent.com/AikidoSec/pre-commit/main/installation-samples/install-global/install-aikido-hook.sh | bashWindows (PowerShell):
iex (iwr "https://raw.githubusercontent.com/AikidoSec/pre-commit/main/installation-samples/install-global/install-aikido-hook.ps1" -UseBasicParsing)This will download the Aikido Scanner binary and setup a global git pre-commit hook.
If you are using the Aikido IDE plugin in Visual Studio Code, Cursor, Windsurf, Antigravity, Kiro or any JetBrains IDE, you can easily setup the Aikido pre-commit hook by using the Aikido Expansion Packs.
If you're already using the pre-commit framework, add this to your .pre-commit-config.yaml:
repos:
- repo: https://github.com/AikidoSec/pre-commit
rev: main # or pin to a specific commit
hooks:
- id: aikido-local-scannerThen install the hooks:
pre-commit installNote: The aikido-local-scanner binary must be installed separately. Run the global installation script first:
macOS/Linux:
curl -fsSL https://raw.githubusercontent.com/AikidoSec/pre-commit/518945d243beec968f18c8c0c990f3deda084804/installation-samples/install-global/install-aikido-hook.sh | bash -s -- --download-onlyWindows (PowerShell):
irm https://raw.githubusercontent.com/AikidoSec/pre-commit/518945d243beec968f18c8c0c990f3deda084804/installation-samples/install-global/install-aikido-hook.ps1 | % { iex \"& { $_ } -DownloadOnly\" }This installs the scanner to ~/.local/bin/aikido-local-scanner.
More info on how to install and use the Aikido Secrets pre-commit hook can be found here.