[general]
verbose = 0
quiet = false
debug = false
color = true
interactive = true
[scanner]
mode = "auto"
max_threads = 0
max_file_size_mb = 10
thread_percentage = 70
stack_size_mb = 15
channel_buffer_multiplier = 8
result_chunk_size = 500
min_files_for_parallel = 100
include_binary = false
follow_symlinks = false
enable_entropy_analysis = true
entropy_threshold = 0.00001
ignore_test_code = true
show = false
sensitive = false
ignore_paths = [
"target/",
"node_modules/",
".git/",
"dist/",
"build/",
"vendor/",
".venv/",
"__pycache__/",
]
ignore_patterns = [
"(?i)password\\s*[:=]\\s*['\"][^'\"]*['\"]",
"(?i)secret\\s*[:=]\\s*['\"][^'\"]*['\"]",
]
custom_patterns = [
]
[hooks]
skip_all = false
parallel_execution = true
[hooks.pre-commit]
skip = false
parallel = true
[hooks.pre-commit.commands.scan-secrets]
builtin = "scan_secrets"
[hooks.pre-commit.commands.rust-format]
run = "cargo fmt --all -- --check"
glob = ["*.rs"]
stage_fixed = true
continue_on_error = false
[hooks.pre-commit.commands.rust-lint]
run = "cargo clippy --all-targets --all-features -- -D warnings"
glob = ["*.rs"]
continue_on_error = false
[hooks.pre-commit.commands.python-format]
run = "black {staged_files}"
glob = ["*.py"]
exclude = ["venv/**", ".venv/**"]
stage_fixed = true
skip = ["merge", "rebase"]
[hooks.pre-commit.commands.python-lint]
run = "ruff check {staged_files}"
glob = ["*.py"]
exclude = ["venv/**", ".venv/**"]
skip = ["merge", "rebase"]
[hooks.pre-commit.commands.js-format]
run = "prettier --write {staged_files}"
glob = ["*.js", "*.jsx", "*.ts", "*.tsx", "*.json"]
stage_fixed = true
skip = ["merge", "rebase"]
[hooks.pre-commit.commands.config-format]
run = "dprint fmt {staged_files} --allow-no-files"
glob = ["*.toml", "*.yml", "*.yaml", "*.md"]
stage_fixed = true
continue_on_error = true
[hooks.pre-commit.commands.check-large-files]
run = "guardy check-size --max-size=5MB {staged_files}"
all_files = false
continue_on_error = false
[hooks.commit-msg]
skip = false
parallel = false
[hooks.commit-msg.commands.conventional-commit]
run = """
if ! grep -qE '^(feat|fix|docs|style|refactor|test|chore|perf|ci|build|revert)(\\(.+\\))?: .{1,50}' "{1}"; then
echo "✗ Commit message must follow conventional commits format:"
echo " type(scope): description"
echo ""
echo "Types: feat, fix, docs, style, refactor, test, chore, perf, ci, build, revert"
echo "Example: feat(scanner): add support for custom patterns"
exit 1
fi
"""
skip = ["merge", "rebase"]
[hooks.commit-msg.commands.commit-length]
run = """
first_line=$(head -n1 "{1}")
if [ ${#first_line} -gt 72 ]; then
echo "✗ Commit message first line should be ≤ 72 characters (currently ${#first_line})"
exit 1
fi
"""
[hooks.pre-push]
skip = false
parallel = true
[hooks.pre-push.commands.check-clean]
run = """
if output="$(git status --porcelain)" && [ -n "$output" ]; then
echo "✗ Repository has uncommitted changes:"
echo "$output"
echo ""
echo "Please commit or stash changes before pushing."
exit 1
fi
"""
[hooks.pre-push.commands.rust-test]
run = "cargo check --all"
glob = ["*.rs"]
continue_on_error = false
[hooks.pre-push.commands.check-outdated]
run = "cargo outdated --exit-code 1"
glob = ["Cargo.toml"]
continue_on_error = true
[hooks.pre-push.commands.security-audit]
run = "cargo audit"
glob = ["Cargo.lock"]
continue_on_error = false
[hooks.post-checkout]
skip = false
parallel = false
[hooks.post-checkout.commands.update-deps]
run = """
if [ -f "Cargo.toml" ]; then
echo "Updating Rust dependencies..."
cargo fetch
fi
if [ -f "package.json" ]; then
echo "Updating Node dependencies..."
if [ -f "pnpm-lock.yaml" ]; then
pnpm install --frozen-lockfile
elif [ -f "yarn.lock" ]; then
yarn install --frozen-lockfile
else
npm ci
fi
fi
"""
continue_on_error = true
[hooks.post-checkout.commands.check-git-crypt]
run = """
if [ -f ".git-crypt/.gitattributes" ]; then
if ! git-crypt status | grep -q "not locked"; then
echo "⚠️ Repository appears to be git-crypt locked"
echo "Run 'git-crypt unlock' to decrypt files"
fi
fi
"""
continue_on_error = true
[hooks.security]
patterns = [
"sk-[a-zA-Z0-9]{48}",
"ghp_[a-zA-Z0-9]{36}",
"ghs_[a-zA-Z0-9]{36}",
"glpat-[a-zA-Z0-9-]{20,}",
"ey[a-zA-Z0-9]{20,}\\.[a-zA-Z0-9]+",
"AIza[0-9A-Za-z\\-_]{35}",
"AKIA[0-9A-Z]{16}",
"[a-zA-Z0-9+/]{40,}={0,2}",
"-----BEGIN (RSA |EC )?PRIVATE KEY-----",
"xox[baprs]-[0-9]{10,13}-[a-zA-Z0-9]{24,32}",
]
exclude_files = [
"*.lock",
"*.log",
".husky/*",
"test/fixtures/*",
"**/*.test.*",
"**/*.spec.*",
]
[hooks.branch_protection]
protected_branches = ["main", "master", "develop", "release/*"]
allow_direct_commits = false
require_pull_request = true
[hooks.git_crypt]
enabled = true
required_files = [
".env",
"secrets/*",
"*.key",
"*.pem",
]
auto_lock_on_commit = true
[hooks.formatting]
enabled = true
command = "nx format:write --uncommitted"
auto_fix = false
check_only_in_ci = true
[hooks.package_manager]
preferred = "pnpm"
auto_install = true
lockfile_only = true
[sync]
auto_update = false
interactive = true
show_diff = true
[[sync.repos]]
name = "shared-configs"
repo = "https://github.com/myorg/shared-configs"
version = "v1.0.0"
source_path = "configs/"
dest_path = "./"
include = [
".editorconfig",
".prettierrc",
"dprint.json",
".rustfmt.toml",
]
exclude = []
protected = true
[[sync.repos]]
name = "ci-workflows"
repo = "https://github.com/myorg/ci-templates"
version = "main"
source_path = "github/"
dest_path = ".github/"
include = [
"workflows/*.yml",
"actions/*",
]
exclude = [
"workflows/experimental-*",
]
protected = false
[sync.protection]
auto_protect_synced = true
block_modifications = true
warn_on_conflict = true
[mcp]
enabled = false
port = 8080
host = "127.0.0.1"
tools = [
"git-status",
"hook-run",
"security-scan",
"config-validate",
]
[external_tools]
git_crypt = "git-crypt"
nx = "nx"
pnpm = "pnpm"
cargo = "cargo"
python = "python3"
node = "node"
[status]
verbose = false
show_config = false
format = "text"
show_hooks = true
show_sync = true
show_security = true
[config]
format = "toml"
show_defaults = false
auto_validate = true
show_source = false