Repository navigation
ci(gitleaks): add Gitleaks secret scanning, pre-commit hook and allowlist - #421
Open
DoloresGarciaE wants to merge 3 commits into
Open
DoloresGarciaE wants to merge 3 commits into
DoloresGarciaE wants to merge 3 commits into
Conversation
Add a Gitleaks workflow that scans the commits of every push and pull request to dev/main and the full history weekly. The official gitleaks-action runs when the GITLEAKS_LICENSE secret is available; pull requests from forks and Dependabot, which do not receive secrets, are scanned with the pinned gitleaks binary instead and get inline annotations through workflow commands. Both paths block on findings. .gitleaks.toml extends the default rules with Infura/Alchemy URL detectors and allowlists EVM addresses and the documented test placeholder. .gitleaksignore records the four historical findings accepted after the initial full-history scan; the Kleros subgraph key, documented in the source as a domain-restricted public key, carries an inline gitleaks:allow marker. Refs openscan-explorer#394
Install hooks through husky (bun install runs the prepare script). The pre-commit hook runs biome check on the staged files, replacing the manual .git/hooks recipe, and gitleaks on the staged diff when the binary is installed. .gitattributes pins LF line endings so the hook and biome check work on Windows checkouts with core.autocrlf=true. Refs openscan-explorer#394
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Related Issue
Type of Change
Changes Made
Screenshots (if applicable)
Checklist
npm run format:fixandnpm run lint:fixnpm run typecheckwith no errorsnpm run test:runAdditional Notes