torusguard 1.3.5 โ 1.4.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.torusguard/.manifest.json +37 -36
- package/.torusguard/runs/report-latest.html +5862 -315
- package/.torusguard/runs/results-latest.sarif +20 -0
- package/.torusguard/runs/run-20260918-104221-audit/findings.json +1 -0
- package/.torusguard/runs/run-20260918-104221-audit/findings.md +8 -0
- package/.torusguard/runs/run-20260918-104221-audit/manifest.json +12 -0
- package/.torusguard/runs/run-20260918-104221-audit/summary.md +5 -0
- package/.torusguard/runs/run-20260918-104236-audit/findings.json +2314 -0
- package/.torusguard/runs/run-20260918-104236-audit/findings.md +960 -0
- package/.torusguard/runs/run-20260918-104236-audit/manifest.json +12 -0
- package/.torusguard/runs/run-20260918-104236-audit/summary.md +5 -0
- package/.torusguard/runs/run-20260918-105723-audit/findings.json +2382 -0
- package/.torusguard/runs/run-20260918-105723-audit/findings.md +960 -0
- package/.torusguard/runs/run-20260918-105723-audit/manifest.json +12 -0
- package/.torusguard/runs/run-20260918-105723-audit/summary.md +5 -0
- package/.torusguard/runs/run-20260918-105731-audit/findings.json +1 -0
- package/.torusguard/runs/run-20260918-105731-audit/findings.md +8 -0
- package/.torusguard/runs/run-20260918-105731-audit/manifest.json +12 -0
- package/.torusguard/runs/run-20260918-105731-audit/summary.md +5 -0
- package/.torusguard/runs/run-20260918-105940-audit/findings.json +1 -0
- package/.torusguard/runs/run-20260918-105940-audit/findings.md +8 -0
- package/.torusguard/runs/run-20260918-105940-audit/manifest.json +13 -0
- package/.torusguard/runs/run-20260918-105940-audit/remediation.md +7 -0
- package/.torusguard/runs/run-20260918-105940-audit/summary.md +5 -0
- package/.torusguard/runs/run-20260919-145701-audit/findings.json +1 -0
- package/.torusguard/runs/run-20260919-145701-audit/findings.md +8 -0
- package/.torusguard/runs/run-20260919-145701-audit/manifest.json +12 -0
- package/.torusguard/runs/run-20260919-145701-audit/summary.md +5 -0
- package/.torusguard/runs/run-20260919-151729-audit/findings.json +1 -0
- package/.torusguard/runs/run-20260919-151729-audit/findings.md +8 -0
- package/.torusguard/runs/run-20260919-151729-audit/manifest.json +13 -0
- package/.torusguard/runs/run-20260919-151729-audit/remediation.md +7 -0
- package/.torusguard/runs/run-20260919-151729-audit/summary.md +5 -0
- package/.torusguard/runs/run-20260919-152340-audit/findings.json +1 -0
- package/.torusguard/runs/run-20260919-152340-audit/findings.md +8 -0
- package/.torusguard/runs/run-20260919-152340-audit/manifest.json +12 -0
- package/.torusguard/runs/run-20260919-152340-audit/summary.md +5 -0
- package/.torusguard/runs/run-20260919-152345-audit/findings.json +1 -0
- package/.torusguard/runs/run-20260919-152345-audit/findings.md +8 -0
- package/.torusguard/runs/run-20260919-152345-audit/manifest.json +12 -0
- package/.torusguard/runs/run-20260919-152345-audit/summary.md +5 -0
- package/.torusguard/runs/run-20260919-153500-audit/findings.json +1 -0
- package/.torusguard/runs/run-20260919-153500-audit/findings.md +8 -0
- package/.torusguard/runs/run-20260919-153500-audit/manifest.json +12 -0
- package/.torusguard/runs/run-20260919-153500-audit/summary.md +5 -0
- package/.torusguard/scripts/__pycache__/apply_runner.cpython-314.pyc +0 -0
- package/.torusguard/scripts/__pycache__/audit_runner.cpython-314.pyc +0 -0
- package/.torusguard/scripts/__pycache__/diff_guard.cpython-314.pyc +0 -0
- package/.torusguard/scripts/__pycache__/finding_scorer.cpython-314.pyc +0 -0
- package/.torusguard/scripts/__pycache__/harden_runner.cpython-314.pyc +0 -0
- package/.torusguard/scripts/__pycache__/html_reporter.cpython-314.pyc +0 -0
- package/.torusguard/scripts/__pycache__/manifest_builder.cpython-314.pyc +0 -0
- package/.torusguard/scripts/__pycache__/memory_engine.cpython-314.pyc +0 -0
- package/.torusguard/scripts/__pycache__/monorepo_detector.cpython-314.pyc +0 -0
- package/.torusguard/scripts/__pycache__/recheck_runner.cpython-314.pyc +0 -0
- package/.torusguard/scripts/__pycache__/recipes_runner.cpython-314.pyc +0 -0
- package/.torusguard/scripts/__pycache__/report_sync.cpython-314.pyc +0 -0
- package/.torusguard/scripts/__pycache__/run_manager.cpython-314.pyc +0 -0
- package/.torusguard/scripts/__pycache__/sarif_exporter.cpython-314.pyc +0 -0
- package/.torusguard/scripts/__pycache__/stack_detect.cpython-314.pyc +0 -0
- package/.torusguard/scripts/__pycache__/term_ui.cpython-314.pyc +0 -0
- package/.torusguard/scripts/apply_runner.py +108 -9
- package/.torusguard/scripts/audit_runner.py +336 -24
- package/.torusguard/scripts/harden_runner.py +124 -70
- package/.torusguard/scripts/html_reporter.py +3585 -648
- package/.torusguard/scripts/manifest_builder.py +2 -0
- package/.torusguard/scripts/recheck_runner.py +5 -4
- package/.torusguard/scripts/recipes_runner.py +91 -8
- package/.torusguard/scripts/report_sync.py +496 -73
- package/.torusguard/scripts/sarif_exporter.py +48 -8
- package/.torusguard/scripts/stack_detect.py +44 -2
- package/.torusguard/scripts/status_runner.py +267 -0
- package/.torusguard/scripts/term_ui.py +1 -1
- package/.torusguard/skills/torusguard/SKILL.md +75 -72
- package/.torusguard/skills/torusguard-apply/SKILL.md +84 -80
- package/.torusguard/skills/torusguard-audit/SKILL.md +87 -83
- package/.torusguard/skills/torusguard-authorize/SKILL.md +7 -2
- package/.torusguard/skills/torusguard-exploit-check/SKILL.md +7 -2
- package/.torusguard/skills/torusguard-full/SKILL.md +7 -2
- package/.torusguard/skills/torusguard-harden/SKILL.md +98 -94
- package/.torusguard/skills/torusguard-init/SKILL.md +68 -64
- package/.torusguard/skills/torusguard-recheck/SKILL.md +81 -77
- package/.torusguard/skills/torusguard-report/SKILL.md +93 -72
- package/.torusguard/skills/torusguard-status/SKILL.md +62 -58
- package/.torusguard/skills/torusguard-verify/SKILL.md +7 -2
- package/.torusguard/skills/torusguard-web-validate/SKILL.md +7 -2
- package/.torusguard/workflows/apply.md +1 -1
- package/.torusguard/workflows/audit.md +1 -1
- package/.torusguard/workflows/authorize.md +1 -1
- package/.torusguard/workflows/exploit-check.md +1 -1
- package/.torusguard/workflows/harden.md +1 -1
- package/.torusguard/workflows/init.md +1 -1
- package/.torusguard/workflows/memory.md +1 -1
- package/.torusguard/workflows/recheck.md +1 -1
- package/.torusguard/workflows/report.md +1 -1
- package/.torusguard/workflows/status.md +1 -1
- package/.torusguard/workflows/verify.md +1 -1
- package/.torusguard/workflows/web-validate.md +1 -1
- package/README.md +115 -81
- package/bin/torusguard.js +244 -38
- package/package.json +6 -2
- package/skills/torusguard/SKILL.md +1 -1
- package/skills/torusguard/__pycache__/bootstrap.cpython-314.pyc +0 -0
- package/skills/torusguard/bootstrap.py +52 -8
- package/skills/torusguard/payload/.manifest.json +51 -36
- package/skills/torusguard/payload/scripts/__pycache__/apply_runner.cpython-314.pyc +0 -0
- package/skills/torusguard/payload/scripts/__pycache__/audit_runner.cpython-311.pyc +0 -0
- package/skills/torusguard/payload/scripts/__pycache__/audit_runner.cpython-314.pyc +0 -0
- package/skills/torusguard/payload/scripts/__pycache__/diff_guard.cpython-311.pyc +0 -0
- package/skills/torusguard/payload/scripts/__pycache__/diff_guard.cpython-314.pyc +0 -0
- package/skills/torusguard/payload/scripts/__pycache__/finding_scorer.cpython-311.pyc +0 -0
- package/skills/torusguard/payload/scripts/__pycache__/finding_scorer.cpython-314.pyc +0 -0
- package/skills/torusguard/payload/scripts/__pycache__/harden_runner.cpython-314.pyc +0 -0
- package/skills/torusguard/payload/scripts/__pycache__/html_reporter.cpython-311.pyc +0 -0
- package/skills/torusguard/payload/scripts/__pycache__/html_reporter.cpython-314.pyc +0 -0
- package/skills/torusguard/payload/scripts/__pycache__/manifest_builder.cpython-314.pyc +0 -0
- package/skills/torusguard/payload/scripts/__pycache__/memory_engine.cpython-311.pyc +0 -0
- package/skills/torusguard/payload/scripts/__pycache__/memory_engine.cpython-314.pyc +0 -0
- package/skills/torusguard/payload/scripts/__pycache__/monorepo_detector.cpython-311.pyc +0 -0
- package/skills/torusguard/payload/scripts/__pycache__/monorepo_detector.cpython-314.pyc +0 -0
- package/skills/torusguard/payload/scripts/__pycache__/recheck_runner.cpython-314.pyc +0 -0
- package/skills/torusguard/payload/scripts/__pycache__/report_sync.cpython-311.pyc +0 -0
- package/skills/torusguard/payload/scripts/__pycache__/report_sync.cpython-314.pyc +0 -0
- package/skills/torusguard/payload/scripts/__pycache__/rules_sync.cpython-311.pyc +0 -0
- package/skills/torusguard/payload/scripts/__pycache__/run_manager.cpython-311.pyc +0 -0
- package/skills/torusguard/payload/scripts/__pycache__/run_manager.cpython-314.pyc +0 -0
- package/skills/torusguard/payload/scripts/__pycache__/sarif_exporter.cpython-314.pyc +0 -0
- package/skills/torusguard/payload/scripts/__pycache__/stack_detect.cpython-311.pyc +0 -0
- package/skills/torusguard/payload/scripts/__pycache__/stack_detect.cpython-314.pyc +0 -0
- package/skills/torusguard/payload/scripts/__pycache__/term_ui.cpython-311.pyc +0 -0
- package/skills/torusguard/payload/scripts/__pycache__/term_ui.cpython-314.pyc +0 -0
- package/skills/torusguard/payload/scripts/apply_runner.py +108 -9
- package/skills/torusguard/payload/scripts/audit_runner.py +336 -24
- package/skills/torusguard/payload/scripts/harden_runner.py +124 -70
- package/skills/torusguard/payload/scripts/html_reporter.py +3585 -648
- package/skills/torusguard/payload/scripts/manifest_builder.py +2 -0
- package/skills/torusguard/payload/scripts/recheck_runner.py +5 -4
- package/skills/torusguard/payload/scripts/recipes_runner.py +91 -8
- package/skills/torusguard/payload/scripts/report_sync.py +496 -73
- package/skills/torusguard/payload/scripts/sarif_exporter.py +48 -8
- package/skills/torusguard/payload/scripts/stack_detect.py +44 -2
- package/skills/torusguard/payload/scripts/status_runner.py +267 -0
- package/skills/torusguard/payload/scripts/term_ui.py +1 -1
- package/skills/torusguard/payload/skills/torusguard/SKILL.md +1 -1
- package/skills/torusguard/payload/skills/torusguard-apply/SKILL.md +1 -1
- package/skills/torusguard/payload/skills/torusguard-audit/SKILL.md +1 -1
- package/skills/torusguard/payload/skills/torusguard-authorize/SKILL.md +1 -1
- package/skills/torusguard/payload/skills/torusguard-exploit-check/SKILL.md +1 -1
- package/skills/torusguard/payload/skills/torusguard-full/SKILL.md +1 -1
- package/skills/torusguard/payload/skills/torusguard-harden/SKILL.md +1 -1
- package/skills/torusguard/payload/skills/torusguard-init/SKILL.md +1 -1
- package/skills/torusguard/payload/skills/torusguard-recheck/SKILL.md +1 -1
- package/skills/torusguard/payload/skills/torusguard-report/SKILL.md +40 -23
- package/skills/torusguard/payload/skills/torusguard-status/SKILL.md +1 -1
- package/skills/torusguard/payload/skills/torusguard-verify/SKILL.md +1 -1
- package/skills/torusguard/payload/skills/torusguard-web-validate/SKILL.md +1 -1
- package/skills/torusguard/payload/workflows/apply.md +9 -1
- package/skills/torusguard/payload/workflows/audit.md +8 -2
- package/skills/torusguard/payload/workflows/authorize.md +1 -1
- package/skills/torusguard/payload/workflows/exploit-check.md +1 -1
- package/skills/torusguard/payload/workflows/harden.md +6 -1
- package/skills/torusguard/payload/workflows/init.md +7 -1
- package/skills/torusguard/payload/workflows/memory.md +1 -1
- package/skills/torusguard/payload/workflows/recheck.md +1 -1
- package/skills/torusguard/payload/workflows/recipes.md +55 -0
- package/skills/torusguard/payload/workflows/report.md +59 -55
- package/skills/torusguard/payload/workflows/status.md +4 -1
- package/skills/torusguard/payload/workflows/torusguard-apply.md +110 -0
- package/skills/torusguard/payload/workflows/torusguard-audit.md +105 -0
- package/skills/torusguard/payload/workflows/torusguard-authorize.md +96 -0
- package/skills/torusguard/payload/workflows/torusguard-exploit-check.md +98 -0
- package/skills/torusguard/payload/workflows/torusguard-harden.md +104 -0
- package/skills/torusguard/payload/workflows/torusguard-init.md +106 -0
- package/skills/torusguard/payload/workflows/torusguard-recheck.md +101 -0
- package/skills/torusguard/payload/workflows/torusguard-recipes.md +55 -0
- package/skills/torusguard/payload/workflows/torusguard-report.md +105 -0
- package/skills/torusguard/payload/workflows/torusguard-status.md +103 -0
- package/skills/torusguard/payload/workflows/torusguard-verify.md +100 -0
- package/skills/torusguard/payload/workflows/torusguard-web-validate.md +96 -0
- package/skills/torusguard/payload/workflows/torusguard.md +19 -0
- package/skills/torusguard/payload/workflows/verify.md +1 -1
- package/skills/torusguard/payload/workflows/web-validate.md +1 -1
- package/skills/torusguard-apply/SKILL.md +1 -1
- package/skills/torusguard-audit/SKILL.md +1 -1
- package/skills/torusguard-authorize/SKILL.md +1 -1
- package/skills/torusguard-exploit-check/SKILL.md +1 -1
- package/skills/torusguard-full/SKILL.md +1 -1
- package/skills/torusguard-harden/SKILL.md +1 -1
- package/skills/torusguard-init/SKILL.md +1 -1
- package/skills/torusguard-recheck/SKILL.md +1 -1
- package/skills/torusguard-report/SKILL.md +40 -23
- package/skills/torusguard-status/SKILL.md +1 -1
- package/skills/torusguard-verify/SKILL.md +1 -1
- package/skills/torusguard-web-validate/SKILL.md +1 -1
|
@@ -1,10 +1,11 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: torusguard-web-validate
|
|
3
3
|
description: Execute authorized HTTP probing against local/staging web applications โ session capture, transparent audit headers, and secret redaction.
|
|
4
|
-
version: 1.3.
|
|
4
|
+
version: 1.3.6
|
|
5
5
|
workflow: .torusguard/workflows/web-validate.md
|
|
6
|
-
tools: Read, Grep, Glob, Bash, Write
|
|
6
|
+
tools: Read, Grep, Glob, Bash, Write, run_command
|
|
7
7
|
scripts-binding:
|
|
8
|
+
- .torusguard/scripts/report_sync.py
|
|
8
9
|
- .torusguard/scripts/safety_gate.py
|
|
9
10
|
---
|
|
10
11
|
|
|
@@ -48,6 +49,10 @@ All Bearer tokens, cookies, passwords, and API keys are redacted prior to disk s
|
|
|
48
49
|
|
|
49
50
|
---
|
|
50
51
|
|
|
52
|
+
## Living Report Ground Truth
|
|
53
|
+
- Always inspect `security_report.md` at workspace root before acting.
|
|
54
|
+
- Update finding statuses after completion to eliminate hallucination.
|
|
55
|
+
|
|
51
56
|
## Safety Constraints
|
|
52
57
|
- Max 50 requests per validation session.
|
|
53
58
|
- Never test unauthorized domains or third-party APIs.
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
description: Governed patch application with pre-apply rollback snapshots and Human Gate authorization.
|
|
3
3
|
tools: Read, Grep, Glob, Bash, Edit, Write
|
|
4
|
-
version: 1.3.
|
|
4
|
+
version: 1.3.6
|
|
5
5
|
agent: remediator
|
|
6
6
|
lifecycle-phase: Phase 5 (Patch Application)
|
|
7
7
|
required-skills:
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
description: Static security AST scanning, stable line-shift invariant fingerprinting, root-cause clustering, and 0-100 confidence scoring.
|
|
3
3
|
tools: Read, Grep, Glob, Bash, Write
|
|
4
|
-
version: 1.3.
|
|
4
|
+
version: 1.3.6
|
|
5
5
|
agent: auditor
|
|
6
6
|
lifecycle-phase: Phase 2 (Static Audit & Clustering)
|
|
7
7
|
required-skills:
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
description: Legal scope definition, target ownership proof verification, and safety boundary enforcement for runtime validation.
|
|
3
3
|
tools: Read, Grep, Glob, Bash, Write
|
|
4
|
-
version: 1.3.
|
|
4
|
+
version: 1.3.6
|
|
5
5
|
agent: reviewer
|
|
6
6
|
lifecycle-phase: Phase 1 (Authorization Gate)
|
|
7
7
|
required-skills:
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
description: Safe, bounded, single-step exploitability confirmation across 5 standard verification statuses.
|
|
3
3
|
tools: Read, Grep, Glob, Bash, Write
|
|
4
|
-
version: 1.3.
|
|
4
|
+
version: 1.3.6
|
|
5
5
|
agent: validator
|
|
6
6
|
lifecycle-phase: Phase 3c (Exploitability Check)
|
|
7
7
|
required-skills:
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
description: Governed remediation formulation under strict Ponytail Protocol bounds (<= 35 additions, <= 25 deletions) and bundle packaging.
|
|
3
3
|
tools: Read, Grep, Glob, Bash, Write
|
|
4
|
-
version: 1.3.
|
|
4
|
+
version: 1.3.6
|
|
5
5
|
agent: remediator
|
|
6
6
|
lifecycle-phase: Phase 4 (Remediation Formulation)
|
|
7
7
|
required-skills:
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
description: Baseline project discovery, workspace scaffolding, stack detection, and framework-tailored security rule activation.
|
|
3
3
|
tools: Read, Grep, Glob, Bash, Write
|
|
4
|
-
version: 1.3.
|
|
4
|
+
version: 1.3.6
|
|
5
5
|
agent: profiler
|
|
6
6
|
lifecycle-phase: Phase 0 (Baseline Setup)
|
|
7
7
|
required-skills:
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
description: TorusGuard Adaptive Security Memory Engine โ view memory stats, export/import intelligence, apply TTL decay, and manage false positives.
|
|
3
3
|
tools: Read, Grep, Glob, Bash
|
|
4
|
-
version: 1.3.
|
|
4
|
+
version: 1.3.6
|
|
5
5
|
agent: reviewer
|
|
6
6
|
lifecycle-phase: Intelligence / Memory
|
|
7
7
|
required-skills:
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
description: Targeted differential AST re-scan, fix closure verification, and regression state machine transitions.
|
|
3
3
|
tools: Read, Grep, Glob, Bash, Write
|
|
4
|
-
version: 1.3.
|
|
4
|
+
version: 1.3.6
|
|
5
5
|
agent: reviewer
|
|
6
6
|
lifecycle-phase: Phase 6 (Targeted Recheck & Verification)
|
|
7
7
|
required-skills:
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
description: Executive posture reporting, cluster analysis, signed compliance audit, and OASIS SARIF v2.1.0 structured export.
|
|
3
3
|
tools: Read, Grep, Glob, Bash, Write
|
|
4
|
-
version: 1.3.
|
|
4
|
+
version: 1.3.6
|
|
5
5
|
agent: reviewer
|
|
6
6
|
lifecycle-phase: Phase 7 (Reporting & SARIF Export)
|
|
7
7
|
required-skills:
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
description: Read-only diagnostic overview of workspace security posture, active configuration, rules catalog, and run history.
|
|
3
3
|
tools: Read, Grep, Glob, Bash
|
|
4
|
-
version: 1.3.
|
|
4
|
+
version: 1.3.6
|
|
5
5
|
agent: reviewer
|
|
6
6
|
lifecycle-phase: System / Diagnostics
|
|
7
7
|
required-skills:
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
description: Evidence sufficiency verification, live disk line match audit, and finding score refinement.
|
|
3
3
|
tools: Read, Grep, Glob, Bash, Write
|
|
4
|
-
version: 1.3.
|
|
4
|
+
version: 1.3.6
|
|
5
5
|
agent: validator
|
|
6
6
|
lifecycle-phase: Phase 3a (Evidence Verification)
|
|
7
7
|
required-skills:
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
description: Authorized HTTP probing, token redaction, transparent audit header injection, and replay trace capture.
|
|
3
3
|
tools: Read, Grep, Glob, Bash, Write
|
|
4
|
-
version: 1.3.
|
|
4
|
+
version: 1.3.6
|
|
5
5
|
agent: validator
|
|
6
6
|
lifecycle-phase: Phase 3b (Runtime Web Validation)
|
|
7
7
|
required-skills:
|
package/README.md
CHANGED
|
@@ -9,15 +9,16 @@
|
|
|
9
9
|
<strong>Zero Telemetry ยท Zero External Python Dependencies ยท Pure Standard-Library Architecture ยท 100% Local-First</strong>
|
|
10
10
|
</p>
|
|
11
11
|
|
|
12
|
-
[](https://www.npmjs.com/package/torusguard)
|
|
13
|
+
[](https://github.com/githubmofo/TorusGuard/pkgs/npm/torusguard)
|
|
14
|
+
[](https://github.com/githubmofo/TorusGuard/releases/latest)
|
|
15
|
+
[](harness/runner.py)
|
|
16
16
|
[](security_report.md)
|
|
17
17
|
[](rules/)
|
|
18
18
|
[](.torusguard/scripts/term_ui.py)
|
|
19
19
|
[](LICENSE)
|
|
20
20
|
[-blue.svg?style=flat-square&logo=python&logoColor=white)](https://python.org)
|
|
21
|
+
[](https://go.dev)
|
|
21
22
|
[](https://nodejs.org)
|
|
22
23
|
[](.torusguard/schemas/)
|
|
23
24
|
[](docs/architecture/SECURITY_ARCHITECTURE.md)
|
|
@@ -26,35 +27,8 @@
|
|
|
26
27
|
|
|
27
28
|
---
|
|
28
29
|
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
In the emblem above, the **central golden keyhole shield** represents unbreakable secret protection, authentication integrity, and tenant isolation. It is enveloped by a continuous, interlocking **torus ring**โsymbolizing TorusGuard's closed-loop autonomous security lifecycle:
|
|
32
|
-
|
|
33
|
-
```mermaid
|
|
34
|
-
flowchart LR
|
|
35
|
-
subgraph Torus ["๐ 360ยฐ Closed-Loop Torus Lifecycle"]
|
|
36
|
-
direction LR
|
|
37
|
-
Detect["1. Detect (74 AST Rules)"] --> Verify["2. Verify (Evidence & Fingerprints)"]
|
|
38
|
-
Verify --> Harden["3. Harden (Ponytail Protocol)"]
|
|
39
|
-
Harden --> Apply["4. Apply (Human Gate & Snapshots)"]
|
|
40
|
-
Apply --> Recheck["5. Recheck (Differential Closure)"]
|
|
41
|
-
Recheck --> Memory["6. Memory (Golden Fix Recipes)"]
|
|
42
|
-
Memory -.->|Continuous Guardrail| Detect
|
|
43
|
-
end
|
|
44
|
-
|
|
45
|
-
subgraph Shield ["๐ก๏ธ Central Golden Keyhole Shield"]
|
|
46
|
-
direction TB
|
|
47
|
-
Inv1["Browser-Code Truth: Zero Client Secrets"]
|
|
48
|
-
Inv2["Tenant Partitioning: Scoped Lookups"]
|
|
49
|
-
Inv3["Zero Bypasses: No verify=False"]
|
|
50
|
-
Inv4["Living Source of Truth: security_report.md"]
|
|
51
|
-
end
|
|
52
|
-
|
|
53
|
-
Torus === Shield
|
|
54
|
-
```
|
|
55
|
-
|
|
56
|
-
> **The Developer Reality:** AI coding assistants (Cursor, Claude Code, Copilot, Windsurf) build software at superhuman speed, but routinely leak private keys into client bundles, drop tenant partition filters, or inject raw user input into LLM system prompts.
|
|
57
|
-
> **TorusGuard forms an unbroken local guardrail around your codebase.** It audits static ASTs, runtime-verifies exploitability with inert canaries, synthesizes minimal surgical diffs adhering to the **Ponytail Protocol** ($\le 35$ additions, $\le 25$ deletions), and eliminates hallucinations by maintaining a verifiable single source of truth in `security_report.md`.
|
|
30
|
+
> **The Developer Reality:** AI coding assistants (Cursor, Claude Code, Copilot, Windsurf, Antigravity) build software at superhuman speed, but routinely leak private keys into client bundles, drop tenant partition filters, or inject raw user input into LLM system prompts.
|
|
31
|
+
> **TorusGuard forms an unbroken local guardrail around your codebase.** It audits static ASTs across 74 rules, runtime-verifies exploitability with inert canaries, synthesizes minimal surgical diffs adhering to the **Ponytail Protocol** ($\le 35$ additions, $\le 25$ deletions), and eliminates hallucinations by maintaining a verifiable single source of truth in `security_report.md`.
|
|
58
32
|
|
|
59
33
|
---
|
|
60
34
|
|
|
@@ -63,18 +37,20 @@ flowchart LR
|
|
|
63
37
|
1. [Developer Overview & Value Proposition](#-developer-overview--value-proposition)
|
|
64
38
|
2. [End-to-End Autonomous Architecture](#-end-to-end-autonomous-architecture)
|
|
65
39
|
3. [Why TorusGuard? (Traditional SAST vs. AI Coding vs. TorusGuard)](#-why-torusguard)
|
|
66
|
-
4. [Installation & Setup Guide (npm & CLI)](#-installation--setup-guide-npm--cli)
|
|
40
|
+
4. [Installation & Setup Guide (npm, Go & CLI)](#-installation--setup-guide-npm-go--cli)
|
|
67
41
|
5. [Quickstart: The 5-Step Core Lifecycle](#-quickstart-the-5-step-core-lifecycle)
|
|
68
42
|
6. [Dual-Strategy Command Matrix (CLI & AI Chat Parity)](#-dual-strategy-command-matrix-cli--ai-chat-parity)
|
|
69
|
-
7. [
|
|
70
|
-
8. [
|
|
71
|
-
9. [
|
|
72
|
-
10. [
|
|
73
|
-
11. [
|
|
74
|
-
12. [
|
|
75
|
-
13. [
|
|
76
|
-
14. [
|
|
77
|
-
15. [
|
|
43
|
+
7. [Polyglot Go Engine & Native Runner](#-polyglot-go-engine--native-runner)
|
|
44
|
+
8. [Package Self-Update Engine (`update`)](#-package-self-update-engine-update)
|
|
45
|
+
9. [74 Canonical Security Rules Catalog (18 Families Across 6 Pillars)](#-74-canonical-security-rules-catalog-18-families-across-6-pillars)
|
|
46
|
+
10. [Ponytail Remediation Protocol & Rollback Safety](#-ponytail-remediation-protocol--rollback-safety)
|
|
47
|
+
11. [Living Security Report Ground Truth (`security_report.md`)](#-living-security-report-ground-truth-security_reportmd)
|
|
48
|
+
12. [Visual HTML Dashboard & SARIF v2.1.0 Export](#-visual-html-dashboard--sarif-v210-export)
|
|
49
|
+
13. [AI Editor Guardrails Auto-Sync](#-ai-editor-guardrails-auto-sync)
|
|
50
|
+
14. [Monorepo Fleet Support & Git Pre-Commit Diff Guard](#-monorepo-fleet-support--git-pre-commit-diff-guard)
|
|
51
|
+
15. [Verification & Test Harness (133/133 Passing Harness Explained)](#-verification--test-harness)
|
|
52
|
+
16. [Security Policy & Responsible Disclosure](#-security-policy--responsible-disclosure)
|
|
53
|
+
17. [License](#-license)
|
|
78
54
|
|
|
79
55
|
---
|
|
80
56
|
|
|
@@ -136,7 +112,7 @@ flowchart TD
|
|
|
136
112
|
|
|
137
113
|
## โ๏ธ Why TorusGuard?
|
|
138
114
|
|
|
139
|
-
| Security Dimension | Traditional SAST (SonarQube, Snyk) | Raw AI Coding Agents | TorusGuard v1.3.
|
|
115
|
+
| Security Dimension | Traditional SAST (SonarQube, Snyk) | Raw AI Coding Agents | TorusGuard v1.3.6 Engine |
|
|
140
116
|
|:---|:---:|:---:|:---:|
|
|
141
117
|
| **Target Architecture** | Human-written legacy codebases | High-churn AI code generation | **AI-built full-stack applications** |
|
|
142
118
|
| **Remediation Model** | PDF reports & Jira tickets | Destructive full-file rewrites | **Ponytail Protocol** ($\le 35$ add, $\le 25$ del) |
|
|
@@ -155,6 +131,7 @@ TorusGuard is designed to be effortless to adopt in any project. There are no co
|
|
|
155
131
|
### ๐ Prerequisites
|
|
156
132
|
- **Node.js:** 18.0.0 or higher
|
|
157
133
|
- **Python:** 3.10 or higher (**Pure standard library** โ **zero `pip` dependencies required**)
|
|
134
|
+
- **Go (Optional):** 1.22 or higher (for native Go CLI compilation & Go module workflows)
|
|
158
135
|
|
|
159
136
|
> [!IMPORTANT]
|
|
160
137
|
> **Zero Pip Dependencies Guarantee:** TorusGuard's core Python engine relies strictly on the Python standard library (`pathlib`, `re`, `json`, `difflib`, `shutil`, `sys`, `os`, `argparse`, `hashlib`). You **never** need to create a Python virtualenv (`venv`), run `pip install`, or configure external wheels. It works out of the box with your system Python.
|
|
@@ -169,6 +146,7 @@ Run TorusGuard instantly in any repository without installing anything globally:
|
|
|
169
146
|
npx torusguard init
|
|
170
147
|
npx torusguard audit
|
|
171
148
|
npx torusguard status
|
|
149
|
+
npx torusguard update
|
|
172
150
|
```
|
|
173
151
|
|
|
174
152
|
### 2. Project Dev Dependency
|
|
@@ -185,19 +163,32 @@ Add convenience scripts to your `package.json`:
|
|
|
185
163
|
"security:audit": "torusguard audit",
|
|
186
164
|
"security:harden": "torusguard harden",
|
|
187
165
|
"security:recheck": "torusguard recheck",
|
|
188
|
-
"security:status": "torusguard status"
|
|
166
|
+
"security:status": "torusguard status",
|
|
167
|
+
"security:update": "torusguard update"
|
|
189
168
|
}
|
|
190
169
|
}
|
|
191
170
|
```
|
|
192
171
|
|
|
193
|
-
### 3.
|
|
172
|
+
### 3. Native Go CLI Runner
|
|
173
|
+
For Go ecosystem developers, TorusGuard ships with a native Go runner module ([go.mod](go.mod)):
|
|
174
|
+
|
|
175
|
+
```bash
|
|
176
|
+
# Run zero-dependency Go CLI entrypoint directly
|
|
177
|
+
go run cmd/torusguard/main.go audit
|
|
178
|
+
|
|
179
|
+
# Or install globally into your $GOPATH/bin
|
|
180
|
+
go install github.com/torusguard/torusguard/cmd/torusguard@latest
|
|
181
|
+
torusguard status
|
|
182
|
+
```
|
|
183
|
+
|
|
184
|
+
### 4. Global NPM Installation
|
|
194
185
|
If you prefer having the `torusguard` binary available system-wide across all terminal sessions:
|
|
195
186
|
|
|
196
187
|
```bash
|
|
197
188
|
npm install -g torusguard
|
|
198
189
|
```
|
|
199
190
|
|
|
200
|
-
###
|
|
191
|
+
### 5. AI Agent Skill Installation
|
|
201
192
|
Install TorusGuard as a native AI assistant skill for Cursor, Claude Code, Cline, or Antigravity:
|
|
202
193
|
|
|
203
194
|
```bash
|
|
@@ -207,7 +198,7 @@ npx skills add torusguard
|
|
|
207
198
|
---
|
|
208
199
|
|
|
209
200
|
### ๐ What Happens on First Run (`init`)
|
|
210
|
-
When you execute `npx torusguard init` in your repository:
|
|
201
|
+
When you execute `npx torusguard init` (or `npx torusguard init --template golang`) in your repository:
|
|
211
202
|
1. **Polyglot Profiling:** Automatically detects 16+ languages (Go, Rust, Java, C#, PHP, Python, TypeScript) and 30+ frameworks without manual configuration.
|
|
212
203
|
2. **Scaffolding:** Creates a local `.torusguard/` directory containing active security rules, schemas, and runners.
|
|
213
204
|
3. **Editor Rules Synchronization:** Automatically compiles compact, language-specific guardrails into `.cursorrules`, `CLAUDE.md`, `.agent/rules/torusguard.md`, and `.windsurfrules` ($\le 300$ prompt tokens).
|
|
@@ -221,16 +212,16 @@ When you execute `npx torusguard init` in your repository:
|
|
|
221
212
|
Run the complete autonomous governance cycle in 60 seconds from your terminal:
|
|
222
213
|
|
|
223
214
|
```bash
|
|
224
|
-
# Step 1: Initialize workspace and profile stack
|
|
215
|
+
# Step 1: Initialize workspace and profile stack (optional: --template golang|nextjs|fastapi)
|
|
225
216
|
npx torusguard init
|
|
226
217
|
|
|
227
|
-
# Step 2: Run AST static security audit across 74 rules
|
|
218
|
+
# Step 2: Run AST static security audit across 74 rules (optional: --watch, --sarif)
|
|
228
219
|
npx torusguard audit
|
|
229
220
|
|
|
230
|
-
# Step 3: Synthesize minimal surgical candidate patches
|
|
221
|
+
# Step 3: Synthesize minimal surgical candidate patches (optional: --dry-run, --severity high)
|
|
231
222
|
npx torusguard harden
|
|
232
223
|
|
|
233
|
-
# Step 4: Review syntax-highlighted diffs and apply with rollback backup
|
|
224
|
+
# Step 4: Review syntax-highlighted diffs and apply with rollback backup (optional: --diff, --selective)
|
|
234
225
|
npx torusguard apply
|
|
235
226
|
|
|
236
227
|
# Step 5: Differentially recheck modified files to verify fix closure
|
|
@@ -243,37 +234,71 @@ npx torusguard recheck
|
|
|
243
234
|
|
|
244
235
|
## โจ๏ธ Dual-Strategy Command Matrix (CLI & AI Chat Parity)
|
|
245
236
|
|
|
246
|
-
TorusGuard guarantees **100% operational parity** between terminal CLI execution and AI chat slash commands. Terminal outputs strictly adhere to a **75-column visual width** with Unicode emojis and ANSI stripping.
|
|
237
|
+
TorusGuard guarantees **100% operational parity** between terminal CLI execution and AI chat slash commands. Terminal outputs strictly adhere to a **75-column visual width** with Unicode emojis and ANSI stripping. All commands support `--target <dir>` / `-t <dir>` for monorepo and subproject isolation.
|
|
247
238
|
|
|
248
239
|
### ๐ Core Remediation Lifecycle
|
|
249
240
|
|
|
250
241
|
| Lifecycle Stage | Mode A: Terminal CLI | Mode B: AI Chat Command | Governed Action & Primary Artifact |
|
|
251
242
|
|:---|:---|:---|:---|
|
|
252
|
-
| **1. Init** | `npx torusguard init` | `/torusguard init` | Profiles workspace, activates rules,
|
|
253
|
-
| **2.
|
|
254
|
-
| **3.
|
|
255
|
-
| **4.
|
|
256
|
-
| **5.
|
|
257
|
-
| **6.
|
|
243
|
+
| **1. Init** | `npx torusguard init [--template <name>] [--audit]` | `/torusguard init` | Profiles workspace, activates rules, scaffolds `.torusguard/` |
|
|
244
|
+
| **2. Status** | `npx torusguard status` | `/torusguard status` | 75-column diagnostic overview of health score, stack, memory & rules |
|
|
245
|
+
| **3. Audit** | `npx torusguard audit [--watch] [--sarif]` | `/torusguard audit` | 74-rule AST scan, line-shift fingerprints, throughput metrics, living ledger |
|
|
246
|
+
| **4. Verify** | `npx torusguard verify` | `/torusguard verify` | Asserts evidence sufficiency & live disk line-shift fingerprint matches |
|
|
247
|
+
| **5. Harden** | `npx torusguard harden [--dry-run] [--severity <s\>]` | `/torusguard harden` | Synthesizes Ponytail diffs ($\le 35$ add, $\le 25$ del) into candidate bundles |
|
|
248
|
+
| **6. Apply** | `npx torusguard apply [--diff] [--selective] [--yes]` | `/torusguard apply` | Human Gate, pre-apply `.bak` snapshots, Golden Fix distillation |
|
|
249
|
+
| **7. Rollback**| `npx torusguard rollback [--run <id>]` | `/torusguard rollback` | Instant restoration from pre-apply snapshots in `.torusguard/snapshots/` |
|
|
250
|
+
| **8. Recheck** | `npx torusguard recheck` | `/torusguard recheck` | Differential AST re-scan; marks findings `RESOLVED ๐ข` in living report |
|
|
251
|
+
| **9. Recipes** | `npx torusguard recipes [--search <q>] [--export <p>]`| `/torusguard recipes` | Explores and exports verified Golden Fix patterns from `.torusguard/memory/` |
|
|
252
|
+
| **10. Report** | `npx torusguard report --html [--sarif]` | `/torusguard report` | Emits single-file dark-mode HTML posture dashboard & OASIS SARIF v2.1.0 |
|
|
253
|
+
| **11. Update** | `npx torusguard update [--install]` | `/torusguard update` | Verifies npm registry for latest versions and provides 1-command upgrade |
|
|
254
|
+
| **12. Rules Sync**| `npx torusguard rules sync` | `/torusguard rules sync`| Synchronizes prompt guardrails across Cursor, Claude, Antigravity, Windsurf |
|
|
255
|
+
| **13. Diff Guard**| `npx torusguard diff-guard [--install-hook]` | `/torusguard diff-guard`| Audits git diffs for security bypasses; binds pre-commit git hook |
|
|
256
|
+
| **14. Authorize** | `npx torusguard authorize` | `/torusguard authorize` | Target domain allowlisting, cryptographic ownership proof, TTL limits |
|
|
257
|
+
| **15. Validate** | `npx torusguard web-validate` | `/torusguard web-validate`| Authorized non-destructive HTTP probing with transparent audit headers |
|
|
258
|
+
| **16. Exploit** | `npx torusguard exploit-check` | `/torusguard exploit-check`| Bounded single-step exploitability confirmation using inert sentinels |
|
|
258
259
|
|
|
259
|
-
|
|
260
|
+
---
|
|
260
261
|
|
|
261
|
-
|
|
262
|
-
|:---|:---|:---|:---|
|
|
263
|
-
| **Status** | `npx torusguard status` | `/torusguard status` | 75-column diagnostic overview of health score, stack, memory & rules |
|
|
264
|
-
| **Recipes** | `npx torusguard recipes` | `/torusguard recipes` | Explores verified Golden Fix patterns stored in `.torusguard/memory/` |
|
|
265
|
-
| **Report** | `npx torusguard report --html` | `/torusguard report` | Emits single-file dark-mode HTML posture report & OASIS SARIF v2.1.0 |
|
|
266
|
-
| **Rules Sync**| `npx torusguard rules sync` | `/torusguard rules sync`| Synchronizes prompt guardrails across Cursor, Claude, Antigravity, Windsurf |
|
|
267
|
-
| **Diff Guard**| `npx torusguard diff-guard` | `/torusguard diff-guard`| Audits git diffs for security bypasses; `--install-hook` binds pre-commit |
|
|
262
|
+
## ๐น Polyglot Go Engine & Native Runner
|
|
268
263
|
|
|
269
|
-
|
|
264
|
+
TorusGuard v1.4.0 introduces native, zero-dependency Go ecosystem support:
|
|
270
265
|
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
266
|
+
### 1. Go AST Invariant Security Rules
|
|
267
|
+
- **`TG-INPUT-002` (Raw SQL Concatenation):** Detects unparameterized string concatenation and `fmt.Sprintf` query interpolation in `database/sql`, `sqlx`, and GORM.
|
|
268
|
+
- **`TG-INPUT-006` (Path Traversal):** Detects unsanitized file reads (`os.Open`, `os.ReadFile`) using user request parameters.
|
|
269
|
+
- **`TG-SSRF-004` (Unbounded HTTP Requests):** Flags `&http.Client{}` and `http.DefaultClient` lacking explicit timeout boundaries to prevent connection pooling denial-of-service.
|
|
270
|
+
- **`TG-DIFF-001` (Security Bypasses):** Prevents insecure TLS validation (`InsecureSkipVerify: true`).
|
|
271
|
+
- **`TG-SUPPLY-001` (Supply Chain):** Asserts lockfile presence and cryptographic tracking for `go.sum`.
|
|
272
|
+
|
|
273
|
+
### 2. Surgical Ponytail Remediation for Go
|
|
274
|
+
Patches for Go follow strict Ponytail line churn limits ($\le 35$ additions, $\le 25$ deletions):
|
|
275
|
+
```go
|
|
276
|
+
// Example: TG-SSRF-004 Remediation
|
|
277
|
+
- client := &http.Client{}
|
|
278
|
+
+ client := &http.Client{Timeout: 10 * time.Second}
|
|
279
|
+
|
|
280
|
+
// Example: TG-INPUT-006 Path Traversal Remediation
|
|
281
|
+
- data, err := os.ReadFile("/data/" + c.Query("file"))
|
|
282
|
+
+ data, err := os.ReadFile(filepath.Join("/data", filepath.Base(c.Query("file"))))
|
|
283
|
+
```
|
|
284
|
+
|
|
285
|
+
---
|
|
286
|
+
|
|
287
|
+
## ๐ Package Self-Update Engine (`update`)
|
|
288
|
+
|
|
289
|
+
Keep your security guardrails continuously synchronized with the latest threat models:
|
|
290
|
+
|
|
291
|
+
```bash
|
|
292
|
+
# Check registry for newer versions
|
|
293
|
+
npx torusguard update
|
|
294
|
+
|
|
295
|
+
# Automatically upgrade to latest version
|
|
296
|
+
npx torusguard update --install
|
|
297
|
+
```
|
|
298
|
+
|
|
299
|
+
- **Zero-Dependency Registry Check:** Queries `https://registry.npmjs.org/torusguard/latest` natively.
|
|
300
|
+
- **SemVer Delta Analysis:** Displays current version against registry latest in standard 75-column cards.
|
|
301
|
+
- **Automated Upgrade Flow:** Executes package installation upon user authorization.
|
|
277
302
|
|
|
278
303
|
---
|
|
279
304
|
|
|
@@ -426,7 +451,13 @@ TorusGuard automatically discovers and profiles multi-package workspaces:
|
|
|
426
451
|
## ๐งช Verification & Test Harness
|
|
427
452
|
|
|
428
453
|
### What Happens When You Run `npm test`?
|
|
429
|
-
TorusGuard enforces a strict **100% pass requirement across
|
|
454
|
+
TorusGuard enforces a strict **100% pass requirement across 133 tests in 21 test suites** before every release.
|
|
455
|
+
The test harness runs with **zero third-party dependencies** via standard Python 3:
|
|
456
|
+
|
|
457
|
+
```bash
|
|
458
|
+
npm test
|
|
459
|
+
# Equivalent to: python harness/runner.py
|
|
460
|
+
```
|
|
430
461
|
|
|
431
462
|
When a developer runs:
|
|
432
463
|
```bash
|
|
@@ -435,11 +466,14 @@ npm test
|
|
|
435
466
|
The test harness invokes `python harness/runner.py` directly using the Python standard library. It systematically verifies:
|
|
436
467
|
1. **JSON Schema Validity:** 10 formal schemas (`finding`, `evidence`, `remediation`, `rule`, `lifecycle`, `provenance`, etc.).
|
|
437
468
|
2. **74-Rule Catalog Integrity:** AST detection accuracy across all 18 security families.
|
|
438
|
-
3. **
|
|
439
|
-
4. **
|
|
440
|
-
5. **
|
|
441
|
-
6. **
|
|
442
|
-
7. **
|
|
469
|
+
3. **Polyglot Go Engine:** Go module definition, Go stack detection (Gin, Fiber, GORM), and Go AST rules (`TG-INPUT-002`, `TG-INPUT-006`, `TG-SSRF-004`).
|
|
470
|
+
4. **Line-Shift Fingerprinting:** Stable anchor matching across file edits without line number drift.
|
|
471
|
+
5. **Secret Redaction:** Stripe secret keys and JWT tokens safely masked.
|
|
472
|
+
6. **Deterministic Replay:** 3-pass differential validation across Django, DRF, FastAPI, Flask, and SQLAlchemy fixtures.
|
|
473
|
+
7. **Ponytail Patch Churn Bounds:** Verifying line budgets ($\le 35$ additions, $\le 25$ deletions).
|
|
474
|
+
8. **Deepened Command Verification:** Audit watch loop & SARIF export, Harden dry-run & severity floor, Recipes search & export, Apply diff preview & snapshot ledger, and Bootstrap templates.
|
|
475
|
+
9. **Living Security Report State Transitions:** Discovery (`OPEN ๐ด`), Candidate (`CANDIDATE ๐ก`), Applied (`APPLIED ๐ต`), and Verified Closure (`RESOLVED ๐ข`).
|
|
476
|
+
10. **Cryptographic Manifest Parity:** 100% SHA-256 match across all indexed workspace files.
|
|
443
477
|
|
|
444
478
|
```bash
|
|
445
479
|
# Run formal TorusGuard test harness
|
|
@@ -447,7 +481,7 @@ npm test
|
|
|
447
481
|
|
|
448
482
|
# Expected Output:
|
|
449
483
|
# ================================================================================
|
|
450
|
-
# SUMMARY:
|
|
484
|
+
# SUMMARY: 133 Passed | 0 Failed
|
|
451
485
|
# ================================================================================
|
|
452
486
|
```
|
|
453
487
|
|