⌘

Git Sentinel

v1.1.5🛡️Tier 1 Security AuditedCLI v2.1.287+ Verified

Branch protection, conventional commit validation, and dirty tree prevention hook for autonomous coding turns.

@devops-guard•★1,530 stars•↓7,420 active installs•MIT License
View Source ↗
⚡Installation Specifier
$/plugin install git-sentinel@marketplace

Problem Solved & Architectural Motivation

Ensures agent commits adhere to conventional commit standards, prevents direct commits to protected branches (main, prod), and blocks operations if untracked secret files are detected.

Before Execution

Zero-Time AST Interception

Evaluates tool payloads prior to kernel fork.

Scoring Model

0-100 Impact Index

Weighted heuristic scoring: files touched, git dirty state, env scope.

Non-Intrusive

Native CLI Hook

Zero proxy daemon required; hooks straight into Claude tool calls.

Lifecycle Architecture & Hook Flow

POSIX Event Engine
Step 01
Claude Plan
Prompt Inference
→
Step 02
Tool Call
tool.call Payload
→
HOOK INTERCEPT
git-sentinel
<18ms Heuristic
→
Step 04
OS Execution
Kernel Fork

Manifest Schema (plugin.json)

{
  "name": "git-sentinel",
  "version": "1.1.5"
}

Hook Implementation (register.js)

TypeScript SDK
export default function setup(mod) {
  mod.on('git.commit', ({ branch, message, abort }) => {
    if (['main', 'master', 'prod'].includes(branch)) {
      return abort('Direct commits to protected branch are prohibited by Git Sentinel.');
    }
  });
}
Security Audit98/100
Network EgressNone (Zero Socket Egress)
Filesystem ScopeBounded to Workspace
Credential Exposure0 Leaks Detected
Sandbox IsolationHost User Privilege

Technical Specifications

Min CLI Versionv2.1.287+
Categoryworkflow-automation
Runtime Overhead< 18ms AST
LicenseMIT
Mod Publisher