torusguard 1.3.5 → 1.3.6
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 +35 -35
- package/.torusguard/runs/report-latest.html +2685 -303
- 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 +12 -0
- package/.torusguard/runs/run-20260918-105940-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__/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 +11 -5
- package/.torusguard/scripts/audit_runner.py +222 -15
- package/.torusguard/scripts/harden_runner.py +3 -3
- package/.torusguard/scripts/html_reporter.py +2668 -648
- package/.torusguard/scripts/recheck_runner.py +3 -3
- package/.torusguard/scripts/recipes_runner.py +3 -3
- package/.torusguard/scripts/report_sync.py +370 -74
- package/.torusguard/scripts/sarif_exporter.py +48 -8
- package/.torusguard/scripts/stack_detect.py +44 -2
- 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 +14 -8
- package/bin/torusguard.js +56 -20
- package/package.json +1 -1
- package/skills/torusguard/SKILL.md +1 -1
- package/skills/torusguard/bootstrap.py +7 -2
- package/skills/torusguard/payload/.manifest.json +35 -35
- 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 +11 -5
- package/skills/torusguard/payload/scripts/audit_runner.py +222 -15
- package/skills/torusguard/payload/scripts/harden_runner.py +3 -3
- package/skills/torusguard/payload/scripts/html_reporter.py +2668 -648
- package/skills/torusguard/payload/scripts/recheck_runner.py +3 -3
- package/skills/torusguard/payload/scripts/recipes_runner.py +3 -3
- package/skills/torusguard/payload/scripts/report_sync.py +370 -74
- 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/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 +1 -1
- package/skills/torusguard/payload/workflows/audit.md +1 -1
- 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 +1 -1
- package/skills/torusguard/payload/workflows/init.md +1 -1
- package/skills/torusguard/payload/workflows/memory.md +1 -1
- package/skills/torusguard/payload/workflows/recheck.md +1 -1
- package/skills/torusguard/payload/workflows/report.md +1 -1
- package/skills/torusguard/payload/workflows/status.md +1 -1
- 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,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: torusguard-report
|
|
3
3
|
description: Generate executive posture reports, export OASIS SARIF v2.1.0 logs, and render dark-mode HTML dashboards via CLI or AI Agent.
|
|
4
|
-
version:
|
|
4
|
+
version: 2.2.0
|
|
5
5
|
workflow: .torusguard/workflows/report.md
|
|
6
6
|
tools: Read, Grep, Glob, Write, run_command
|
|
7
7
|
scripts-binding:
|
|
@@ -15,61 +15,78 @@ scripts-binding:
|
|
|
15
15
|
# TorusGuard Report — Posture Reporting & SARIF / HTML Export
|
|
16
16
|
|
|
17
17
|
## Objective
|
|
18
|
-
Aggregate findings, verification traces, and recheck results into an auditable executive security report, export schema-compliant OASIS SARIF v2.1.0 logs for CI/CD pipelines, and render zero-dependency single-file visual HTML posture reports.
|
|
18
|
+
Aggregate findings, verification traces, and recheck results into an auditable executive security report, export schema-compliant OASIS SARIF v2.1.0 logs for CI/CD pipelines, and render zero-dependency single-file visual HTML posture reports with full dual-mode parity.
|
|
19
19
|
|
|
20
20
|
---
|
|
21
21
|
|
|
22
|
-
##
|
|
22
|
+
## Execution Steps
|
|
23
23
|
|
|
24
24
|
### Mode A: Automated CLI Execution
|
|
25
25
|
Run the report engine from your terminal:
|
|
26
26
|
```bash
|
|
27
|
-
# Generate visual dark-mode HTML dashboard
|
|
27
|
+
# Generate visual dark-mode HTML dashboard (defaults to report.html at project root)
|
|
28
28
|
npx torusguard report --html
|
|
29
29
|
|
|
30
30
|
# Export OASIS SARIF v2.1.0 for GitHub Code Scanning / CI
|
|
31
31
|
npx torusguard report --sarif
|
|
32
32
|
|
|
33
|
-
# Generate both HTML and SARIF
|
|
33
|
+
# Generate both HTML and SARIF in a single pass
|
|
34
34
|
npx torusguard report --html --sarif
|
|
35
35
|
|
|
36
|
-
#
|
|
37
|
-
npx torusguard report ./
|
|
36
|
+
# Custom HTML output location
|
|
37
|
+
npx torusguard report --html --out ./docs/security-audit.html
|
|
38
38
|
|
|
39
|
-
# Target a specific
|
|
40
|
-
npx torusguard report --
|
|
39
|
+
# Target a specific subproject / monorepo package
|
|
40
|
+
npx torusguard report --target ./apps/api --html
|
|
41
41
|
```
|
|
42
|
+
|
|
42
43
|
**Under the Hood:**
|
|
43
|
-
- Invokes `python .torusguard/scripts/html_reporter.py` to compile self-contained, offline-ready HTML reports with dynamic filtering, posture gauge, and
|
|
44
|
-
- Invokes `python .torusguard/scripts/sarif_exporter.py` to produce OASIS SARIF v2.1.0 logs at `.torusguard/runs
|
|
44
|
+
- Invokes `python .torusguard/scripts/html_reporter.py` to compile self-contained, offline-ready HTML reports with dynamic filtering, posture gauge, directory attack surface heatmap, and golden recipe explorer at `report.html` (workspace root) and mirrors to `.torusguard/runs/report-latest.html`.
|
|
45
|
+
- Invokes `python .torusguard/scripts/sarif_exporter.py` to produce OASIS SARIF v2.1.0 logs at `.torusguard/runs/results-latest.sarif`.
|
|
45
46
|
- Finalizes `manifest.json` metrics and updates historical posture scoring.
|
|
46
|
-
- Displays 75-column terminal cards.
|
|
47
|
+
- Displays standardized 75-column terminal cards adhering to visual width invariants.
|
|
47
48
|
|
|
48
49
|
### Mode B: In-Session AI Chat Agent Reporting
|
|
49
50
|
When generating security posture summaries in AI chat:
|
|
50
51
|
1. **Aggregate Run Data:** Inspect `findings.json`, `remediation.md`, and `recheck.md` from the active run.
|
|
51
|
-
2. **Calculate Posture Score:** Compute posture score ($0$–$100$) based on severity weighting (Critical: 25, High: 15, Medium: 5, Low: 2).
|
|
52
|
+
2. **Calculate Posture Score:** Compute posture score ($0$–$100$) based on severity weighting (Critical: 25, High: 15, Medium: 5, Low: 2). Clean repositories earn 100/100 across 74 defended invariants.
|
|
52
53
|
3. **Format Executive Card:** Present finding counts, closed vulnerabilities, remaining risks, and compliance posture.
|
|
53
|
-
4. **Export Artifacts:** Verify that `report.html` and `results.sarif` are serialized to disk.
|
|
54
|
+
4. **Export Artifacts:** Verify that `report.html` and `results-latest.sarif` are serialized to disk.
|
|
55
|
+
5. **Keep Living Ledger in Lockstep:** Ensure `security_report.md` reflects all findings and verified closures.
|
|
56
|
+
|
|
57
|
+
---
|
|
58
|
+
|
|
59
|
+
## Zero-CDN & Offline Guarantee
|
|
60
|
+
- Zero external `<script>` or `<link>` tags. All styles, fonts, SVG icons, and scripts are embedded directly inside `report.html`.
|
|
61
|
+
- Full offline inspection: can be opened directly via `file:///` without an active internet connection.
|
|
62
|
+
- In-browser artifact downloads (SARIF v2.1.0 and CSV) use native `URL.createObjectURL(new Blob(...))` with zero network calls.
|
|
54
63
|
|
|
55
64
|
---
|
|
56
65
|
|
|
57
|
-
## SARIF v2.1.0 Specification
|
|
66
|
+
## SARIF v2.1.0 Output Specification
|
|
58
67
|
- **Schema:** `https://docs.oasis-open.org/sarif/sarif/v2.1.0/cos02/schemas/sarif-schema-2.1.0.json`
|
|
59
|
-
- **Tool Driver:** `name: TorusGuard`, `semanticVersion: 1.3.
|
|
68
|
+
- **Tool Driver:** `name: TorusGuard`, `semanticVersion: 1.3.6`, full rules catalog in `driver.rules`.
|
|
60
69
|
- **Automation Details:** `automationDetails.id: "torusguard/static"` to avoid collisions in multi-scanner CI/CD pipelines.
|
|
61
70
|
- **Fingerprints:** `partialFingerprints.primaryLocationLineHash` with SHA-256 context hash.
|
|
62
71
|
|
|
63
72
|
---
|
|
64
73
|
|
|
65
|
-
##
|
|
74
|
+
## Safety Constraints
|
|
75
|
+
- Never display raw secrets, tokens, or credentials in terminal outputs or emitted reports.
|
|
76
|
+
- Enforce read-only state for `report` actions — never modify source code during report generation.
|
|
77
|
+
- Ensure atomic writes with fallback retry to prevent corrupt reports during concurrent browser viewing.
|
|
78
|
+
- Respect monorepo target boundaries when `--target` is specified.
|
|
79
|
+
|
|
80
|
+
---
|
|
81
|
+
|
|
82
|
+
## Output Format
|
|
66
83
|
```markdown
|
|
67
|
-
###
|
|
68
|
-
- **
|
|
69
|
-
- **
|
|
70
|
-
- **
|
|
71
|
-
- **
|
|
72
|
-
- **
|
|
84
|
+
### 🛡️ TorusGuard Security Posture Report Emitted
|
|
85
|
+
- **Posture Score:** 100 / 100 (OPTIMAL DEFENSE)
|
|
86
|
+
- **Invariants Defended:** 74 Defended · 0 Harmed (74 Rules)
|
|
87
|
+
- **HTML Dashboard:** `report.html` (View in browser)
|
|
88
|
+
- **SARIF v2.1.0 Export:** `.torusguard/runs/results-latest.sarif` (Ready for CI)
|
|
89
|
+
- **Living Ledger:** `security_report.md` (Synchronized in lockstep)
|
|
73
90
|
```
|
|
74
91
|
|
|
75
92
|
## Living Report Ground Truth
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: torusguard-status
|
|
3
3
|
description: Display current TorusGuard security posture, active configuration, rules catalog, and run history via CLI or AI Agent.
|
|
4
|
-
version: 1.3.
|
|
4
|
+
version: 1.3.6
|
|
5
5
|
workflow: .torusguard/workflows/status.md
|
|
6
6
|
tools: Read, Grep, Glob, run_command, Write
|
|
7
7
|
scripts-binding:
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: torusguard-verify
|
|
3
3
|
description: Verify finding evidence sufficiency, audit live code line matches, and calibrate 0–100 confidence scores.
|
|
4
|
-
version: 1.3.
|
|
4
|
+
version: 1.3.6
|
|
5
5
|
workflow: .torusguard/workflows/verify.md
|
|
6
6
|
tools: Read, Grep, Glob, Write, run_command
|
|
7
7
|
scripts-binding:
|
|
@@ -1,7 +1,7 @@
|
|
|
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
6
|
tools: Read, Grep, Glob, Bash, Write, run_command
|
|
7
7
|
scripts-binding:
|