Real-Time Security Enforcement Gate for Development Teams
ALLOW or BLOCK β no ambiguity, no silent bypass.
π Website Β· π§ Get License
Sentinel Core is an enterprise-grade security enforcement system that intercepts every git commit before it reaches your codebase. It runs an embedded Auditor Core engine with AI-powered analysis via Gemini 2.5 Flash β verifying threats and eliminating false positives in real time.
Every violation is blocked immediately and creates an alert in your admin repository. Developers have no way to silently bypass enforcement.
| Category | Details |
|---|---|
| π Secrets | Passwords, API keys, tokens hardcoded in source files |
| βοΈ CI/CD Configurations | GitHub Actions, GitLab CI, Jenkinsfile |
| ποΈ Infrastructure | Kubernetes, Terraform, Docker misconfigurations |
| π Python Source Code | Injection, insecure cryptography, SQL injection |
| π¦ Supply Chain | Unpinned dependencies, unsafe base images |
| π Attack Chains | Multi-step exploit paths combining multiple findings |
| π Compliance | Findings mapped to SOC 2 TSC, CIS Controls v8, ISO/IEC 27001:2022 |
Developer runs: git commit
β
Sentinel intercepts via pre-commit hook
β
Auditor Core scans changed files (10 detection engines)
β
Chain Analyzer correlates findings into attack paths
β
Gemini AI verifies threats (chain-aware context)
β
Intelligence Engine applies taint analysis and reachability scoring
β
ALLOW β commit proceeds normally
BLOCK β commit rejected + alert fired to admin GitHub Issues
Sentinel Core v2.2.1 introduces Chain Analysis: a deterministic engine that identifies multi-step attack paths by correlating findings that, in combination, create a materially higher risk than any single finding in isolation.
The Chain Analyzer runs after all detectors complete and before AI advisory. It evaluates findings against configurable rules, each defining a trigger condition and a consequence class. When a trigger finding and a consequence finding co-exist within the same codebase scope, a chain is formed.
Each chain:
- Receives a unique identifier (
CHAIN_XXXX) visible across the JSON report - Escalates the severity of every finding in the chain to match the chain risk β a
LOWseverity finding that feeds aCRITICALinjection path is reported asCRITICAL - Is passed to the AI advisor as an explicit chain context block, improving the accuracy of AI verdicts
- Appears in a dedicated
attack_pathssection in the JSON report
A hardcoded API key (SECRET_HIGH_ENTROPY, initially LOW) and a SAST_COMMAND_INJECTION finding in the same module trigger the secret_to_command_injection rule. Both findings are escalated to CRITICAL and grouped under a shared chain ID. The AI advisor receives the full chain context, not just the individual findings.
Each finding in a chain includes a chain block:
{
"rule_id": "SECRET_HIGH_ENTROPY",
"severity": "CRITICAL",
"chain": {
"id": "CHAIN_0001",
"risk": "CRITICAL",
"rule": "secret_to_command_injection",
"original_severity": "LOW",
"partner_finding_id": "<uuid-of-SAST_COMMAND_INJECTION>"
}
}The report root also contains an attack_paths section aggregating all chains for SIEM integration:
"attack_paths": [
{
"chain_id": "CHAIN_0001",
"chain_rule": "secret_to_command_injection",
"chain_risk": "CRITICAL",
"step_count": 2,
"steps": [
{ "rule_id": "SECRET_HIGH_ENTROPY", "file_path": "src/config.py", "line": 42, ... },
{ "rule_id": "SAST_COMMAND_INJECTION", "file_path": "src/config.py", "line": 87, ... }
]
}
]Chain behaviour is controlled in audit-config.yml:
chaining:
enabled: true
max_chain_length: 5 # Maximum findings in a single chain
max_line_distance: 200 # Maximum line distance between chained findings
require_same_scope: true # Restrict chaining to the same directory scope
max_scope_depth: 2 # Directory depth tolerance for scope check
rules:
- name: "secret_to_command_injection"
triggers: ["SECRET_HIGH_ENTROPY", "GITLEAKS_", "SECRET_AWS"]
then: ["SAST_COMMAND_INJECTION", "BANDIT_B602", "BANDIT_B603"]
resulting_risk: "CRITICAL"Note: Chain rules match against
rule_idanddescriptionfields only β not arbitrary metadata. Use rule_id prefixes in triggers and then for precise, false-positive-free matching.
Auditor Core supports two AI operation modes:
- External LLM mode (default)
- Local LLM mode (fully offline)
This ensures flexibility for enterprise, regulated, or air-gapped environments.
AI in Auditor Core is advisory and validation-only. The deterministic scanning and Chain Analyzer always run first and produce a complete structural result independently of AI availability.
If AI is disabled or unavailable:
- All findings are still generated.
- Chain analysis still executes.
- SPI and Gate logic remain deterministic and reproducible.
- Reports are produced without AI commentary.
AI enhances reasoning quality β it does not control enforcement.
External mode integrates with supported providers:
- Google Gemini (primary)
- Groq (automatic fallback)
Configuration example:
ai:
enabled: true
mode: "external"
external:
provider: "google"
model: "gemini-2.5-flash"If Gemini quota is exceeded or unavailable, Auditor Core automatically switches to Groq without interrupting the scan.
External mode is suitable for:
- Standard enterprise environments
- Teams requiring large-context reasoning
- Organizations without air-gap restrictions
Auditor Core can run entirely offline using a local model adapter.
ai:
enabled: true
mode: "local"
local:
model_path: "/models/your-local-model.gguf"
backend: "llama.cpp"In local mode:
- No outbound network calls occur.
- No code or findings leave the machine.
- All AI validation runs inside the local environment.
This mode is designed for:
- Air-gapped deployments
- Government and defense environments
- High-sensitivity codebases
- Organizations with strict data residency policies
AI availability does not affect:
- Detection results
- Chain formation
- SPI calculation
- Gate override logic
- Compliance mapping
If AI fails, times out, or is disabled:
- Findings remain marked as UNVERIFIED
- Chain severity remains deterministic
- Reports include a note indicating AI advisory was skipped
No scan is blocked due to AI failure.
Auditor Core follows a strict execution order:
- Deterministic detectors
- Chain Analyzer
- SPI computation
- AI advisory layer (optional enrichment)
This guarantees:
- Reproducibility under audit scrutiny
- Stable results across runs
- No probabilistic finding generation
- Compliance-safe operation even without AI
Auditor Core does not transmit source code unless external AI mode is explicitly enabled.
- In local mode, all processing occurs on the host machine.
- AI receives structured finding context, not entire repositories.
- AI never generates new findings β it only validates existing deterministic results.
- This dual-mode architecture ensures that AI is a controlled reasoning amplifier β not a detection engine and not a runtime dependency.
Each machine requires a hardware-bound License Key. Run on every machine to be protected:
python3 get_id.pyOutput:
==================================================
Sentinel Core β Machine ID
==================================================
Machine ID: 81CE1239487E2EA172FF41BC4DD13BED
==================================================
Send this ID to: eldorzufarov66@gmail.com
Send the Machine ID to eldorzufarov66@gmail.com β you will receive a License Key unique to that machine.
β οΈ A key issued for one machine will not work on another.
Create two Personal Access Tokens at GitHub β Settings β Developer settings β Fine-grained tokens:
SENTINEL_INSTALL_TOKEN β installs Sentinel from the private repository
Repository: sentinel-core
Permissions: Contents β Read-only
SENTINEL_ALERT_TOKEN β posts enforcement alerts as GitHub Issues
Repository: your admin repository
Permissions: Issues β Read and write
Copy start.sh into the root of the project you want to protect:
bash start.shThe script handles everything automatically:
- Accepts Terms of Use
- Installs Sentinel from the private GitHub repository
- Configures
.envwith your credentials - Initializes hardware-bound license
- Creates
sentinel.yamlenforcement policy - Sets up GitHub Actions workflow
- Installs pre-commit hook
Successful output:
β
License verified for Machine ID: 81CE1239487E2EA172FF41BC4DD13BED
β
sentinel.yaml initialized
β
GitHub Workflow initialized
β
Pre-commit hook installed
------------------------------------------------------------
β
SENTINEL CORE DEPLOYED SUCCESSFULLY
------------------------------------------------------------
Test the enforcement gate immediately after installation:
echo 'password = "admin123"' > test_vuln.py
git add test_vuln.py
git commit -m "test"Expected result:
π Sentinel is verifying commit security...
β Found 1 security violations!
- [CRITICAL] SEC-001: Hardcoded Password in test_vuln.py at line 1.
π Remote Alert Sent Successfully!
β Terminating: 1 CRITICAL threats found.
Clean up:
rm test_vuln.pyAll enforcement rules are defined in sentinel.yaml:
severity:
SEC-001: BLOCK # Hardcoded secrets
SUPPLY-001: BLOCK # Supply chain integrity
INFRA-K8S-001: BLOCK # Kubernetes misconfigurations
CICD-001: BLOCK # CI/CD security issues
overrides: []
ignore:
- venv/*
- node_modules/*To temporarily allow a violation with documented justification:
overrides:
- rule_id: SUPPLY-001
justification: "Legacy base image β reviewed by security team"To exclude intentionally-vulnerable projects or test fixtures from scanning, add them to audit-config.yml:
scanner:
exclude_patterns:
- "DVWA-master/*" # intentionally vulnerable training app
- "tests/fixtures/*" # scanner test fixturesEvery blocked commit automatically creates a GitHub Issue in your admin repository:
π΄ BLOCK β SEC-001: Hardcoded Password
Environment: π» Local Development
Machine: worker-pc-01
Triggered by: developer_username
Timestamp: 2026-03-13 14:22:01
When a chain is detected, the alert includes an Attack Path Analysis section:
π Attack Path Analysis:
CHAIN_0001 | Rule: secret_to_command_injection | Risk: CRITICAL
Step 1: SECRET_HIGH_ENTROPY at src/config.py:42 (LOW β CRITICAL)
β Step 2: SAST_COMMAND_INJECTION at src/config.py:87 (MEDIUM β CRITICAL)
Administrators have full visibility. Developers have no access to the enforcement dashboard.
your-project/
βββ start.sh β provisioning script
βββ audit-config.yml β Auditor Core configuration (incl. chain rules)
βββ sentinel.yaml β enforcement policy
βββ .env β credentials (never commit)
βββ .github/
β βββ workflows/
β βββ sentinel.yml β CI/CD pipeline protection
βββ reports/
β βββ report_*.pdf β Executive Summary (SOC 2 / cyber insurance ready)
β βββ report_*.html β Interactive Enterprise Posture Report
β βββ report_*.json β Machine-readable findings with chain & compliance mapping
βββ venv/ β Python virtual environment
| Component | Version |
|---|---|
| Python | 3.10+ |
| Git | any |
| OS | Linux / macOS / Windows |
| reportlab | Required (PDF report generation) |
| Gemini API | Optional (AI analysis) |
| Groq API | Optional (Gemini fallback) |
Sentinel Core v2.2.1 delivers the Chain Analysis engine from Auditor Core v2.2.1 together with a set of precision fixes identified during production validation:
-
Chain Analysis β deterministic multi-step attack path detection. Findings that individually appear low-risk are automatically correlated and severity-escalated when they form a viable exploit chain. Chains appear in the JSON report as a dedicated
attack_pathssection and in GitHub Issue alerts as a readable attack path narrative. -
Chain-aware AI advisory β AI receives the full chain context when evaluating chained findings, not just the individual finding, improving verdict accuracy for correlated risks.
-
Chain-aware gate β the enforcement gate now fires on chain-escalated CRITICAL/HIGH findings even when no AI verdict is available, closing a gap where chained findings without AI coverage could silently pass.
-
Precise file exclusion β replaced
rglob()+fnmatchwithos.walk()directory pruning. The previous implementation failed to excludevenv/lib/python3.12/site-packages/becausefnmatch("venv/lib/.../file.py", "venv/*")returnsFalse. Directory pruning stops traversal at the excluded root, reducing scan scope from thousands of venv files to only project files. -
Scope-safe chaining β the chain scope check now uses project-relative paths instead of absolute resolved paths. Previously, any two files inside
site-packages/were within scope of each other (depth β€ 2 in absolute terms), generating chains across unrelated third-party packages. -
AI filter post-chain β
_filter_findings_for_ainow reads the final post-chain severity rather than the raw detector severity stored in metadata. Previously, findings escalated to CRITICAL by the chain engine were still filtered out as LOW, leaving critical chains without AI coverage. -
Chain partner IDs β
partner_finding_idin the JSON chain block is now correctly populated for all chain members. The previous implementation only wrote this field for two-finding chains via the_apply_chain()helper; multi-finding chains always produced an empty string. -
Tightened chain rules β chaining rules now match on
rule_idprefixes rather than generic description keywords. The previoussqli_to_auth_bypassrule matchedBANDIT_B105(hardcoded password string) on both trigger and consequence sides because the word "password" appears in the finding description, creating nonsensical self-chains.
Can a developer bypass Sentinel?
A developer can run git commit --no-verify locally. However, the CI/CD pipeline will catch the push, block it, and alert the administrator with the developer's identity and machine ID.
Does Sentinel slow down commits? Basic scanning takes 2β5 seconds. With Gemini AI enabled β 15β30 seconds depending on project size.
What if Gemini API quota is exceeded? Sentinel automatically switches to Groq (llama-3.3-70b-versatile) as fallback. Zero interruption to enforcement.
How do I update Sentinel?
Run start.sh again. It updates the package while preserving your existing .env configuration.
Is developer activity logged? Yes. Every blocked commit is recorded as a GitHub Issue with machine identity, username, timestamp, and violation details β creating an immutable audit trail.
How is Sentinel different from Auditor Core? Sentinel is a real-time gate β it intercepts every commit automatically. Auditor Core v2.2.1 is a deep on-demand audit engine for comprehensive posture reports with PDF executive summaries, SOC 2 / CIS / ISO 27001 compliance mapping, and Evidence Appendix. Sentinel uses Auditor Core internally as its scanning engine.
What is a chain and how does it affect the gate decision?
A chain is a group of two or more findings that together form a complete attack path β for example, a hardcoded credential that feeds a command injection sink. When a chain is detected, all participating findings are escalated to the chain's resulting risk level (typically CRITICAL), and the gate blocks the commit regardless of the individual finding severities. Chain escalation cannot be suppressed via sentinel.yaml::overrides.
My project includes intentionally-vulnerable code for testing. How do I exclude it?
Add the directory to exclude_patterns in audit-config.yml:
scanner:
exclude_patterns:
- "DVWA-master/*"
- "vulnerable-fixtures/*"Please include: Machine ID Β· OS version Β· Python version Β· description of the issue.
Β© 2026 DataWizual Security Labs. All rights reserved.
Use governed by TERMS_OF_USE.md

