Skip to content

Releases: githubmofo/TorusGuard

v0.9.2: Workflows & Skills Command-Engine Standard

Choose a tag to compare

@githubmofo githubmofo released this 02 Sep 17:48

TorusGuard v0.9.2: Workflows & Skills Command-Engine Standard

Release Version: v0.9.2
Date: September 2, 2026
Status: Official Release


🚀 Overview

TorusGuard v0.9.2 elevates both Workflows (.torusguard/workflows/) and Skills (skills/ & .torusguard/skills/) to the production-grade Command-Engine Standard modeled after .agent/workflows/.

This release unifies interactive slash commands with specialized domain expertise, creating a deterministic, zero-hallucination execution engine featuring formal YAML frontmatter, mandatory pre-flight inspections, contextual decision tables, failure recovery protocols, strict hallucination guards, and two-way cross-bindings.


🌟 Key Highlights

1. Production-Grade Workflows (.torusguard/workflows/)

All 11 slash command execution playbooks upgraded to 120–172 lines, structured across 8 canonical sections:

  • YAML Frontmatter: Standard metadata defining tools, version: 0.9.2, agent, lifecycle-phase, required-skills, and scripts-binding.
  • Mandatory Pre-Flight Context Inspection: Enforces pre-checks on disk state, authorization TTL, and existing runs before taking action.
  • "When to Use" Decision Matrices: Clarifies exact command applicability.
  • Deterministic CLI Commands: Copy-pasteable Python script commands with arguments.
  • Failure Recovery & Cascade Rules: Enforces 3-retry limits, error handling, and HALT vs CONTINUE policies.
  • Strict Hallucination Guards: Explicitly forbids destructive actions, full-file rewrites, and unredacted secrets.
  • Standardized Output Cards & Next Step Routing: Delivers clean, structured Markdown summaries with clear next actions.

2. Deepened Specialist Skills & Two-Way Cross-Bindings

All 13 skills enriched with:

  • Concrete AST vulnerability search patterns and regex indicators for Python (Django, DRF, FastAPI, Flask, SQLAlchemy) and TypeScript (Next.js, Express, React).
  • Safe, non-destructive probe canaries for SQLi, XSS, SSRF, IDOR, and Auth bypasses.
  • Strict Ponytail Protocol line churn rules ($\le 35$ additions, $\le 25$ deletions).
  • Explicit workflow: .torusguard/workflows/<cmd>.md frontmatter binding.
  • Context budget discipline preserved: all skills range between 58 and 123 lines (strictly $\le 300$).

3. Automated Validation Test Harness (harness/validate_v0_9_2_workflows_and_skills.py)

A comprehensive test suite that asserts:

  • 100% YAML frontmatter compliance and required sections across all 11 workflows.
  • Valid script bindings pointing to active .torusguard/scripts/ files.
  • Context line budgets ($\le 300$) and mirror synchronization across all 13 skills.
  • 1:1 cross-bindings between workflows and skills.

4. Zero-Regression Release Metric

TorusGuard v0.9.2 is hardened by 9 automated test suites passing 381 automated test assertions with a 100% pass rate.

v0.9.1: Workspace Autonomy, Parity & Offline Bootstrapper

Choose a tag to compare

@githubmofo githubmofo released this 02 Sep 17:48

TorusGuard v0.9.1: Workspace Autonomy, Parity & Offline Bootstrapper

Release Version: v0.9.1
Date: September 2, 2026
Status: Official Release


🚀 Overview

TorusGuard v0.9.1 solves the critical delivery gap for external installations via npx skills add. In previous versions, the open skills CLI only copied the skills/ directory, leaving external workspaces without the necessary .torusguard/ templates, scripts, rules, and agents.

v0.9.1 achieves full Workspace Autonomy and complete structural parity with the reference .agent/ architecture by introducing an autonomous Python bootstrapper, a bundled offline template payload, a root standalone installer, and a cryptographic integrity ledger.


🌟 Key Highlights

1. Autonomous Workspace Bootstrapper (skills/torusguard/bootstrap.py)

A self-contained, cross-platform Python script that runs automatically during /torusguard init. It unpacks the complete .torusguard/ workspace into the project root, detects framework stacks, and activates tailored rules offline with zero network latency.

2. Bundled Offline Template Payload (skills/torusguard/payload/)

The canonical .torusguard/ structure is packaged directly inside the skill directory. When npx skills add downloads the skill, it automatically brings all templates and scripts locally onto the developer's computer.

3. Standalone Zero-Dependency Installer (install.py)

A root CLI script that enables direct one-liner setup:

python install.py
# Or remotely:
curl -sSL https://raw.githubusercontent.com/githubmofo/TorusGuard/main/install.py | python

4. Comprehensive System Architecture Blueprint (.torusguard/ARCHITECTURE.md)

Modeled after .agent/ARCHITECTURE.md, detailing:

  • 7-stage closed-loop lifecycle flowchart.
  • Authority separation and role handoff contracts across 5 specialist agents.
  • The Ponytail Protocol line churn rules ($\le 35$ additions, $\le 25$ deletions).
  • Complete directory topology.

5. Cryptographic Integrity Ledger & Builder (.torusguard/.manifest.json & manifest_builder.py)

A SHA-256 cryptographic manifest indexing all 88 workspace files with normalized cross-platform paths, verified via .torusguard/scripts/manifest_builder.py --check.

6. End-to-End Simulation Test Harness (harness/validate_v0_9_1_installer.py)

Automated test suite simulating external project installation via both npx skills add and standalone install.py in isolated temporary sandboxes.

v0.9.0: Granular Specialist Skills Architecture

Choose a tag to compare

@githubmofo githubmofo released this 02 Sep 17:48

TorusGuard v0.9.0: Granular Specialist Skills Architecture

Release Version: v0.9.0
Date: September 2, 2026
Status: Official Release


🚀 Overview

TorusGuard v0.9.0 introduces a modular, decoupled specialist skills architecture. Rather than loading a monolithic, context-heavy instruction set on every prompt, TorusGuard decomposes all security operations into 12 self-contained specialist skills plus an intelligent lazy-loading router.

Each specialist skill embeds its own execution steps, safety rules, and scoring models inline, strictly constrained within a 300-line context budget (ranging from 58 to 165 lines).


🌟 Key Highlights

1. The 12 Specialist Skills (skills/)

  • skills/torusguard-init/: Baseline discovery, stack detection, and tailored rule activation.
  • skills/torusguard-authorize/: Scope boundary capture, target ownership verification, and safety policy enforcement.
  • skills/torusguard-audit/: Deep static AST analysis, invariant line-shift fingerprinting, and root-cause clustering.
  • skills/torusguard-verify/: Evidence sufficiency evaluation and 5-factor confidence score refinement.
  • skills/torusguard-web-validate/: Authorized HTTP probing, session tracking, and automatic credential redaction.
  • skills/torusguard-exploit-check/: Bounded, non-destructive canaries confirming exploitability across 5 canonical statuses.
  • skills/torusguard-harden/: Ponytail Protocol patch formulation ($\le 35$ additions, $\le 25$ deletions) and bundle packaging.
  • skills/torusguard-apply/: Surgical patch application with mandatory pre-apply rollback snapshots.
  • skills/torusguard-recheck/: Targeted post-patch re-scans with 4-state transition tracking.
  • skills/torusguard-report/: Executive markdown reporting and OASIS SARIF v2.1.0 structured export.
  • skills/torusguard-status/: Read-only workspace inspection of active configuration and run history.
  • skills/torusguard-full/: Master 7-stage pipeline orchestrator coordinating end-to-end security operations.

2. Intelligent Lazy-Loading Router (skills/torusguard/SKILL.md)

The root torusguard skill acts as an ultra-compact (58 lines) router. When an operator runs a slash command (e.g. /torusguard audit), the AI agent loads exclusively the matching specialist file, eliminating cross-file context bloat and leaving 98%+ of the context window free for source code analysis.

3. Automated Validation Harness (harness/validate_v0_9_0_skills.py)

53 automated checks validating skill existence, YAML frontmatter, line budgets ($\le 300$), required sections, router table integrity, and script bindings.

v0.8.0: Installable AI-Agent Security Skill Kit

Choose a tag to compare

@githubmofo githubmofo released this 02 Sep 16:41

TorusGuard v0.8.0: Installable AI-Agent Security Skill Kit

Release Version: v0.8.0
Date: September 2, 2026
Status: Official Release


🚀 Overview

TorusGuard v0.8.0 transforms TorusGuard from a static guidance repository into a fully installable, governed AI-agent security skill kit. Developers and AI coding assistants can install TorusGuard into their workspace using the open skills CLI:

npx skills add https://github.com/githubmofo/TorusGuard --skill "torusguard"

And initialize their project-specific security guardrails with a single command:

/torusguard init

This scaffolds a self-contained .torusguard/ workspace in the project, automatically detecting the technology stack, activating tailored security rules in .torusguard/rules/active/, and configuring 5 specialist AI agents and 11 slash command workflows.


🌟 Key Highlights

  1. Master Always-On Rules (.torusguard/TORUSGUARD.md):

    • Universal cognitive gate and non-destructive standards.
    • 7-stage lifecycle state machine (Detect $\rightarrow$ Classify $\rightarrow$ Verify $\rightarrow$ Remediate $\rightarrow$ Apply $\rightarrow$ Recheck $\rightarrow$ Archive).
    • Complete 11-command routing table.
    • Strict Ponytail patch governance bounds ($\le 35$ line additions, $\le 25$ line deletions).
    • 5-factor 0–100 confidence scoring rubric.
    • Card-style finding reporting hierarchy.
  2. 5 Specialist Agent Roles (.torusguard/agents/):

    • profiler.md: Stack profiling, route discovery, framework AST inspection.
    • auditor.md: Static AST scanning, line-shift invariant fingerprinting, root-cause clustering.
    • validator.md: Runtime HTTP/browser probing, token redaction, bounded exploitability checks.
    • remediator.md: Governed remediation bundles, minimal patch plans, Before/After diffs.
    • reviewer.md: Scoped recheck verification, regression detection, SARIF v2.1.0 sign-off.
  3. 11 Lifecycle Workflows (.torusguard/workflows/):

    • Step-by-step guides for /torusguard init, authorize, audit, verify, web-validate, exploit-check, harden, apply, recheck, report, and status.
  4. 5 Pure Python CLI Automation Utilities (.torusguard/scripts/):

    • stack_detect.py: Auto-detects Django, DRF, FastAPI, Flask, SQLAlchemy, Next.js, Express, React, Vite, Supabase, Firebase.
    • finding_scorer.py: Objective 0–100 confidence scorer.
    • sarif_exporter.py: Standard OASIS SARIF v2.1.0 generator with GitHub Code Scanning deduplication.
    • run_manager.py: Run folder lifecycle management and execution history.
    • safety_gate.py: Pre-probe runtime safety policy evaluator.
  5. 10 Embedded Framework References (.torusguard/references/):

    • Self-contained security guides for all major Python and TypeScript frameworks.
  6. Active Rules Activation System (.torusguard/rules/active/):

    • Dynamically activates relevant rules matching the detected framework stack.
  7. Zero-Regression Verification:

    • All 8 validation test suites (230+ assertions) executed with a 100% pass rate.

v0.7.0: Authorized Runtime Validation & Bounded Exploitability Confirmation

Choose a tag to compare

@githubmofo githubmofo released this 01 Sep 06:17

TorusGuard v0.7.0 Release Notes

Release Tag: v0.7.0
Release Title: Authorized Runtime Validation & Bounded Exploitability Confirmation
Previous Release: v0.6.3
Status: Stable Release


🎯 Executive Summary

TorusGuard v0.7.0 extends TorusGuard from a governed static remediation and recheck system into an authorized runtime validation and bounded exploitability confirmation system.

While v0.6.x established stable finding identities, root-cause clustering, minimal patch bounds, and targeted rechecks, v0.7.0 bridges static findings with live, authorized application verification. It allows security architects and AI coding agents to confirm whether static findings are practically reachable and exploitable without introducing destructive offensive tooling, unbounded fuzzing, or unmanaged denial-of-service risks.


🚀 Key Deliverables & New Capabilities

1. 🔒 Scope & Authorization Gate (core/authorization.py)

  • Explicit Target Consent: Requires signed, unexpired target ownership confirmation or written consent before any runtime interaction is dispatched.
  • Strict Boundary Enforcement: Enforces whitelisted target hosts, allowed path prefixes, forbidden sensitive paths (/admin/delete, /system/reset), and request budgets.
  • Run Artifacts: Emits authorization.md and scope.json into every run folder.
  • Hard Gate: Dispatches AuthorizationError to halt runtime execution immediately if authorization is missing or expired.

2. 🛡️ Safety Review Gates (core/safety_gate.py)

  • Risk Escalation Hierarchy:
    • Auto-Allowed: Read-only GET/HEAD queries against non-sensitive in-scope routes.
    • Approval Required: Requests touching authentication, tenancy, file uploads, or state-changing HTTP verbs (POST, PUT, PATCH, DELETE).
    • Manual Only: Destructive routes (/admin/delete, /system/shutdown), account resets, or privileged infrastructure changes.
  • Records all safety evaluations in safety-decisions.json.

3. 🌐 Web Validation & Secret Redaction (core/runtime_validator.py, core/runtime_evidence.py)

  • Bounded HTTP Probing: Executes targeted, non-destructive HTTP requests against authorized application endpoints.
  • Session State Tracking: Maintains cookies, tenant identifiers, and custom headers across probes, logged to session-notes.md.
  • Automatic Secret Redaction: Employs regex redaction rules masking Bearer JWTs, Basic Auth credentials, Stripe/AWS keys, and passwords before writing requests.json and responses.json.

4. ⚡ Bounded Exploitability Confirmation (core/exploit_checker.py)

  • Evaluates practical exploitability across 5 approved issue classes:
    1. Authentication Bypass: Probes unauthenticated access to protected views.
    2. Multi-Tenant Scoping / IDOR: Evaluates cross-tenant data leaks with test credentials.
    3. Header Trust Injection: Probes backend adoption of spoofed X-Tenant-ID or role headers.
    4. Path Traversal Reachability: Asserts directory traversal handling without writing files.
    5. Exposed Debug/Profiler Routes: Validates public reachability of development profiler endpoints.
  • Classifies exploitability into 5 formal statuses:
    • Runtime Confirmed (Indisputable proof with sensitive marker)
    • Runtime Likely (Strong runtime indicators)
    • Needs Manual Review (Inconclusive or complex boundary)
    • Not Reproducible in Scope (Protected by active gateway/middleware)
    • Blocked by Environment / Controls (Safety gate halted probe)

5. 🖥️ Browser-Assisted Route Guard Verification (core/browser_verifier.py)

  • Validates client-side router guards, unauthenticated DOM leaks, and form security policies.
  • Enforces navigation depth limits (default: max 3 levels) and records UI action traces to browser-validation.md.

6. 👥 4-Role Multi-Agent Governance Model (core/agent_roles.py)

  • Splits validation into four discrete agent roles with explicit handoff contracts:
    • Profiler: Detects tech stack, framework layout, route ASTs, and storage boundaries.
    • Validator: Executes authorized runtime probes and captures technical evidence.
    • Remediator: Enriches remediation bundles and patch plans with exploitability context.
    • Reviewer: Verifies evidence sufficiency, evaluates safety compliance, and signs off on reports.
  • Emits agent-handoffs.md and role-audit.json.

7. 🔁 Replayable Validation Traces (core/replay_trace.py)

  • Serializes deterministic, step-by-step verification sequences into replay.json and replay.md.
  • Implements ReplayManager.execute_replay() to rerun traces against test environments for continuous regression validation.

8. 📊 Unified Reporting & Multi-Analysis SARIF (core/v070_reporter.py, core/sarif.py)

  • Emits combined Markdown reports merging static code findings with live exploitability outcomes, route contexts, and residual risks.
  • Emits GitHub Code Scanning SARIF v2.1.0 logs partitioned by analysis slice via automationDetails.id: torusguard/runtime/.

🧪 Verification Matrix

  • Runtime Validation Harness: harness/validate_v0_7_0_runtime.py (28/28 tests passed).
  • Hardening & Drift Suite: harness/validate_v0_6_3_hardening.py (24/24 tests passed).
  • Modern Stacks Suite: harness/validate_v0_6_2_modern_stacks.py (19/19 tests passed).
  • Scale & Clustering Suite: harness/validate_v0_6_1_scale.py (23/23 tests passed).
  • Governed Remediation QA: harness/validate_qa_v0_6_0.py (93/93 tests passed).
  • Base Verification Harness: harness/runner.py (75/75 tests passed).
  • Total Test Success: 270 / 270 passed across all test suites (0 failures).

v0.6.3: Final Drift, Upload and Sensitive-Path Hardening

Choose a tag to compare

@githubmofo githubmofo released this 01 Sep 06:17

Release Notes: TorusGuard v0.6.3 — Final Drift, Upload & Sensitive-Path Hardening

Release Tag: v0.6.3
Release Date: August 31, 2026
Status: Stable Release (v6 Branch) — Final Hardening of the v0.6.x Product Cycle


🌟 Executive Summary

TorusGuard v0.6.3 is the final hardening milestone of the v0.6.x release series before transitioning into v7 planning.

This release proves long-term reliability and stability when:

  1. Findings are re-audited across multiple git commits with line shifts and comment edits (Zero Identity Drift).
  2. SARIF reports are uploaded to GitHub Code Scanning (partialFingerprints / primaryLocationLineHash for alert deduplication).
  3. Sensitive code paths (Authentication, Tenancy, Secrets, Crypto, Storage, CI/CD) are modified (Strict Review Escalation).
  4. Modern async and dependency injection patterns are analyzed (Zero False Positives on safe code).
  5. Cross-artifact data consistency is audited across all generated reports.

🚀 Key Deliverables in v0.6.3

1. 🧬 Cross-Run Drift Invariance

  • Stable finding fingerprints (TG-FND-<hash12>) remain 100% identical when lines shift or when non-semantic whitespace and inline comments are modified.
  • Root-cause cluster groupings and recheck states remain stable across reruns without status jitter.

2. 🐙 GitHub Code Scanning SARIF Deduplication

  • Generated SARIF v2.1.0 logs incorporate partialFingerprints with 16-character primaryLocationLineHash and torusguard/v6/identity keys.
  • Enables GitHub to track security alerts seamlessly across branch switches, pull requests, and code refactorings without creating duplicate alert noise.

3. 🛡️ Sensitive-Path Governance & Escalation Matrix

  • Enforces strict review levels on critical directories:
    • Authentication & JWT: auth, login, password, jwt, token, session
    • Multi-Tenancy: tenant, tenant_id, organization_id
    • Secrets & Cryptography: secret, api_key, crypto, hmac
    • File Storage: upload, storage, filepath
    • CI/CD Pipelines: .github/workflows/, Dockerfile, compose.yaml
  • Any non-trivial diff ($&gt; 10$ line churn or multi-file changes) in these paths automatically receives Mandatory Security Sign-Off and blocks automatic patching.

4. 🎯 Modern-Stack Negative Tests (Zero False Positives)

  • Verified that safe modern patterns produce zero false positive alerts:
    • Safe Django 5.x aget_object_or_404 with tenant filtering.
    • Safe FastAPI Annotated[User, Depends(get_verified_user)].
    • Safe SQLAlchemy 2.0 select().where(Model.tenant_id == tenant_id).
    • Safe Next.js 14 Server Action with const session = await auth().
    • Safe File Upload Storage with secure_filename() + directory traversal check.

🧪 Validation Sign-Off

The dedicated hardening harness harness/validate_v6_3_hardening.py validates 24/24 assertions.

Phase Subsystem Under Verification Passed / Total Status Highlights
Phase 1 Cross-Run Drift & Identity Stability 4/4 PASS Fingerprint invariant across 3 simulated commits with line shifts.
Phase 2 GitHub Code Scanning SARIF Upload 5/5 PASS partialFingerprints (primaryLocationLineHash) verified for alert deduplication.
Phase 3 Sensitive-Path Governance & Escalation 4/4 PASS Strict escalation (Mandatory Security Sign-Off) enforced on Auth & Tenancy.
Phase 4 Modern-Stack Negative Tests 5/5 PASS Zero false positives on safe Django async, FastAPI Annotated, SQLAlchemy 2.0, & Next.js.
Phase 5 Cross-Artifact Report Audit 4/4 PASS 100% data consistency verified across Manifest, Summary, SARIF, Recheck, & Bundles.

Read the full sign-off in QA-SUMMARY-v6.3.md.

v0.6.2: Modern Stack Compatibility

Choose a tag to compare

@githubmofo githubmofo released this 01 Sep 06:17

Release Notes: TorusGuard v0.6.2 — Modern Stack Compatibility

Release Tag: v0.6.2
Release Date: August 31, 2026
Status: Stable Release (v6 Branch)


🌟 Executive Summary

TorusGuard v0.6.2 brings first-class compatibility with modern 2026 web application architectures, async paradigms, newer packaging managers, and cloud-native configuration workflows.

Modern projects have evolved beyond synchronous view controllers into async coroutines, Pydantic v2 type-safe schemas, SQLAlchemy 2.0 select statements, Next.js 14 App Router Server Actions, and Astral uv lockfiles. TorusGuard v0.6.2 ensures detection rules, remediation bundles, and targeted rechecks seamlessly align with these modern paradigms.


🚀 What's New in v0.6.2

1. 🔍 Automated Stack Profiler (core/stack_profiler.py)

  • Discovers project frameworks, version families, async architectures, and dependency managers automatically.
  • Detects:
    • Django 5.x (Async Native): Async views, aget(), ASGI handlers.
    • FastAPI 0.100+ (Pydantic v2): Annotated[..., Depends()], pydantic-settings, Lifespan context managers.
    • SQLAlchemy 2.0+: select() statement queries and AsyncSession.
    • Next.js 14+: App Router and "use server" Server Actions.
    • Modern Packaging: Fast package manager discovery (uv.lock, Poetry, PEP 621 pyproject.toml).
    • Container & CI/CD: Multi-stage Dockerfiles and GitHub Actions workflow permissions.

2. ⚡ Modern Async-Native Remediation

  • Django 5.x Async: Remediation diffs provide modern async scoping (await Invoice.objects.aget(id=inv_id, tenant_id=request.user.tenant_id)).
  • FastAPI 0.100+: Emits modern Annotated[User, Depends(get_verified_user)] patterns for role enforcement.
  • SQLAlchemy 2.0: Generates 2.0 select().where() chained tenant filters rather than legacy .filter() query chaining.
  • Next.js 14 Server Actions: Injects server-side session authentication guards before data mutation logic.

3. 🛡️ Container & CI/CD Supply Chain Coverage

  • Dockerfile Security: Identifies hardcoded image layer secrets and non-root execution (USER appuser).
  • GitHub Actions Security: Identifies unpinned mutable action tags and enforces immutable 40-character commit SHA pinning with minimal workflow permissions (permissions: read-all).

🧪 Validation Sign-Off

All modern stack capabilities are validated via harness/validate_v6_2_modern_stacks.py (19/19 checks passing).

Read the full sign-off in QA-SUMMARY-v6.2.md.

v0.6.1: Scale and Complexity Hardening

Choose a tag to compare

@githubmofo githubmofo released this 01 Sep 06:17

Release Notes: TorusGuard v0.6.1 — Scale & Complexity Hardening

Release Tag: v0.6.1
Release Date: August 31, 2026
Status: Stable Release (v6 Branch)


🌟 Executive Summary

TorusGuard v0.6.1 hardens the governed remediation and targeted recheck system for large, messier, high-complexity production repositories.

As codebases scale into multi-application monorepos with hundreds of modules, thousands of source files, and mixed framework ecosystems, vulnerability scanners often flood developers with duplicate alerts, unreadable 100-page markdown dumps, and uncoordinated patches.

TorusGuard v0.6.1 introduces:

  1. Monorepo & Deep-Hierarchy Support: Seamless discovery across multi-app layouts (Django + FastAPI + Flask + Shared Packages) and deeply nested directory structures (8+ levels) in a single unified run folder.
  2. Noise Suppression & Vendor Exclusion: Automated filtering of non-actionable paths (migrations/, node_modules/, dist/, build/, *.min.js, *.pb.go, vendor/) to eliminate false alarms and save compute.
  3. High-Density Clustering & Collapsing: Successfully collapses 250+ repeated vulnerability alerts into 3 actionable root-cause clusters with module hotspot metrics (apps/billing, services/uploads).
  4. Readable Report Guardrails: Automatically applies collapsible <details> blocks when findings exceed 25 items, ensuring reports remain compact, readable, and token-efficient.
  5. High-Scale Performance Throughput: Sub-second execution across all dimensions:
    • 500 finding fingerprints generated in $&lt; 0.01\text{s}$
    • 500 findings clustered in $&lt; 0.01\text{s}$
    • 1,000-item SARIF v2.1.0 export serialized in $&lt; 0.01\text{s}$
    • 100 targeted rechecks evaluated in $&lt; 0.12\text{s}$
  6. Monorepo Patch Governance: Strict boundary checks preventing cross-service automated edits in a single patch.

🧪 Validation & Benchmark Sign-Off

The dedicated scale benchmark runner harness/validate_v6_1_scale.py validates 23/23 scale assertions.

Benchmark Dimension Workload Volume Execution Time Threshold Status
Fingerprinting & ID Generation 500 Findings 0.0043s $&lt; 0.50\text{s}$ PASS
Root-Cause Clustering & Hotspots 500 Findings 0.0039s $&lt; 0.10\text{s}$ PASS
SARIF v2.1.0 Serialization 1,000 Findings 0.0034s $&lt; 0.30\text{s}$ PASS
Targeted Scoped Rechecks 100 Endpoints 0.0961s $&lt; 0.20\text{s}$ PASS

Read the sign-off report in QA-SUMMARY-v6.1.md.

v0.6.0: Governed Remediation & Targeted Recheck System

Choose a tag to compare

@githubmofo githubmofo released this 01 Sep 06:17

Release Notes: TorusGuard v0.6.0 — Governed Remediation & Targeted Recheck System

Release Tag: v0.6.0
Release Date: August 31, 2026
Status: Stable Release (v6 Branch)


🌟 Executive Summary

TorusGuard v0.6.0 evolves TorusGuard from a static detection and auditing tool into a governed security remediation and targeted recheck system.

While traditional security scanners generate fragmented lists of individual line-level alerts, TorusGuard v0.6.0 introduces:

  1. Isolated Run Folders (runs/<run-id>/): Every execution generates a single, fully-contained run folder housing all manifests, structured reports, evidence maps, diff summaries, and logs.
  2. Stable Finding Identity & Invariance: Deterministic finding fingerprints computed across Rule ID, normalized file path, code region hash, and sink signatures that survive minor code edits and line shifts.
  3. Root-Cause Clustering: Automatic grouping of related findings into shared root causes (e.g. Missing Tenant Query Scoping, Unsafe Path Traversal Storage, Disabled Template Autoescaping).
  4. Structured Remediation Bundles: Self-contained remediation packages (finding.md, remediation.md, minimal_patch_plan.md, verify-after-change.md, metadata.json).
  5. Minimal Patch Governance: Strict policy enforcement over automated code modifications (bounding line churn, file counts, and escalating sensitive contexts such as auth, crypto, and database queries).
  6. Targeted Scoped Rechecks: Scoped differential verification focusing strictly on modified files and adjacent trust boundaries with explicit status transitions (Confirmed Fixed, Partially Fixed, Needs Manual Review, Regressed, Not Reproducible).
  7. SARIF v2.1.0 JSON Export: Optional standard SARIF export for seamless integration with GitHub Advanced Security, CI/CD pipelines, and enterprise SIEMs.

🚀 Key Features in v0.6.0

1. Dedicated Run Folder Organization

Every TorusGuard command (audit, harden, apply, recheck) writes its state and outputs to an isolated run folder under .torusguard/runs/<run-id>/:

  • manifest.json: Execution metadata, git commit hash, and status counts.
  • summary.md: Executive summary and root-cause cluster breakdown.
  • findings.md: Detailed finding cards with stable IDs and evidence snippets.
  • remediation.md: Structured remediation guidance per cluster.
  • apply-plan.md: Patch policy decisions, line additions/deletions, and escalation status.
  • recheck.md: Targeted recheck outcome and regression analysis.
  • evidence.json: Full evidence ledger with SHA-256 integrity hashes.
  • diff-summary.md: Unified git diff ledger of all applied changes.
  • changed-files.txt: Line-separated list of modified files.
  • sarif.json: Standard SARIF v2.1.0 JSON structured export.
  • logs/: Subdirectory for runtime and execution logs.

2. Line-Shift Invariant Finding Fingerprints

Findings no longer drift or duplicate when minor code changes occur. Finding identities are derived deterministically:

FindingFingerprint = SHA256(RuleID | NormalizedPath | RegionHash | SinkSignature | FrameworkMarker)

3. Systemic Root-Cause Clusters

Findings are automatically grouped into cohesive root causes:

  • cluster-tenant-isolation: Multi-tenant scoping & ORM isolation.
  • cluster-path-traversal: Upload directories and filename sanitization.
  • cluster-template-escaping: HTML autoescaping and XSS mitigation.
  • cluster-header-trust: Insecure client header reliance and role spoofing.
  • cluster-idor-scoping: Direct object reference ownership checks.
  • cluster-rate-limiting: Endpoint throttling and resource bounding.
  • cluster-ssrf-network: Outbound HTTP request destinations.
  • cluster-webhook-auth: Webhook HMAC signatures and replay attacks.
  • cluster-secrets: Hardcoded credentials and environment hygiene.

4. Minimal Patch Governance (Ponytail Engine)

Automated code modifications are governed by strict safety constraints:

  • Max additions/deletions threshold: Rejects massive diffs or complete file rewrites.
  • Single-file preference: Focuses patches on the exact target component.
  • High-Risk Escalation: Flag changes touching auth, authorization, tenant isolation, secrets, crypto, uploads, DB access, or workflow files as HIGH_RISK_ESCALATED requiring human review if churn is non-trivial.
  • Zero Commentary Bloat: Strips AI boilerplate and unnecessary comments.

5. Targeted Rechecks & Trust Boundary Verification

/torusguard recheck evaluates only modified files and adjacent trust boundaries:

  • Confirmed Fixed: Vulnerability resolved with zero detected regressions.
  • Partially Fixed: Fix partially in place, but residual risk remains.
  • Needs Manual Review: Fix requires out-of-band infrastructure verification.
  • Regressed: Patch introduced a secondary security vulnerability.
  • Not Reproducible: Target code unchanged; fix not detected in active buffer.

🛠️ Verification & Test Suite

All 75 automated test cases across schemas, models, rules, and v6 subsystems pass cleanly:

python tests/test_v6_governed_remediation.py
python harness/runner.py

v0.5.6 — Large-Project Validation Suite & Rule Tuning Architecture

Choose a tag to compare

@githubmofo githubmofo released this 27 Aug 06:30

Release v0.5.6 — Large-Project Validation Suite & Rule Tuning Architecture

Date: 2026-08-27
Release Name: Large-Project Validation Suite & Rule Tuning Architecture
Tag: v0.5.6


🎯 Summary

TorusGuard v0.5.6 delivers a foundational leap in real-world validation, precision calibration, and transparent benchmarking.

While earlier versions established the 6-stage lifecycle, 60+ canonical security rules, and formal confidence scoring, v0.5.6 validates how the TorusGuard workflow performs across large, multi-module repositories with over 14,000+ files.

Under the core principle of Technical Honesty and Transparent Readiness, v0.5.6 introduces context-aware rule tuning guardrails to eliminate false positives without blind suppression, integrates seeded-case recall testing, establishes granular patch quality tracking, and formalizes honest readiness decisions that differentiate simulated dry-runs from real-world triage.


🚀 Key Highlights & Enhancements

1. 🏗️ 10 Large-Project Validation Architecture (harness/validate_large_projects.py)

  • Standardized multi-repository validation manifest (projects/manifest.yaml) targeting 10 production-scale Python repositories:
    • flask-cms (Flask)
    • django-core (Django)
    • fastapi-service (FastAPI)
    • sqlalchemy-orm (SQLAlchemy)
    • drf-api (Django & DRF)
    • sentry-multitenant (Django & React)
    • requests-client (Core Python)
    • pydantic-models (Pydantic)
    • celery-workers (Celery)
    • scrapy-spiders (Scrapy)
  • Totaling over 14,363 representative source files modeled and analyzed.

2. 🎯 Context-Aware Rule Tuning Guardrails

Tuned four foundational detection rules to properly account for framework-level abstractions:

  • TG-AUTH-008 (Untrusted Role/Tenant Headers): Distinguishes read-only metadata from authorization-influencing headers. Downgrades ambiguous external proxy/gateway contexts to Needs Review.
  • TG-INPUT-005 (Unsafe Template Rendering): Distinguishes framework-managed autoescaping (e.g. Jinja2/Django standard templates) from unescaped dynamic evaluation (render_template_string, mark_safe).
  • TG-INPUT-006 (Path Traversal): Avoids false alarms on benign os.path.join operations; escalates only when untrusted inputs reach storage without sanitization or allowlists.
  • TG-DB-004 (Missing Tenant Isolation): Recognizes tenant-scoped manager/repository layers, get_queryset() overrides, and dependency injection patterns.

3. 🧪 Seeded-Case Recall Measurement

  • Added known synthetic vulnerability seeds across target repositories in projects/manifest.yaml.
  • Establishes a formal recall measurement framework:
    $$\text{Recall} = \frac{\text{Detected Seeded Cases}}{\text{Detected Seeded Cases} + \text{Missed Seeded Cases}}$$
  • Prevents rule tuning from causing silent detection regressions.

4. 📊 Ponytail Patch Quality Evidence Ledger

  • Detailed tracking for every automated remediation patch:
    • File count and line churn ($+$lines / $-$lines).
    • Unrelated file modification checks (0 churn allowed).
    • Excess/unnecessary comment checks.
    • Automated project test and differential recheck assertion (Verified Fixed).

5. 🛡️ Transparent Pilot Readiness Decision

  • Strict policy against invented 100% metrics in simulated runs.
  • Clearly states the validation boundary:

    Final Readiness Decision: Not yet ready for controlled real-world use.
    The v0.5.6 harness successfully demonstrates the intended workflow design across 10 simulated large-project profiles. However, precision, seeded-case recall, false-positive counts, and patch safety remain unmeasured until actual repository scans and human triage are completed. Ready for a controlled pilot-validation phase only.


📚 New & Updated Artifacts