{"id":51035366,"url":"https://github.com/codabytez/commit-noir","last_synced_at":"2026-06-22T05:02:24.395Z","repository":{"id":366229470,"uuid":"1259280792","full_name":"codabytez/commit-noir","owner":"codabytez","description":"Commit Noir — Git Commit Quality Guard","archived":false,"fork":false,"pushed_at":"2026-06-20T20:21:03.000Z","size":30,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2026-06-20T22:11:37.649Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/codabytez.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2026-06-04T10:59:36.000Z","updated_at":"2026-06-20T20:20:41.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/codabytez/commit-noir","commit_stats":null,"previous_names":["codabytez/commit-noir"],"tags_count":2,"template":false,"template_full_name":null,"purl":"pkg:github/codabytez/commit-noir","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/codabytez%2Fcommit-noir","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/codabytez%2Fcommit-noir/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/codabytez%2Fcommit-noir/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/codabytez%2Fcommit-noir/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/codabytez","download_url":"https://codeload.github.com/codabytez/commit-noir/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/codabytez%2Fcommit-noir/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":34635038,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-06-22T02:00:06.391Z","response_time":106,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2026-06-22T05:02:23.854Z","updated_at":"2026-06-22T05:02:24.389Z","avatar_url":"https://github.com/codabytez.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Commit Noir — Git Commit Quality Guard\n\n\u003e Terminal Noir pre-commit scanner with VS Code UI. Catch secrets, debug logs, and TODOs before they hit your repo.\n\n![Version](https://img.shields.io/badge/version-1.0.0-green) ![VS Code](https://img.shields.io/badge/vscode-%5E1.85.0-blue) ![License](https://img.shields.io/badge/license-MIT-gray)\n\n---\n\n## What it does\n\nCommit Noir is a two-part system:\n\n1. **A Git pre-commit hook** — scans your staged diff before every `git commit`, scores the commit quality (0–100), and blocks commits that don't meet the threshold.\n2. **A VS Code panel** — displays the last scan result in a Terminal Noir UI that auto-refreshes the moment a commit scan completes.\n\n```text\ngit commit\n    ↓\npre-commit hook scans staged diff\n    ↓\nscores the commit (0–100)\n    ↓\nblocks if score \u003c threshold OR secrets found\n    ↓\nVS Code panel updates automatically\n```\n\n---\n\n## Getting Started\n\n### 1. Install the extension\n\nInstall from the `.vsix` file:\n\n```text\nExtensions → ⋯ → Install from VSIX\n```\n\n### 2. Install the hook\n\nOpen any git repo in VS Code. You'll see a prompt:\n\n\u003e _\"Commit Noir: No pre-commit hook detected. Install it now?\"_\n\nClick **Install Hook** — or run it manually via the Command Palette:\n\n```text\nCmd+Shift+P → Commit Noir: Install Git Hook\n```\n\n### 3. Commit as normal\n\n```bash\ngit add .\ngit commit -m \"your message\"\n```\n\nThe hook runs automatically. If issues are found, the commit is blocked with a clear explanation.\n\n### 4. View the panel\n\n```text\nCmd+Shift+P → Commit Noir: Show Last Commit Score\n```\n\nThe panel opens beside your editor and auto-refreshes after every commit scan.\n\n---\n\n## Scoring\n\n| Issue                      | Deduction | Cap |\n| -------------------------- | --------- | --- |\n| Secret / API key           | -20 each  | -60 |\n| `console.log` / `debugger` | -3 each   | -30 |\n| TODO / FIXME / HACK        | -2 each   | -20 |\n| Oversized file             | -10 each  | -30 |\n\n**Secrets always block** — a commit with an exposed API key is rejected regardless of overall score.\n\nDefault threshold: **70/100**\n\n---\n\n## What gets detected\n\n### Secrets\n\n- API keys (`apiKey = \"...\"`)\n- OpenAI keys (`sk-...`)\n- Google API keys (`AIza...`)\n- GitHub PATs (`ghp_...`)\n- Slack tokens (`xox...`)\n- Hardcoded passwords\n- Private keys (`-----BEGIN ... PRIVATE KEY-----`)\n- AWS secret access keys\n\n### Debug statements\n\n- `console.log/warn/error/debug/info/trace`\n- `debugger;`\n- `System.out.println` (Java)\n\n### TODO comments\n\n- `// TODO`, `// FIXME`, `// HACK`, `// XXX`, `// BUG`, `// NOCOMMIT`\n\n### Oversized files\n\n- Any staged file exceeding the configured size limit (default: 500KB)\n\n---\n\n## Configuration\n\nSettings are available under `Commit Noir` in VS Code settings, or via a `.commit-noir.json` file at your project root:\n\n```json\n{\n  \"scoreThreshold\": 70,\n  \"blockOnFail\": true,\n  \"maxFileSizeKB\": 500,\n  \"ignorePaths\": [\n    \"*.lock\",\n    \"dist/\",\n    \"build/\",\n    \"*.min.js\",\n    \"pnpm-lock.yaml\",\n    \"package-lock.json\"\n  ]\n}\n```\n\n| Option           | Default   | Description                             |\n| ---------------- | --------- | --------------------------------------- |\n| `scoreThreshold` | `70`      | Minimum score to allow a commit         |\n| `blockOnFail`    | `true`    | Set to `false` to warn without blocking |\n| `maxFileSizeKB`  | `500`     | Files larger than this are flagged      |\n| `ignorePaths`    | see above | Glob patterns excluded from scanning    |\n\n---\n\n## Commands\n\n| Command                               | Description                                    |\n| ------------------------------------- | ---------------------------------------------- |\n| `Commit Noir: Show Last Commit Score` | Open the Terminal Noir results panel           |\n| `Commit Noir: Install Git Hook`       | Install the pre-commit hook into `.git/hooks/` |\n| `Commit Noir: Uninstall Git Hook`     | Remove the hook                                |\n\n---\n\n## Bypass\n\nTo skip the hook for a single commit:\n\n```bash\ngit commit --no-verify -m \"your message\"\n```\n\n---\n\n## Terminal Output Example\n\n```text\n──────────────────────────────────\n▸ COMMIT-NOIR  Pre-commit scan\nScore: [████████░░] 75/100\nThreshold: 70/100\n\nIssues:\n  ✗ 1 secret(s) detected\n  ✗ 2 console.log(s)\n  ✗ 1 TODO/FIXME comment(s)\n\n  [CRITICAL] src/config.ts:14\n  API Key exposed in source code\n  → apiKey = \"sk-abc123...\"\n\n──────────────────────────────────\n✗ Commit blocked. Secrets detected — remove them before committing.\nFix issues or run: git commit --no-verify to bypass\n```\n\n---\n\n## License\n\nMIT — [codabytez](https://github.com/codabytez)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcodabytez%2Fcommit-noir","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcodabytez%2Fcommit-noir","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcodabytez%2Fcommit-noir/lists"}