
Threat Research
/Security News
Searchjacked: Hidden Browser Extensions Hijack Searches for 13 Million Users
319 browser extensions installed by 13.4 million users hijack searches, capture queries, and collect referral payments from Yahoo and Bing.
configure-precommit
Advanced tools
Agentic pre-commit setup - automatically configures pre-commit hooks for any repository using AI
Automatically configure pre-commit hooks for any repository using AI-powered analysis.
This tool scans your repository, analyzes its structure and tech stack, and generates an optimal .pre-commit-config.yaml tailored to your project.
Supported stacks:
# Using npx (no install required)
npx configure-precommit
# Or install globally
npm install -g configure-precommit
# 1. Set your API key
export ANTHROPIC_API_KEY="sk-ant-..."
# OR
export OPENAI_API_KEY="sk-..."
# 2. Run in your repository
cd /path/to/your/repo
configure-precommit
# Or specify a path
configure-precommit /path/to/your/repo
git init)The script automatically installs pre-commit if not present.
┌─────────────────────────────────────────────────────────────────┐
│ Phase 1: SENSOR │
│ └── Scan repo structure, detect languages/frameworks │
│ │
│ Phase 2: AUDITOR (LLM) │
│ └── AI analyzes repo, generates optimal pre-commit config │
│ │
│ Phase 3: BUILDER │
│ ├── Write .pre-commit-config.yaml │
│ ├── Run pre-commit autoupdate (get latest versions) │
│ └── Install git hooks │
│ │
│ Phase 4: VERIFICATION & SELF-HEALING │
│ ├── Run pre-commit on all files │
│ └── If config errors → AI debugger fixes → retry (max 3x) │
│ │
│ Phase 5: SUMMARY │
│ └── Report installed hooks and any code issues found │
└─────────────────────────────────────────────────────────────────┘
configure-precommit [OPTIONS] [REPO_PATH]
Options:
-h, --help Show help message
-v, --version Show version
--dry-run Generate config without installing hooks
--skip-autoupdate Skip running pre-commit autoupdate
--debug Enable debug output
| Category | Tools | Trigger |
|---|---|---|
| Python | ruff, ruff-format, mypy, bandit | .py files |
| JavaScript/TypeScript | eslint, prettier | .js, .ts, .jsx, .tsx |
| Go | golangci-lint, go-fmt, go-imports | .go files |
| Java | pretty-format-java | .java files |
| Shell | shellcheck | .sh, .bash files |
| Terraform | terraform_fmt, tflint, checkov | .tf files |
| Docker | hadolint | Dockerfile |
| YAML | yamllint, check-yaml | .yaml, .yml |
| JSON | check-json | .json |
| Security | gitleaks, detect-private-key | All files |
| General | trailing-whitespace, end-of-file-fixer, check-merge-conflict, no-commit-to-branch | All files |
| Variable | Description |
|---|---|
ANTHROPIC_API_KEY | Anthropic API key (preferred) |
OPENAI_API_KEY | OpenAI API key (fallback) |
PRECOMMIT_MAX_RETRIES | Max self-heal attempts (default: 3) |
PRECOMMIT_DRY_RUN | Generate config without installing |
PRECOMMIT_SKIP_AUTOUPDATE | Skip version auto-update |
DEBUG | Enable debug output |
All operations are logged to /tmp/precommit-setup/:
# View recent logs
ls -lt /tmp/precommit-setup/*.log | head -5
# Tail a running log
tail -f /tmp/precommit-setup/myrepo_*.log
╔═══════════════════════════════════════════════════════════════╗
║ AGENTIC PRE-COMMIT SETUP ║
╚═══════════════════════════════════════════════════════════════╝
━━━━━━ PHASE 1: CONTEXTUAL SENSOR ━━━━━━
[INFO] Scanning repository structure...
[INFO] Found 47 files and 3 manifest files
━━━━━━ PHASE 2: AUDITOR (LLM Analysis) ━━━━━━
[INFO] Analyzing repository and generating configuration...
[INFO] Configuration generated successfully
━━━━━━ PHASE 3: BUILDER ━━━━━━
[INFO] Wrote configuration to .pre-commit-config.yaml
[INFO] Updating hook versions to latest...
[INFO] Git hooks installed successfully
━━━━━━ PHASE 4: VERIFICATION ━━━━━━
[INFO] All hooks passed successfully!
━━━━━━ PHASE 5: SUMMARY ━━━━━━
INSTALLED HOOKS:
- gitleaks
- ruff
- ruff-format
- shellcheck
- check-yaml
...
[INFO] Setup complete!
Initialize git first: git init
Remove it first: rm .pre-commit-config.yaml
Set one of:
export ANTHROPIC_API_KEY="sk-ant-..."
export OPENAI_API_KEY="sk-..."
The debugger will automatically move those hooks to stages: [manual]. Install the tools later and run manually with pre-commit run <hook-id> --all-files.
configure-precommit/
├── package.json # npm package config
├── bin/
│ └── configure-precommit # CLI entry point
├── setup-precommit.sh # Main orchestration script
├── lib/
│ ├── logging.sh # Logging utilities
│ ├── sensor.sh # Repository scanning
│ ├── builder.sh # Pre-commit installation
│ └── verifier.sh # Verification loop
├── tests/
│ └── run_tests.sh # Test suite
└── README.md
# Clone the repo
git clone https://github.com/avivkaplan/configure-precommit.git
cd configure-precommit
# Run tests (requires API key)
./tests/run_tests.sh
# Lint shell scripts
shellcheck lib/*.sh bin/configure-precommit setup-precommit.sh
MIT
FAQs
Agentic pre-commit setup - automatically configures pre-commit hooks for any repository using AI
The npm package configure-precommit receives a total of 0 weekly downloads. As such, configure-precommit popularity was classified as not popular.
We found that configure-precommit demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.

Threat Research
/Security News
319 browser extensions installed by 13.4 million users hijack searches, capture queries, and collect referral payments from Yahoo and Bing.

Threat Research
Malicious Firefox extensions mimic Phantom, Jupiter, and Bitget wallets to steal recovery phrases and private keys, with one fetching its payload remotely.

Product
Socket Threat Intel now shows which malware campaigns were blocked or detected in your organization, with links to scans and Firewall events.