linebreak-gate

by baktun-studio

Not rated
GitHub

About

Fail-closed CI gate for AI-written code: blocks known CVEs and serves human-approved acceptance criteria to Claude Code/Cursor/Codex over MCP, read-only to the agent.

Details

Author
baktun-studio
Categories
Developer Tools, Other, AI

Setup

Install linebreak-gate in your MCP client (Claude Desktop, Cursor, Windsurf, and others).

Repository: https://github.com/baktun-studio/linebreak-gate

Follow the installation instructions in the repository README, then restart your MCP client.

linebreak-gate — the LineBreak security gate at the git/CI boundary

A real pull request, blocked for real: the gate is arequired check, so the merge button goes gray until the CVE is fixed or a named human records an override.

See it live — a public PR you can open right now →

A real recording, no mock: the scan blocks a critical CVE fail-closed, the pin gets fixed, the gate opens.

The spec loop: a named human approves the criteria,checkblocks until the manual criterion carries a sign-off, then everything passes.

Blocks merges that carry known vulnerabilities. One tool, two detectors —dependency scanning is free; the AI review is the Pro upgrade:

- Dependency CVE scan — free, no keyosv-scanneracross every ecosystem (npm, PyPI, Go, Cargo, Maven, …), with annpm auditfallback for npm projects (npm-only coverage and no installed-version data — the GitHub Action fails closed if osv-scanner can't be installed instead of degrading to it).
- AI SAST — Pro— an LLM security review of first-party source (injection, broken auth, secret exposure, SSRF, unsafe deserialization, crypto misuse) with adversarial verification, enabled byLINEBREAK_LICENSE_KEY(hosted, uses credits) orANTHROPIC_API_KEY(your own key, takes precedence). Without a key the dependency scan still runs and this pass is skipped with a notice.

The gateblocks and can propose; it never auto-clears on an agent's say-so. A human approves the fix or records an override — with a reason and an approver — in a git-committed audit file.

This is the same scanner core that powers the rest of LineBreak's in-product security gate (the desktop backend imports this package), but it is fully standalone: a team that has never touched anything else from LineBreak can add the gate to their repo and get real enforcement.

Contributing & license.This repo is the published source of[linebreak-gate(Apache-2.0): every release lands here and on PyPI from our CI, and every change passed our own gate first — CVE scan and human-approved criteria, the same discipline we sell. Bug reports and feature requests: open an issue or discussion here; we read everything. Direct PRs to this repo can't be merged (releases flow through our review pipeline), so start with an issue and we'll take it from there.

# .github/workflows/security-gate.yml name: Security gate on: pull_request: permissions: contents: read pull-requests: write # for the summary comment jobs: gate: runs-on: ubuntu-latest steps: - uses: actions/checkout@v5 - uses: Baktun-Studio/linebreak-gate@v1 with: # fail-on: high # blocking floor; default: critical # Optional today; required once license enforcement is enabled. license-key: ${{ secrets.LINEBREAK_LICENSE_KEY }} # Enables the AI code review; leave unset for dependency scan only. anthropic-api-key: ${{ secrets.ANTHROPIC_API_KEY }}

The action runslinebreak-gate scan, always runsreport, postsonePR comment (updated in place on every push, never spammed), uploads the JSON report + audit artifacts as a workflow artifact, and fails the check per the scan's exit code.

Make it a real boundary: require the check

A CI job that can be ignored is a dashboard, not a gate. In your repo:

Settings → Branches → Branch protection rules → your default branch → "Require status checks to pass before merging"→ add thegatejob (the name of the job that runs this action). From then on a PR carrying a critical CVE cannot be merged through the GitHub UI.

No reviews yet — be the first

Sign in to leave a review

Use Google, GitHub, or an email account so ratings stay tied to real people.

Email sign in

No reviews posted yet.