torusguard 1.3.3 → 1.3.4
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/runs/report-latest.html +3 -3
- package/.torusguard/runs/run-20260910-120238-audit/bundles/bnd-tg-db-004-115-9a059e/metadata.json +15 -0
- package/.torusguard/runs/run-20260910-120238-audit/bundles/bnd-tg-db-004-115-9a059e/minimal_patch_plan.md +21 -0
- package/.torusguard/runs/run-20260910-120238-audit/bundles/bnd-tg-db-004-115-9a059e/patch.diff +9 -0
- package/.torusguard/runs/run-20260910-120238-audit/bundles/bnd-tg-db-004-119-61557c/metadata.json +15 -0
- package/.torusguard/runs/run-20260910-120238-audit/bundles/bnd-tg-db-004-119-61557c/minimal_patch_plan.md +21 -0
- package/.torusguard/runs/run-20260910-120238-audit/bundles/bnd-tg-db-004-119-61557c/patch.diff +9 -0
- package/.torusguard/runs/run-20260910-120238-audit/bundles/bnd-tg-db-004-265-996ca3/metadata.json +15 -0
- package/.torusguard/runs/run-20260910-120238-audit/bundles/bnd-tg-db-004-265-996ca3/minimal_patch_plan.md +21 -0
- package/.torusguard/runs/run-20260910-120238-audit/bundles/bnd-tg-db-004-265-996ca3/patch.diff +9 -0
- package/.torusguard/runs/run-20260910-120238-audit/bundles/bnd-tg-db-004-503-d11cf8/metadata.json +15 -0
- package/.torusguard/runs/run-20260910-120238-audit/bundles/bnd-tg-db-004-503-d11cf8/minimal_patch_plan.md +21 -0
- package/.torusguard/runs/run-20260910-120238-audit/bundles/bnd-tg-db-004-503-d11cf8/patch.diff +9 -0
- package/.torusguard/runs/run-20260910-120238-audit/bundles/bnd-tg-db-004-79-91f41f/metadata.json +15 -0
- package/.torusguard/runs/run-20260910-120238-audit/bundles/bnd-tg-db-004-79-91f41f/minimal_patch_plan.md +21 -0
- package/.torusguard/runs/run-20260910-120238-audit/bundles/bnd-tg-db-004-79-91f41f/patch.diff +9 -0
- package/.torusguard/runs/run-20260910-120238-audit/bundles/bnd-tg-input-002-107-516a40/metadata.json +15 -0
- package/.torusguard/runs/run-20260910-120238-audit/bundles/bnd-tg-input-002-107-516a40/minimal_patch_plan.md +21 -0
- package/.torusguard/runs/run-20260910-120238-audit/bundles/bnd-tg-input-002-107-516a40/patch.diff +9 -0
- package/.torusguard/runs/run-20260910-120238-audit/bundles/bnd-tg-input-002-128-7809a1/metadata.json +15 -0
- package/.torusguard/runs/run-20260910-120238-audit/bundles/bnd-tg-input-002-128-7809a1/minimal_patch_plan.md +21 -0
- package/.torusguard/runs/run-20260910-120238-audit/bundles/bnd-tg-input-002-128-7809a1/patch.diff +9 -0
- package/.torusguard/runs/run-20260910-120238-audit/bundles/bnd-tg-input-002-256-c8a22e/metadata.json +15 -0
- package/.torusguard/runs/run-20260910-120238-audit/bundles/bnd-tg-input-002-256-c8a22e/minimal_patch_plan.md +21 -0
- package/.torusguard/runs/run-20260910-120238-audit/bundles/bnd-tg-input-002-256-c8a22e/patch.diff +9 -0
- package/.torusguard/runs/run-20260910-120238-audit/bundles/bnd-tg-input-003-53-d167b4/metadata.json +15 -0
- package/.torusguard/runs/run-20260910-120238-audit/bundles/bnd-tg-input-003-53-d167b4/minimal_patch_plan.md +21 -0
- package/.torusguard/runs/run-20260910-120238-audit/bundles/bnd-tg-input-003-53-d167b4/patch.diff +9 -0
- package/.torusguard/runs/run-20260910-120238-audit/bundles/bnd-tg-platform-001-183-47fd5e/metadata.json +15 -0
- package/.torusguard/runs/run-20260910-120238-audit/bundles/bnd-tg-platform-001-183-47fd5e/minimal_patch_plan.md +21 -0
- package/.torusguard/runs/run-20260910-120238-audit/bundles/bnd-tg-platform-001-183-47fd5e/patch.diff +9 -0
- package/.torusguard/runs/run-20260910-120238-audit/bundles/bnd-tg-sec-001-209-4f6424/metadata.json +15 -0
- package/.torusguard/runs/run-20260910-120238-audit/bundles/bnd-tg-sec-001-209-4f6424/minimal_patch_plan.md +21 -0
- package/.torusguard/runs/run-20260910-120238-audit/bundles/bnd-tg-sec-001-209-4f6424/patch.diff +9 -0
- package/.torusguard/runs/run-20260910-120238-audit/bundles/bnd-tg-sec-001-257-89bf34/metadata.json +15 -0
- package/.torusguard/runs/run-20260910-120238-audit/bundles/bnd-tg-sec-001-257-89bf34/minimal_patch_plan.md +21 -0
- package/.torusguard/runs/run-20260910-120238-audit/bundles/bnd-tg-sec-001-257-89bf34/patch.diff +9 -0
- package/.torusguard/runs/run-20260910-120238-audit/bundles/bnd-tg-sec-001-341-ce228c/metadata.json +15 -0
- package/.torusguard/runs/run-20260910-120238-audit/bundles/bnd-tg-sec-001-341-ce228c/minimal_patch_plan.md +21 -0
- package/.torusguard/runs/run-20260910-120238-audit/bundles/bnd-tg-sec-001-341-ce228c/patch.diff +9 -0
- package/.torusguard/runs/run-20260910-120238-audit/bundles/bnd-tg-sec-001-355-7b190b/metadata.json +15 -0
- package/.torusguard/runs/run-20260910-120238-audit/bundles/bnd-tg-sec-001-355-7b190b/minimal_patch_plan.md +21 -0
- package/.torusguard/runs/run-20260910-120238-audit/bundles/bnd-tg-sec-001-355-7b190b/patch.diff +9 -0
- package/.torusguard/runs/run-20260910-120238-audit/bundles/bnd-tg-sec-001-64-5af31a/metadata.json +15 -0
- package/.torusguard/runs/run-20260910-120238-audit/bundles/bnd-tg-sec-001-64-5af31a/minimal_patch_plan.md +21 -0
- package/.torusguard/runs/run-20260910-120238-audit/bundles/bnd-tg-sec-001-64-5af31a/patch.diff +9 -0
- package/.torusguard/runs/run-20260910-120238-audit/bundles/bnd-tg-sec-001-9-f51467/metadata.json +15 -0
- package/.torusguard/runs/run-20260910-120238-audit/bundles/bnd-tg-sec-001-9-f51467/minimal_patch_plan.md +21 -0
- package/.torusguard/runs/run-20260910-120238-audit/bundles/bnd-tg-sec-001-9-f51467/patch.diff +9 -0
- package/.torusguard/runs/run-20260910-120238-audit/findings.json +1520 -0
- package/.torusguard/runs/run-20260910-120238-audit/findings.md +560 -0
- package/.torusguard/runs/run-20260910-120238-audit/manifest.json +13 -0
- package/.torusguard/runs/run-20260910-120238-audit/recheck.md +86 -0
- package/.torusguard/runs/run-20260910-120238-audit/remediation.md +262 -0
- package/.torusguard/runs/run-20260910-120238-audit/summary.md +5 -0
- package/.torusguard/runs/run-20260910-121238-audit/findings.json +794 -0
- package/.torusguard/runs/run-20260910-121238-audit/findings.md +344 -0
- package/.torusguard/runs/run-20260910-121238-audit/manifest.json +12 -0
- package/.torusguard/runs/run-20260910-121238-audit/summary.md +5 -0
- package/.torusguard/runs/run-20260910-130454-audit/findings.json +893 -0
- package/.torusguard/runs/run-20260910-130454-audit/findings.md +386 -0
- package/.torusguard/runs/run-20260910-130454-audit/manifest.json +12 -0
- package/.torusguard/runs/run-20260910-130454-audit/summary.md +5 -0
- package/.torusguard/runs/run-20260910-130519-audit/findings.json +563 -0
- package/.torusguard/runs/run-20260910-130519-audit/findings.md +246 -0
- package/.torusguard/runs/run-20260910-130519-audit/manifest.json +12 -0
- package/.torusguard/runs/run-20260910-130519-audit/summary.md +5 -0
- package/.torusguard/scripts/__pycache__/audit_runner.cpython-311.pyc +0 -0
- package/.torusguard/scripts/__pycache__/diff_guard.cpython-311.pyc +0 -0
- package/.torusguard/scripts/__pycache__/html_reporter.cpython-311.pyc +0 -0
- package/.torusguard/scripts/__pycache__/rules_sync.cpython-311.pyc +0 -0
- package/.torusguard/scripts/__pycache__/stack_detect.cpython-311.pyc +0 -0
- package/.torusguard/scripts/__pycache__/term_ui.cpython-311.pyc +0 -0
- package/.torusguard/scripts/apply_runner.py +138 -100
- package/.torusguard/scripts/audit_runner.py +219 -116
- package/.torusguard/scripts/harden_runner.py +144 -64
- package/.torusguard/scripts/recheck_runner.py +80 -63
- package/.torusguard/scripts/recipes_runner.py +38 -31
- package/.torusguard/scripts/term_ui.py +162 -0
- package/.torusguard/skills/torusguard/SKILL.md +61 -31
- package/.torusguard/skills/torusguard-apply/SKILL.md +80 -46
- package/.torusguard/skills/torusguard-audit/SKILL.md +83 -70
- package/.torusguard/skills/torusguard-authorize/SKILL.md +5 -4
- package/.torusguard/skills/torusguard-exploit-check/SKILL.md +6 -5
- package/.torusguard/skills/torusguard-full/SKILL.md +1 -1
- package/.torusguard/skills/torusguard-harden/SKILL.md +94 -63
- package/.torusguard/skills/torusguard-init/SKILL.md +64 -52
- package/.torusguard/skills/torusguard-recheck/SKILL.md +77 -53
- package/.torusguard/skills/torusguard-report/SKILL.md +72 -54
- package/.torusguard/skills/torusguard-status/SKILL.md +58 -42
- package/.torusguard/skills/torusguard-verify/SKILL.md +8 -7
- package/.torusguard/skills/torusguard-web-validate/SKILL.md +8 -7
- package/README.md +4 -3
- package/bin/torusguard.js +544 -437
- package/package.json +1 -1
- package/skills/torusguard/SKILL.md +61 -31
- package/skills/torusguard/payload/scripts/apply_runner.py +138 -100
- package/skills/torusguard/payload/scripts/audit_runner.py +219 -116
- package/skills/torusguard/payload/scripts/harden_runner.py +144 -64
- package/skills/torusguard/payload/scripts/recheck_runner.py +80 -63
- package/skills/torusguard/payload/scripts/recipes_runner.py +38 -31
- package/skills/torusguard/payload/scripts/term_ui.py +162 -0
- package/skills/torusguard/payload/skills/torusguard/SKILL.md +61 -31
- package/skills/torusguard/payload/skills/torusguard-apply/SKILL.md +80 -46
- package/skills/torusguard/payload/skills/torusguard-audit/SKILL.md +83 -70
- package/skills/torusguard/payload/skills/torusguard-authorize/SKILL.md +5 -4
- package/skills/torusguard/payload/skills/torusguard-exploit-check/SKILL.md +6 -5
- package/skills/torusguard/payload/skills/torusguard-full/SKILL.md +1 -1
- package/skills/torusguard/payload/skills/torusguard-harden/SKILL.md +94 -63
- package/skills/torusguard/payload/skills/torusguard-init/SKILL.md +64 -52
- package/skills/torusguard/payload/skills/torusguard-recheck/SKILL.md +77 -53
- package/skills/torusguard/payload/skills/torusguard-report/SKILL.md +72 -54
- package/skills/torusguard/payload/skills/torusguard-status/SKILL.md +58 -42
- package/skills/torusguard/payload/skills/torusguard-verify/SKILL.md +8 -7
- package/skills/torusguard/payload/skills/torusguard-web-validate/SKILL.md +8 -7
- package/skills/torusguard-apply/SKILL.md +80 -48
- package/skills/torusguard-audit/SKILL.md +83 -75
- 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 +94 -67
- package/skills/torusguard-init/SKILL.md +64 -53
- package/skills/torusguard-recheck/SKILL.md +77 -54
- package/skills/torusguard-report/SKILL.md +72 -55
- package/skills/torusguard-status/SKILL.md +58 -43
- package/skills/torusguard-verify/SKILL.md +1 -1
- package/skills/torusguard-web-validate/SKILL.md +1 -1
|
@@ -0,0 +1,386 @@
|
|
|
1
|
+
# TorusGuard Security Audit Findings: run-20260910-130454-audit
|
|
2
|
+
- Target Root: `C:\Users\Admin\Desktop\TorusGuard`
|
|
3
|
+
- Total Scored Findings: `27`
|
|
4
|
+
- Identified Clusters: `5`
|
|
5
|
+
- Generated At: `2026-09-10 13:04:54 IST`
|
|
6
|
+
|
|
7
|
+
---
|
|
8
|
+
## Summary of Findings
|
|
9
|
+
|
|
10
|
+
### [Critical] TG-SEC-001 - Hardcoded Secret or API Key in Tracked Source
|
|
11
|
+
- **Finding ID:** `TG-SEC-001-bb5e4b77`
|
|
12
|
+
- **Location:** `examples/vulnerable-react-express/server/index.js:9`
|
|
13
|
+
- **Confidence Score:** `80/100` (High Confidence)
|
|
14
|
+
- **Cluster:** `cluster-credentials-exposure`
|
|
15
|
+
- **Description:** Hardcoded JWT signing secret
|
|
16
|
+
```
|
|
17
|
+
|
|
18
|
+
// TG-SEC-001: Hardcoded JWT secret
|
|
19
|
+
const JWT_SECRET = 'FAKE_DEMO_JWT_SECRET_NOT_FOR_PRODUCTION';
|
|
20
|
+
|
|
21
|
+
// TG-PLATFORM-001: Wildcard CORS with credentials
|
|
22
|
+
```
|
|
23
|
+
|
|
24
|
+
### [Critical] TG-SEC-001 - Hardcoded Secret or API Key in Tracked Source
|
|
25
|
+
- **Finding ID:** `TG-SEC-001-c393d596`
|
|
26
|
+
- **Location:** `examples/vulnerable-react-express/server/index.js:18`
|
|
27
|
+
- **Confidence Score:** `80/100` (High Confidence)
|
|
28
|
+
- **Cluster:** `cluster-credentials-exposure`
|
|
29
|
+
- **Description:** Hardcoded credential or API secret string
|
|
30
|
+
```
|
|
31
|
+
|
|
32
|
+
const users = [
|
|
33
|
+
{ id: '1', email: 'alice@demo.local', password: 'password123', name: 'Alice' },
|
|
34
|
+
{ id: '2', email: 'bob@demo.local', password: 'secret456', name: 'Bob' },
|
|
35
|
+
];
|
|
36
|
+
```
|
|
37
|
+
|
|
38
|
+
### [Critical] TG-DB-002 - Privileged Database Secret or Master Role Key in Client Code
|
|
39
|
+
- **Finding ID:** `TG-DB-002-d9bd69df`
|
|
40
|
+
- **Location:** `demo/playground/vulnerable_nextjs/actions.ts:9`
|
|
41
|
+
- **Confidence Score:** `70/100` (High Confidence)
|
|
42
|
+
- **Cluster:** `cluster-client-leak`
|
|
43
|
+
- **Description:** Service role key or raw database connection string reference in frontend code
|
|
44
|
+
```
|
|
45
|
+
|
|
46
|
+
// Finding 1: TG-CLIENT-001 - Backend admin key exposed in client-accessible code
|
|
47
|
+
export const SUPABASE_SERVICE_ROLE_KEY = "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.demo_secret_token_1234567890";
|
|
48
|
+
|
|
49
|
+
interface UserRecord {
|
|
50
|
+
```
|
|
51
|
+
|
|
52
|
+
### [Critical] TG-DB-002 - Privileged Database Secret or Master Role Key in Client Code
|
|
53
|
+
- **Finding ID:** `TG-DB-002-d5bb277d`
|
|
54
|
+
- **Location:** `skills/torusguard/payload/scripts/audit_runner.py:209`
|
|
55
|
+
- **Confidence Score:** `70/100` (High Confidence)
|
|
56
|
+
- **Cluster:** `cluster-client-leak`
|
|
57
|
+
- **Description:** Service role key or raw database connection string reference in frontend code
|
|
58
|
+
```
|
|
59
|
+
"cluster": "cluster-client-leak",
|
|
60
|
+
"patterns": [
|
|
61
|
+
(re.compile(r'\b(?:SUPABASE_SERVICE_ROLE_KEY|DATABASE_URL)\b'), "Service role key or raw database connection string reference in frontend code")
|
|
62
|
+
]
|
|
63
|
+
},
|
|
64
|
+
```
|
|
65
|
+
|
|
66
|
+
### [Critical] TG-DIFF-001 - Disabled TLS / SSL Certificate Validation
|
|
67
|
+
- **Finding ID:** `TG-DIFF-001-c87ad73a`
|
|
68
|
+
- **Location:** `skills/torusguard/payload/scripts/audit_runner.py:284`
|
|
69
|
+
- **Confidence Score:** `70/100` (High Confidence)
|
|
70
|
+
- **Cluster:** `cluster-transport-security`
|
|
71
|
+
- **Description:** Disabled TLS certificate verification (verify=False)
|
|
72
|
+
```
|
|
73
|
+
"cluster": "cluster-transport-security",
|
|
74
|
+
"patterns": [
|
|
75
|
+
(re.compile(r'\bverify\s*=\s*False\b'), "Disabled TLS certificate verification (verify=False)"),
|
|
76
|
+
(re.compile(r'\bInsecureSkipVerify\s*:\s*true\b'), "Disabled Go TLS certificate verification (InsecureSkipVerify: true)"),
|
|
77
|
+
(re.compile(r'\bNODE_TLS_REJECT_UNAUTHORIZED\s*=\s*[\'"]?0[\'"]?'), "Disabled Node.js TLS verification (NODE_TLS_REJECT_UNAUTHORIZED=0)"),
|
|
78
|
+
```
|
|
79
|
+
|
|
80
|
+
### [Critical] TG-DIFF-001 - Disabled TLS / SSL Certificate Validation
|
|
81
|
+
- **Finding ID:** `TG-DIFF-001-3c58bc29`
|
|
82
|
+
- **Location:** `skills/torusguard/payload/scripts/audit_runner.py:285`
|
|
83
|
+
- **Confidence Score:** `70/100` (High Confidence)
|
|
84
|
+
- **Cluster:** `cluster-transport-security`
|
|
85
|
+
- **Description:** Disabled Go TLS certificate verification (InsecureSkipVerify: true)
|
|
86
|
+
```
|
|
87
|
+
"patterns": [
|
|
88
|
+
(re.compile(r'\bverify\s*=\s*False\b'), "Disabled TLS certificate verification (verify=False)"),
|
|
89
|
+
(re.compile(r'\bInsecureSkipVerify\s*:\s*true\b'), "Disabled Go TLS certificate verification (InsecureSkipVerify: true)"),
|
|
90
|
+
(re.compile(r'\bNODE_TLS_REJECT_UNAUTHORIZED\s*=\s*[\'"]?0[\'"]?'), "Disabled Node.js TLS verification (NODE_TLS_REJECT_UNAUTHORIZED=0)"),
|
|
91
|
+
(re.compile(r'\brejectUnauthorized\s*:\s*false\b'), "Disabled Node.js TLS rejectUnauthorized"),
|
|
92
|
+
```
|
|
93
|
+
|
|
94
|
+
### [Critical] TG-DIFF-001 - Disabled TLS / SSL Certificate Validation
|
|
95
|
+
- **Finding ID:** `TG-DIFF-001-8ed55f94`
|
|
96
|
+
- **Location:** `skills/torusguard/payload/scripts/audit_runner.py:286`
|
|
97
|
+
- **Confidence Score:** `70/100` (High Confidence)
|
|
98
|
+
- **Cluster:** `cluster-transport-security`
|
|
99
|
+
- **Description:** Disabled Node.js TLS verification (NODE_TLS_REJECT_UNAUTHORIZED=0)
|
|
100
|
+
```
|
|
101
|
+
(re.compile(r'\bverify\s*=\s*False\b'), "Disabled TLS certificate verification (verify=False)"),
|
|
102
|
+
(re.compile(r'\bInsecureSkipVerify\s*:\s*true\b'), "Disabled Go TLS certificate verification (InsecureSkipVerify: true)"),
|
|
103
|
+
(re.compile(r'\bNODE_TLS_REJECT_UNAUTHORIZED\s*=\s*[\'"]?0[\'"]?'), "Disabled Node.js TLS verification (NODE_TLS_REJECT_UNAUTHORIZED=0)"),
|
|
104
|
+
(re.compile(r'\brejectUnauthorized\s*:\s*false\b'), "Disabled Node.js TLS rejectUnauthorized"),
|
|
105
|
+
(re.compile(r'\bCURLOPT_SSL_VERIFYPEER\s*(?:=>|,)\s*(?:false|0)\b', re.IGNORECASE), "Disabled PHP curl SSL verification")
|
|
106
|
+
```
|
|
107
|
+
|
|
108
|
+
### [Critical] TG-DIFF-001 - Disabled TLS / SSL Certificate Validation
|
|
109
|
+
- **Finding ID:** `TG-DIFF-001-5447a47c`
|
|
110
|
+
- **Location:** `skills/torusguard/payload/scripts/diff_guard.py:20`
|
|
111
|
+
- **Confidence Score:** `70/100` (High Confidence)
|
|
112
|
+
- **Cluster:** `cluster-transport-security`
|
|
113
|
+
- **Description:** Disabled TLS certificate verification (verify=False)
|
|
114
|
+
```
|
|
115
|
+
(re.compile(r'(?:#|//|/\*)\s*(?:TODO\s*:?\s*)?(?:bypass|skip|disable)[_\s]*(?:auth|security|check|guard|filter|csrf|tenant)', re.IGNORECASE), "Suspicious authentication or security check bypass comment"),
|
|
116
|
+
# TLS / Certificate validation bypasses across Python, Go, Node, Java, C#, PHP, Rust
|
|
117
|
+
(re.compile(r'\bverify\s*=\s*False\b'), "Disabled TLS certificate verification (verify=False)"),
|
|
118
|
+
(re.compile(r'\bInsecureSkipVerify\s*:\s*true\b'), "Disabled Go TLS certificate verification (InsecureSkipVerify: true)"),
|
|
119
|
+
(re.compile(r'\bNODE_TLS_REJECT_UNAUTHORIZED\s*=\s*[\'"]?0[\'"]?'), "Disabled Node.js TLS verification (NODE_TLS_REJECT_UNAUTHORIZED=0)"),
|
|
120
|
+
```
|
|
121
|
+
|
|
122
|
+
### [Critical] TG-DIFF-001 - Disabled TLS / SSL Certificate Validation
|
|
123
|
+
- **Finding ID:** `TG-DIFF-001-7afc81ff`
|
|
124
|
+
- **Location:** `skills/torusguard/payload/scripts/diff_guard.py:21`
|
|
125
|
+
- **Confidence Score:** `70/100` (High Confidence)
|
|
126
|
+
- **Cluster:** `cluster-transport-security`
|
|
127
|
+
- **Description:** Disabled Go TLS certificate verification (InsecureSkipVerify: true)
|
|
128
|
+
```
|
|
129
|
+
# TLS / Certificate validation bypasses across Python, Go, Node, Java, C#, PHP, Rust
|
|
130
|
+
(re.compile(r'\bverify\s*=\s*False\b'), "Disabled TLS certificate verification (verify=False)"),
|
|
131
|
+
(re.compile(r'\bInsecureSkipVerify\s*:\s*true\b'), "Disabled Go TLS certificate verification (InsecureSkipVerify: true)"),
|
|
132
|
+
(re.compile(r'\bNODE_TLS_REJECT_UNAUTHORIZED\s*=\s*[\'"]?0[\'"]?'), "Disabled Node.js TLS verification (NODE_TLS_REJECT_UNAUTHORIZED=0)"),
|
|
133
|
+
(re.compile(r'\brejectUnauthorized\s*:\s*false\b'), "Disabled Node.js TLS rejectUnauthorized"),
|
|
134
|
+
```
|
|
135
|
+
|
|
136
|
+
### [Critical] TG-DIFF-001 - Disabled TLS / SSL Certificate Validation
|
|
137
|
+
- **Finding ID:** `TG-DIFF-001-7b466146`
|
|
138
|
+
- **Location:** `skills/torusguard/payload/scripts/diff_guard.py:22`
|
|
139
|
+
- **Confidence Score:** `70/100` (High Confidence)
|
|
140
|
+
- **Cluster:** `cluster-transport-security`
|
|
141
|
+
- **Description:** Disabled Node.js TLS verification (NODE_TLS_REJECT_UNAUTHORIZED=0)
|
|
142
|
+
```
|
|
143
|
+
(re.compile(r'\bverify\s*=\s*False\b'), "Disabled TLS certificate verification (verify=False)"),
|
|
144
|
+
(re.compile(r'\bInsecureSkipVerify\s*:\s*true\b'), "Disabled Go TLS certificate verification (InsecureSkipVerify: true)"),
|
|
145
|
+
(re.compile(r'\bNODE_TLS_REJECT_UNAUTHORIZED\s*=\s*[\'"]?0[\'"]?'), "Disabled Node.js TLS verification (NODE_TLS_REJECT_UNAUTHORIZED=0)"),
|
|
146
|
+
(re.compile(r'\brejectUnauthorized\s*:\s*false\b'), "Disabled Node.js TLS rejectUnauthorized"),
|
|
147
|
+
(re.compile(r'\b(?:TrustAllStrategy|NoopHostnameVerifier|DangerousAcceptAnyServerCertificateValidator)\b'), "Disabled Java / C# TLS certificate validation"),
|
|
148
|
+
```
|
|
149
|
+
|
|
150
|
+
### [Critical] TG-DIFF-001 - Disabled TLS / SSL Certificate Validation
|
|
151
|
+
- **Finding ID:** `TG-DIFF-001-59a123c6`
|
|
152
|
+
- **Location:** `skills/torusguard/payload/scripts/diff_guard.py:26`
|
|
153
|
+
- **Confidence Score:** `70/100` (High Confidence)
|
|
154
|
+
- **Cluster:** `cluster-transport-security`
|
|
155
|
+
- **Description:** Disabled PHP curl SSL verification
|
|
156
|
+
```
|
|
157
|
+
(re.compile(r'\b(?:TrustAllStrategy|NoopHostnameVerifier|DangerousAcceptAnyServerCertificateValidator)\b'), "Disabled Java / C# TLS certificate validation"),
|
|
158
|
+
(re.compile(r'\bServerCertificateCustomValidationCallback\s*=\s*(?:\([^)]*\)\s*=>\s*true|HttpClientHandler\.DangerousAcceptAnyServerCertificateValidator)'), "Disabled C# TLS certificate callback"),
|
|
159
|
+
(re.compile(r'\bCURLOPT_SSL_VERIFYPEER\s*(?:=>|,)\s*(?:false|0)\b', re.IGNORECASE), "Disabled PHP curl SSL verification (CURLOPT_SSL_VERIFYPEER => false)"),
|
|
160
|
+
(re.compile(r'\bdanger_accept_invalid_certs\s*\(\s*true\s*\)'), "Disabled Rust reqwest TLS certificate validation"),
|
|
161
|
+
# Auth & CSRF bypasses
|
|
162
|
+
```
|
|
163
|
+
|
|
164
|
+
### [Critical] TG-DIFF-001 - Disabled TLS / SSL Certificate Validation
|
|
165
|
+
- **Finding ID:** `TG-DIFF-001-7db54483`
|
|
166
|
+
- **Location:** `skills/torusguard/payload/scripts/rules_sync.py:180`
|
|
167
|
+
- **Confidence Score:** `70/100` (High Confidence)
|
|
168
|
+
- **Cluster:** `cluster-transport-security`
|
|
169
|
+
- **Description:** Disabled TLS certificate verification (verify=False)
|
|
170
|
+
```
|
|
171
|
+
|
|
172
|
+
if not bypass_guards:
|
|
173
|
+
bypass_rule = "4. **No Security Bypasses:** Never insert `# nosec`, `verify=False`, `@csrf_exempt`, or `bypass_auth=True`."
|
|
174
|
+
else:
|
|
175
|
+
bypass_rule = f"4. **No Security Bypasses:** Never insert `# nosec`, `verify=False`, or {', '.join(bypass_guards[:2])}."
|
|
176
|
+
```
|
|
177
|
+
|
|
178
|
+
### [Critical] TG-DIFF-001 - Disabled TLS / SSL Certificate Validation
|
|
179
|
+
- **Finding ID:** `TG-DIFF-001-77bc2f9b`
|
|
180
|
+
- **Location:** `skills/torusguard/payload/scripts/rules_sync.py:157`
|
|
181
|
+
- **Confidence Score:** `70/100` (High Confidence)
|
|
182
|
+
- **Cluster:** `cluster-transport-security`
|
|
183
|
+
- **Description:** Disabled Go TLS certificate verification (InsecureSkipVerify: true)
|
|
184
|
+
```
|
|
185
|
+
if "go" in stack_lower:
|
|
186
|
+
sql_guards.append("`db.Query(..., args)` / GORM")
|
|
187
|
+
bypass_guards.append("`InsecureSkipVerify: true`")
|
|
188
|
+
if "rust" in stack_lower:
|
|
189
|
+
sql_guards.append("`sqlx::query!` / Diesel")
|
|
190
|
+
```
|
|
191
|
+
|
|
192
|
+
### [Critical] TG-DIFF-001 - Disabled TLS / SSL Certificate Validation
|
|
193
|
+
- **Finding ID:** `TG-DIFF-001-cb5ae7e9`
|
|
194
|
+
- **Location:** `skills/torusguard/payload/scripts/rules_sync.py:172`
|
|
195
|
+
- **Confidence Score:** `70/100` (High Confidence)
|
|
196
|
+
- **Cluster:** `cluster-transport-security`
|
|
197
|
+
- **Description:** Disabled Node.js TLS rejectUnauthorized
|
|
198
|
+
```
|
|
199
|
+
if "typescript" in stack_lower or "javascript" in stack_lower or "next" in stack_lower or "express" in stack_lower:
|
|
200
|
+
sql_guards.append("Prisma / Drizzle binders")
|
|
201
|
+
bypass_guards.append("`rejectUnauthorized: false`")
|
|
202
|
+
|
|
203
|
+
if not sql_guards:
|
|
204
|
+
```
|
|
205
|
+
|
|
206
|
+
### [Critical] TG-DIFF-001 - Disabled TLS / SSL Certificate Validation
|
|
207
|
+
- **Finding ID:** `TG-DIFF-001-0e4204af`
|
|
208
|
+
- **Location:** `skills/torusguard/payload/scripts/rules_sync.py:169`
|
|
209
|
+
- **Confidence Score:** `70/100` (High Confidence)
|
|
210
|
+
- **Cluster:** `cluster-transport-security`
|
|
211
|
+
- **Description:** Disabled PHP curl SSL verification
|
|
212
|
+
```
|
|
213
|
+
if "php" in stack_lower:
|
|
214
|
+
sql_guards.append("PDO prepared statements / Eloquent")
|
|
215
|
+
bypass_guards.append("`CURLOPT_SSL_VERIFYPEER => false`")
|
|
216
|
+
if "typescript" in stack_lower or "javascript" in stack_lower or "next" in stack_lower or "express" in stack_lower:
|
|
217
|
+
sql_guards.append("Prisma / Drizzle binders")
|
|
218
|
+
```
|
|
219
|
+
|
|
220
|
+
### [Critical] TG-DIFF-001 - Disabled TLS / SSL Certificate Validation
|
|
221
|
+
- **Finding ID:** `TG-DIFF-001-671d3513`
|
|
222
|
+
- **Location:** `skills/torusguard/payload/scripts/harden_runner.py:246`
|
|
223
|
+
- **Confidence Score:** `67/100` (Medium Confidence)
|
|
224
|
+
- **Cluster:** `cluster-transport-security`
|
|
225
|
+
- **Description:** Disabled TLS certificate verification (verify=False)
|
|
226
|
+
```
|
|
227
|
+
# Strategy 8: TLS Verification Bypass (TG-DIFF-001)
|
|
228
|
+
elif rule_id == "TG-DIFF-001":
|
|
229
|
+
if "verify=False" in target_line:
|
|
230
|
+
fixed_line = target_line.replace("verify=False", "verify=True")
|
|
231
|
+
new_lines[line_number - 1] = fixed_line
|
|
232
|
+
```
|
|
233
|
+
|
|
234
|
+
### [Critical] TG-DIFF-001 - Disabled TLS / SSL Certificate Validation
|
|
235
|
+
- **Finding ID:** `TG-DIFF-001-b6549484`
|
|
236
|
+
- **Location:** `skills/torusguard/payload/scripts/harden_runner.py:256`
|
|
237
|
+
- **Confidence Score:** `67/100` (Medium Confidence)
|
|
238
|
+
- **Cluster:** `cluster-transport-security`
|
|
239
|
+
- **Description:** Disabled Go TLS certificate verification (InsecureSkipVerify: true)
|
|
240
|
+
```
|
|
241
|
+
applied_rule = True
|
|
242
|
+
fix_explanation = "Restored TLS certificate authority validation (rejectUnauthorized: true)"
|
|
243
|
+
elif "InsecureSkipVerify: true" in target_line:
|
|
244
|
+
fixed_line = target_line.replace("InsecureSkipVerify: true", "InsecureSkipVerify: false")
|
|
245
|
+
new_lines[line_number - 1] = fixed_line
|
|
246
|
+
```
|
|
247
|
+
|
|
248
|
+
### [Critical] TG-DIFF-001 - Disabled TLS / SSL Certificate Validation
|
|
249
|
+
- **Finding ID:** `TG-DIFF-001-c4cfaa8a`
|
|
250
|
+
- **Location:** `skills/torusguard/payload/scripts/harden_runner.py:251`
|
|
251
|
+
- **Confidence Score:** `67/100` (Medium Confidence)
|
|
252
|
+
- **Cluster:** `cluster-transport-security`
|
|
253
|
+
- **Description:** Disabled Node.js TLS rejectUnauthorized
|
|
254
|
+
```
|
|
255
|
+
applied_rule = True
|
|
256
|
+
fix_explanation = "Restored mandatory TLS certificate verification (verify=True)"
|
|
257
|
+
elif "rejectUnauthorized: false" in target_line:
|
|
258
|
+
fixed_line = target_line.replace("rejectUnauthorized: false", "rejectUnauthorized: true")
|
|
259
|
+
new_lines[line_number - 1] = fixed_line
|
|
260
|
+
```
|
|
261
|
+
|
|
262
|
+
### [High] TG-INPUT-003 - Unsafe Dynamic Code or HTML Execution
|
|
263
|
+
- **Finding ID:** `TG-INPUT-003-fea9421e`
|
|
264
|
+
- **Location:** `examples/vulnerable-react-express/client/src/App.jsx:53`
|
|
265
|
+
- **Confidence Score:** `80/100` (High Confidence)
|
|
266
|
+
- **Cluster:** `cluster-injection`
|
|
267
|
+
- **Description:** React dangerouslySetInnerHTML rendering raw unescaped HTML
|
|
268
|
+
```
|
|
269
|
+
|
|
270
|
+
{/* TG-INPUT-003: Unsafe HTML rendering */}
|
|
271
|
+
<div dangerouslySetInnerHTML={{ __html: bio }} />
|
|
272
|
+
|
|
273
|
+
<button onClick={fetchUser}>Fetch user (IDOR demo)</button>
|
|
274
|
+
```
|
|
275
|
+
|
|
276
|
+
### [High] TG-PLATFORM-001 - Wildcard Permissive CORS Configuration with Credentials
|
|
277
|
+
- **Finding ID:** `TG-PLATFORM-001-7dd35cb4`
|
|
278
|
+
- **Location:** `examples/vulnerable-react-express/server/index.js:12`
|
|
279
|
+
- **Confidence Score:** `80/100` (High Confidence)
|
|
280
|
+
- **Cluster:** `cluster-auth-bypass`
|
|
281
|
+
- **Description:** Wildcard CORS origin configured in Express middleware
|
|
282
|
+
```
|
|
283
|
+
|
|
284
|
+
// TG-PLATFORM-001: Wildcard CORS with credentials
|
|
285
|
+
app.use(cors({ origin: '*', credentials: true }));
|
|
286
|
+
|
|
287
|
+
// TG-PLATFORM-004: No explicit JSON body size limit
|
|
288
|
+
```
|
|
289
|
+
|
|
290
|
+
### [High] TG-INPUT-003 - Unsafe Dynamic Code or HTML Execution
|
|
291
|
+
- **Finding ID:** `TG-INPUT-003-258e642e`
|
|
292
|
+
- **Location:** `skills/torusguard/payload/scripts/audit_runner.py:232`
|
|
293
|
+
- **Confidence Score:** `80/100` (High Confidence)
|
|
294
|
+
- **Cluster:** `cluster-injection`
|
|
295
|
+
- **Description:** Direct eval() execution on untrusted input
|
|
296
|
+
```
|
|
297
|
+
"cluster": "cluster-injection",
|
|
298
|
+
"patterns": [
|
|
299
|
+
(re.compile(r'\beval\s*\('), "Direct eval() execution on untrusted input"),
|
|
300
|
+
(re.compile(r'\bexec\s*\('), "Direct exec() execution on untrusted input"),
|
|
301
|
+
(re.compile(r'\bdangerouslySetInnerHTML\s*='), "React dangerouslySetInnerHTML rendering raw unescaped HTML"),
|
|
302
|
+
```
|
|
303
|
+
|
|
304
|
+
### [High] TG-INPUT-003 - Unsafe Dynamic Code or HTML Execution
|
|
305
|
+
- **Finding ID:** `TG-INPUT-003-3e9363a4`
|
|
306
|
+
- **Location:** `skills/torusguard/payload/scripts/audit_runner.py:233`
|
|
307
|
+
- **Confidence Score:** `80/100` (High Confidence)
|
|
308
|
+
- **Cluster:** `cluster-injection`
|
|
309
|
+
- **Description:** Direct exec() execution on untrusted input
|
|
310
|
+
```
|
|
311
|
+
"patterns": [
|
|
312
|
+
(re.compile(r'\beval\s*\('), "Direct eval() execution on untrusted input"),
|
|
313
|
+
(re.compile(r'\bexec\s*\('), "Direct exec() execution on untrusted input"),
|
|
314
|
+
(re.compile(r'\bdangerouslySetInnerHTML\s*='), "React dangerouslySetInnerHTML rendering raw unescaped HTML"),
|
|
315
|
+
(re.compile(r'\.innerHTML\s*='), "Direct DOM innerHTML assignment vulnerable to XSS")
|
|
316
|
+
```
|
|
317
|
+
|
|
318
|
+
### [High] TG-PLATFORM-001 - Wildcard Permissive CORS Configuration with Credentials
|
|
319
|
+
- **Finding ID:** `TG-PLATFORM-001-1a813dde`
|
|
320
|
+
- **Location:** `skills/torusguard/payload/scripts/harden_runner.py:202`
|
|
321
|
+
- **Confidence Score:** `80/100` (High Confidence)
|
|
322
|
+
- **Cluster:** `cluster-auth-bypass`
|
|
323
|
+
- **Description:** Wildcard CORS origin enabled across entire application
|
|
324
|
+
```
|
|
325
|
+
# Strategy 5: Permissive CORS with Credentials (TG-PLATFORM-001)
|
|
326
|
+
elif rule_id == "TG-PLATFORM-001":
|
|
327
|
+
if "CORS_ALLOW_ALL_ORIGINS = True" in target_line:
|
|
328
|
+
replacement = f'{indent}CORS_ALLOWED_ORIGINS = [os.environ.get("ALLOWED_ORIGIN", "https://app.example.com")]'
|
|
329
|
+
new_lines[line_number - 1] = replacement
|
|
330
|
+
```
|
|
331
|
+
|
|
332
|
+
### [High] TG-AUTH-004 - Insecure Session Cookie or Disabled CSRF Protection
|
|
333
|
+
- **Finding ID:** `TG-AUTH-004-f60870ef`
|
|
334
|
+
- **Location:** `skills/torusguard/payload/scripts/rules_sync.py:180`
|
|
335
|
+
- **Confidence Score:** `70/100` (High Confidence)
|
|
336
|
+
- **Cluster:** `cluster-auth-bypass`
|
|
337
|
+
- **Description:** Decorator disabling route-level authentication or CSRF protection
|
|
338
|
+
```
|
|
339
|
+
|
|
340
|
+
if not bypass_guards:
|
|
341
|
+
bypass_rule = "4. **No Security Bypasses:** Never insert `# nosec`, `verify=False`, `@csrf_exempt`, or `bypass_auth=True`."
|
|
342
|
+
else:
|
|
343
|
+
bypass_rule = f"4. **No Security Bypasses:** Never insert `# nosec`, `verify=False`, or {', '.join(bypass_guards[:2])}."
|
|
344
|
+
```
|
|
345
|
+
|
|
346
|
+
### [High] TG-AUTH-004 - Insecure Session Cookie or Disabled CSRF Protection
|
|
347
|
+
- **Finding ID:** `TG-AUTH-004-6b0c7ebf`
|
|
348
|
+
- **Location:** `skills/torusguard/payload/scripts/rules_sync.py:166`
|
|
349
|
+
- **Confidence Score:** `70/100` (High Confidence)
|
|
350
|
+
- **Cluster:** `cluster-auth-bypass`
|
|
351
|
+
- **Description:** Attribute disabling ASP.NET authentication
|
|
352
|
+
```
|
|
353
|
+
if "c#" in stack_lower or "dotnet" in stack_lower:
|
|
354
|
+
sql_guards.append("EF Core LINQ / `FromSqlInterpolated`")
|
|
355
|
+
bypass_guards.append("`[AllowAnonymous]`")
|
|
356
|
+
if "php" in stack_lower:
|
|
357
|
+
sql_guards.append("PDO prepared statements / Eloquent")
|
|
358
|
+
```
|
|
359
|
+
|
|
360
|
+
### [Medium] TG-SEC-004 - Sensitive Credential or Token Logging
|
|
361
|
+
- **Finding ID:** `TG-SEC-004-dbbc17f7`
|
|
362
|
+
- **Location:** `examples/vulnerable-react-express/client/src/App.jsx:30`
|
|
363
|
+
- **Confidence Score:** `70/100` (High Confidence)
|
|
364
|
+
- **Cluster:** `cluster-credentials-exposure`
|
|
365
|
+
- **Description:** Plaintext credential or token logged to standard output
|
|
366
|
+
```
|
|
367
|
+
const data = await res.json();
|
|
368
|
+
// TG-CLIENT-002: Sensitive console logging
|
|
369
|
+
console.log('Login token:', data.token, 'config:', clientConfig);
|
|
370
|
+
setMessage(JSON.stringify(data));
|
|
371
|
+
}
|
|
372
|
+
```
|
|
373
|
+
|
|
374
|
+
### [Medium] TG-SEC-004 - Sensitive Credential or Token Logging
|
|
375
|
+
- **Finding ID:** `TG-SEC-004-08753da5`
|
|
376
|
+
- **Location:** `examples/vulnerable-react-express/server/index.js:28`
|
|
377
|
+
- **Confidence Score:** `70/100` (High Confidence)
|
|
378
|
+
- **Cluster:** `cluster-credentials-exposure`
|
|
379
|
+
- **Description:** Plaintext credential or token logged to standard output
|
|
380
|
+
```
|
|
381
|
+
app.post('/api/login', (req, res) => {
|
|
382
|
+
const { email, password } = req.body;
|
|
383
|
+
console.log('Login attempt:', { email, password }); // TG-SEC-004
|
|
384
|
+
const user = users.find((u) => u.email === email && u.password === password);
|
|
385
|
+
if (!user) return res.status(401).json({ error: 'User not found' }); // enumeration
|
|
386
|
+
```
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
{
|
|
2
|
+
"run_id": "run-20260910-130454-audit",
|
|
3
|
+
"command": "audit",
|
|
4
|
+
"target_name": "TorusGuard",
|
|
5
|
+
"created_at": "2026-09-10 13:04:54 IST",
|
|
6
|
+
"created_at_iso": "2026-09-10T13:04:54.196373+05:30",
|
|
7
|
+
"status": "completed",
|
|
8
|
+
"torusguard_version": "1.3.0",
|
|
9
|
+
"findings_count": 27,
|
|
10
|
+
"confirmed_fixed_count": 0,
|
|
11
|
+
"regressed_count": 0
|
|
12
|
+
}
|