@hoanghainh/komagu 2.0.0 → 2.1.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/CHANGELOG.md +20 -0
- package/README.md +1 -1
- package/assess/lsa/examples/eval-run-4/ground-truth.json +823 -0
- package/assess/lsa/examples/eval-run-4/iter0-gptoss-a/ai-run-stats.json +58 -0
- package/assess/lsa/examples/eval-run-4/iter0-gptoss-a/coverage.json +85 -0
- package/assess/lsa/examples/eval-run-4/iter0-gptoss-a/findings/priv-privilege-001.json +822 -0
- package/assess/lsa/examples/eval-run-4/iter0-gptoss-a/findings/priv-privilege-002.json +393 -0
- package/assess/lsa/examples/eval-run-4/iter0-gptoss-a/findings.json +4477 -0
- package/assess/lsa/examples/eval-run-4/iter0-gptoss-a/mass-assignment.candidates.json +232 -0
- package/assess/lsa/examples/eval-run-4/iter0-gptoss-a/routes/routes-001.json +425 -0
- package/assess/lsa/examples/eval-run-4/iter0-gptoss-a/routes/routes-002.json +333 -0
- package/assess/lsa/examples/eval-run-4/iter0-gptoss-a/routes/routes-003.json +400 -0
- package/assess/lsa/examples/eval-run-4/iter0-gptoss-a/routes/routes-004.json +403 -0
- package/assess/lsa/examples/eval-run-4/iter0-gptoss-a/routes/routes-005.json +398 -0
- package/assess/lsa/examples/eval-run-4/iter0-gptoss-a/routes/routes-006.json +63 -0
- package/assess/lsa/examples/eval-run-4/iter0-gptoss-a/score.json +120 -0
- package/assess/lsa/examples/eval-run-4/iter1-gptoss-a/ai-run-stats.json +55 -0
- package/assess/lsa/examples/eval-run-4/iter1-gptoss-a/coverage.json +50 -0
- package/assess/lsa/examples/eval-run-4/iter1-gptoss-a/findings/priv-privilege-001.json +613 -0
- package/assess/lsa/examples/eval-run-4/iter1-gptoss-a/findings/priv-privilege-002.json +287 -0
- package/assess/lsa/examples/eval-run-4/iter1-gptoss-a/findings.json +4870 -0
- package/assess/lsa/examples/eval-run-4/iter1-gptoss-a/mass-assignment.candidates.json +232 -0
- package/assess/lsa/examples/eval-run-4/iter1-gptoss-a/routes/routes-001.json +425 -0
- package/assess/lsa/examples/eval-run-4/iter1-gptoss-a/routes/routes-002.json +333 -0
- package/assess/lsa/examples/eval-run-4/iter1-gptoss-a/routes/routes-003.json +400 -0
- package/assess/lsa/examples/eval-run-4/iter1-gptoss-a/routes/routes-004.json +403 -0
- package/assess/lsa/examples/eval-run-4/iter1-gptoss-a/routes/routes-005.json +398 -0
- package/assess/lsa/examples/eval-run-4/iter1-gptoss-a/routes/routes-006.json +63 -0
- package/assess/lsa/examples/eval-run-4/iter1-gptoss-a/score.json +107 -0
- package/assess/lsa/examples/eval-run-4/iter1-gptoss-b/ai-run-stats.json +58 -0
- package/assess/lsa/examples/eval-run-4/iter1-gptoss-b/coverage.json +92 -0
- package/assess/lsa/examples/eval-run-4/iter1-gptoss-b/findings/priv-privilege-001.json +645 -0
- package/assess/lsa/examples/eval-run-4/iter1-gptoss-b/findings/priv-privilege-002.json +222 -0
- package/assess/lsa/examples/eval-run-4/iter1-gptoss-b/findings.json +4859 -0
- package/assess/lsa/examples/eval-run-4/iter1-gptoss-b/mass-assignment.candidates.json +232 -0
- package/assess/lsa/examples/eval-run-4/iter1-gptoss-b/routes/routes-001.json +425 -0
- package/assess/lsa/examples/eval-run-4/iter1-gptoss-b/routes/routes-002.json +333 -0
- package/assess/lsa/examples/eval-run-4/iter1-gptoss-b/routes/routes-003.json +400 -0
- package/assess/lsa/examples/eval-run-4/iter1-gptoss-b/routes/routes-004.json +403 -0
- package/assess/lsa/examples/eval-run-4/iter1-gptoss-b/routes/routes-005.json +398 -0
- package/assess/lsa/examples/eval-run-4/iter1-gptoss-b/routes/routes-006.json +63 -0
- package/assess/lsa/examples/eval-run-4/iter1-gptoss-b/score.json +121 -0
- package/assess/lsa/examples/eval-run-4/iter1-qwen-a-incomplete/coverage.json +111 -0
- package/assess/lsa/examples/eval-run-4/iter1-qwen-a-incomplete/findings/priv-privilege-001.json +6 -0
- package/assess/lsa/examples/eval-run-4/iter1-qwen-a-incomplete/findings/priv-privilege-002.json +344 -0
- package/assess/lsa/examples/eval-run-4/iter1-qwen-a-incomplete/findings.json +3544 -0
- package/assess/lsa/examples/eval-run-4/iter1-qwen-a-incomplete/mass-assignment.candidates.json +232 -0
- package/assess/lsa/examples/eval-run-4/iter1-qwen-a-incomplete/routes/routes-001.json +425 -0
- package/assess/lsa/examples/eval-run-4/iter1-qwen-a-incomplete/routes/routes-002.json +333 -0
- package/assess/lsa/examples/eval-run-4/iter1-qwen-a-incomplete/routes/routes-003.json +400 -0
- package/assess/lsa/examples/eval-run-4/iter1-qwen-a-incomplete/routes/routes-004.json +403 -0
- package/assess/lsa/examples/eval-run-4/iter1-qwen-a-incomplete/routes/routes-005.json +398 -0
- package/assess/lsa/examples/eval-run-4/iter1-qwen-a-incomplete/routes/routes-006.json +63 -0
- package/assess/lsa/examples/eval-run-4/iter1-qwen-a-incomplete/score.json +123 -0
- package/assess/lsa/examples/eval-run-4/iter2-gptoss-a/ai-run-stats.json +50 -0
- package/assess/lsa/examples/eval-run-4/iter2-gptoss-a/coverage.json +42 -0
- package/assess/lsa/examples/eval-run-4/iter2-gptoss-a/findings/priv-privilege-001.json +540 -0
- package/assess/lsa/examples/eval-run-4/iter2-gptoss-a/findings/priv-privilege-002.json +238 -0
- package/assess/lsa/examples/eval-run-4/iter2-gptoss-a/findings.json +4383 -0
- package/assess/lsa/examples/eval-run-4/iter2-gptoss-a/findings.sarif +8729 -0
- package/assess/lsa/examples/eval-run-4/iter2-gptoss-a/mass-assignment.candidates.json +232 -0
- package/assess/lsa/examples/eval-run-4/iter2-gptoss-a/report.ja.md +1911 -0
- package/assess/lsa/examples/eval-run-4/iter2-gptoss-a/report.md +1911 -0
- package/assess/lsa/examples/eval-run-4/iter2-gptoss-a/routes/routes-001.json +425 -0
- package/assess/lsa/examples/eval-run-4/iter2-gptoss-a/routes/routes-002.json +333 -0
- package/assess/lsa/examples/eval-run-4/iter2-gptoss-a/routes/routes-003.json +400 -0
- package/assess/lsa/examples/eval-run-4/iter2-gptoss-a/routes/routes-004.json +403 -0
- package/assess/lsa/examples/eval-run-4/iter2-gptoss-a/routes/routes-005.json +398 -0
- package/assess/lsa/examples/eval-run-4/iter2-gptoss-a/routes/routes-006.json +63 -0
- package/assess/lsa/examples/eval-run-4/iter2-gptoss-a/score.json +101 -0
- package/assess/lsa/examples/eval-run-4/iter2-gptoss-a/stack-profile.json +226 -0
- package/assess/lsa/examples/eval-run-4/iter2-gptoss-b/ai-run-stats.json +54 -0
- package/assess/lsa/examples/eval-run-4/iter2-gptoss-b/coverage.json +66 -0
- package/assess/lsa/examples/eval-run-4/iter2-gptoss-b/findings/priv-privilege-001.json +440 -0
- package/assess/lsa/examples/eval-run-4/iter2-gptoss-b/findings/priv-privilege-002.json +229 -0
- package/assess/lsa/examples/eval-run-4/iter2-gptoss-b/findings.json +3424 -0
- package/assess/lsa/examples/eval-run-4/iter2-gptoss-b/mass-assignment.candidates.json +232 -0
- package/assess/lsa/examples/eval-run-4/iter2-gptoss-b/routes/routes-001.json +425 -0
- package/assess/lsa/examples/eval-run-4/iter2-gptoss-b/routes/routes-002.json +333 -0
- package/assess/lsa/examples/eval-run-4/iter2-gptoss-b/routes/routes-003.json +400 -0
- package/assess/lsa/examples/eval-run-4/iter2-gptoss-b/routes/routes-004.json +403 -0
- package/assess/lsa/examples/eval-run-4/iter2-gptoss-b/routes/routes-005.json +398 -0
- package/assess/lsa/examples/eval-run-4/iter2-gptoss-b/routes/routes-006.json +63 -0
- package/assess/lsa/examples/eval-run-4/iter2-gptoss-b/score.json +120 -0
- package/assess/lsa/examples/eval-run-5/gptoss-a/ai-run-stats.json +88 -0
- package/assess/lsa/examples/eval-run-5/gptoss-a/coverage.json +36 -0
- package/assess/lsa/examples/eval-run-5/gptoss-a/findings/priv-privilege-001.json +530 -0
- package/assess/lsa/examples/eval-run-5/gptoss-a/findings/priv-privilege-002.json +248 -0
- package/assess/lsa/examples/eval-run-5/gptoss-a/findings.json +4766 -0
- package/assess/lsa/examples/eval-run-5/gptoss-a/findings.sarif +9326 -0
- package/assess/lsa/examples/eval-run-5/gptoss-a/mass-assignment.candidates.json +232 -0
- package/assess/lsa/examples/eval-run-5/gptoss-a/report.ja.md +2011 -0
- package/assess/lsa/examples/eval-run-5/gptoss-a/report.md +2011 -0
- package/assess/lsa/examples/eval-run-5/gptoss-a/routes/routes-001.json +425 -0
- package/assess/lsa/examples/eval-run-5/gptoss-a/routes/routes-002.json +333 -0
- package/assess/lsa/examples/eval-run-5/gptoss-a/routes/routes-003.json +400 -0
- package/assess/lsa/examples/eval-run-5/gptoss-a/routes/routes-004.json +403 -0
- package/assess/lsa/examples/eval-run-5/gptoss-a/routes/routes-005.json +398 -0
- package/assess/lsa/examples/eval-run-5/gptoss-a/routes/routes-006.json +63 -0
- package/assess/lsa/examples/eval-run-5/gptoss-a/score.json +80 -0
- package/assess/lsa/examples/eval-run-5/gptoss-a/stack-profile.json +226 -0
- package/assess/lsa/examples/eval-run-5/gptoss-b/ai-run-stats.json +83 -0
- package/assess/lsa/examples/eval-run-5/gptoss-b/coverage.json +44 -0
- package/assess/lsa/examples/eval-run-5/gptoss-b/findings/priv-privilege-001.json +579 -0
- package/assess/lsa/examples/eval-run-5/gptoss-b/findings/priv-privilege-002.json +268 -0
- package/assess/lsa/examples/eval-run-5/gptoss-b/findings.json +3913 -0
- package/assess/lsa/examples/eval-run-5/gptoss-b/mass-assignment.candidates.json +232 -0
- package/assess/lsa/examples/eval-run-5/gptoss-b/routes/routes-001.json +425 -0
- package/assess/lsa/examples/eval-run-5/gptoss-b/routes/routes-002.json +333 -0
- package/assess/lsa/examples/eval-run-5/gptoss-b/routes/routes-003.json +400 -0
- package/assess/lsa/examples/eval-run-5/gptoss-b/routes/routes-004.json +403 -0
- package/assess/lsa/examples/eval-run-5/gptoss-b/routes/routes-005.json +398 -0
- package/assess/lsa/examples/eval-run-5/gptoss-b/routes/routes-006.json +63 -0
- package/assess/lsa/examples/eval-run-5/gptoss-b/score.json +94 -0
- package/assess/lsa/examples/eval-run-5/ground-truth.json +823 -0
- package/assess/lsa/knowledge/injection-patterns.md +8 -1
- package/assess/lsa/knowledge/stacks/nextjs.md +62 -0
- package/assess/lsa/prompts/35-privilege-auditor.md +3 -1
- package/assess/lsa/prompts/_shared-rules.md +1 -0
- package/assess/lsa/scripts/detect_stack.py +5 -1
- package/assess/lsa/scripts/find_injection.py +34 -5
- package/assess/lsa/scripts/lsa_common.py +9 -2
- package/assess/lsa/scripts/make_batches.py +2 -1
- package/assess/lsa/scripts/map_routes.py +10 -2
- package/assess/lsa/scripts/nextjs_routes.py +236 -0
- package/assess/lsa/templates/audit-config.json +1 -1
- package/assess/lsa/tests/EVAL-RESULTS.md +156 -0
- package/assess/lsa/tests/score_findings.py +58 -0
- package/assess/lsa/tests/test_default_scope.py +86 -0
- package/assess/lsa/tests/test_eval_run_4.py +73 -0
- package/assess/lsa/tests/test_eval_run_5.py +73 -0
- package/assess/lsa/tests/test_js_tagged_sql.py +112 -0
- package/assess/lsa/tests/test_nextjs.py +198 -0
- package/assess/lsa/tests/test_privilege_tier2.py +30 -0
- package/operate/ai/anchoring.py +130 -0
- package/operate/ai/client.py +13 -0
- package/operate/ai/context.py +105 -0
- package/operate/ai/runner.py +197 -69
- package/operate/cli/__init__.py +1 -1
- package/operate/cli/commands/scan.py +1 -1
- package/operate/tests/test_ai_anchoring.py +184 -0
- package/operate/tests/test_headless_ai.py +148 -1
- package/package.json +1 -1
|
@@ -0,0 +1,645 @@
|
|
|
1
|
+
{
|
|
2
|
+
"batch_id": "privilege-001",
|
|
3
|
+
"findings": [
|
|
4
|
+
{
|
|
5
|
+
"finding_id": "BFLA-R-0003-1",
|
|
6
|
+
"category": "bfla",
|
|
7
|
+
"subtype": "missing_role_check",
|
|
8
|
+
"title": "Unrestricted member deletion in Classic ASP shop",
|
|
9
|
+
"route_id": "R-0003",
|
|
10
|
+
"location": {
|
|
11
|
+
"file": "classic-asp/shop/member.asp",
|
|
12
|
+
"start_line": 9
|
|
13
|
+
},
|
|
14
|
+
"evidence": [
|
|
15
|
+
{
|
|
16
|
+
"file": "classic-asp/shop/member.asp",
|
|
17
|
+
"line": 9,
|
|
18
|
+
"why": "DELETE statement executed without any role check"
|
|
19
|
+
},
|
|
20
|
+
{
|
|
21
|
+
"file": "classic-asp/shop/member.asp",
|
|
22
|
+
"line": 6,
|
|
23
|
+
"why": "No server\u2011side role verification before deletion"
|
|
24
|
+
}
|
|
25
|
+
],
|
|
26
|
+
"impact": "Any authenticated user can delete any member record",
|
|
27
|
+
"severity": "critical",
|
|
28
|
+
"confidence": "high",
|
|
29
|
+
"cwe": [
|
|
30
|
+
"CWE-285"
|
|
31
|
+
],
|
|
32
|
+
"recommendation": "Add a server\u2011side check that the current user has the admin role before executing the DELETE",
|
|
33
|
+
"status": "unverified"
|
|
34
|
+
},
|
|
35
|
+
{
|
|
36
|
+
"finding_id": "BFLA-R-0007-1",
|
|
37
|
+
"category": "bfla",
|
|
38
|
+
"subtype": "missing_role_check",
|
|
39
|
+
"title": "Unprotected user deletion in ASP.NET MVC AdminController",
|
|
40
|
+
"route_id": "R-0007",
|
|
41
|
+
"location": {
|
|
42
|
+
"file": "Web.Controllers.AdminController.cs",
|
|
43
|
+
"start_line": 12
|
|
44
|
+
},
|
|
45
|
+
"evidence": [
|
|
46
|
+
{
|
|
47
|
+
"file": "Web.Controllers.AdminController.cs",
|
|
48
|
+
"line": 12,
|
|
49
|
+
"why": "DeleteUser action performs user removal without role check"
|
|
50
|
+
},
|
|
51
|
+
{
|
|
52
|
+
"file": "Web.Controllers.AdminController.cs",
|
|
53
|
+
"line": 6,
|
|
54
|
+
"why": "Class has [Authorize] but not role restriction"
|
|
55
|
+
}
|
|
56
|
+
],
|
|
57
|
+
"impact": "Any authenticated user can delete any user account",
|
|
58
|
+
"severity": "critical",
|
|
59
|
+
"confidence": "high",
|
|
60
|
+
"cwe": [
|
|
61
|
+
"CWE-285"
|
|
62
|
+
],
|
|
63
|
+
"recommendation": "Apply [Authorize(Roles=\"Admin\")] to DeleteUser or perform a role check inside the method",
|
|
64
|
+
"status": "unverified"
|
|
65
|
+
},
|
|
66
|
+
{
|
|
67
|
+
"finding_id": "BFLA-R-0009-1",
|
|
68
|
+
"category": "bfla",
|
|
69
|
+
"subtype": "role_from_request",
|
|
70
|
+
"title": "Export endpoint trusts request parameter for admin access",
|
|
71
|
+
"route_id": "R-0009",
|
|
72
|
+
"location": {
|
|
73
|
+
"file": "Web.Controllers.AdminController.cs",
|
|
74
|
+
"start_line": 30
|
|
75
|
+
},
|
|
76
|
+
"evidence": [
|
|
77
|
+
{
|
|
78
|
+
"file": "Web.Controllers.AdminController.cs",
|
|
79
|
+
"line": 32,
|
|
80
|
+
"why": "Allows export if QueryString[\"isAdmin\"] == \"true\" without verifying role"
|
|
81
|
+
},
|
|
82
|
+
{
|
|
83
|
+
"file": "Web.Controllers.AdminController.cs",
|
|
84
|
+
"line": 30,
|
|
85
|
+
"why": "No server\u2011side role check before export"
|
|
86
|
+
}
|
|
87
|
+
],
|
|
88
|
+
"impact": "Any user can export all user data by setting isAdmin=true",
|
|
89
|
+
"severity": "critical",
|
|
90
|
+
"confidence": "high",
|
|
91
|
+
"cwe": [
|
|
92
|
+
"CWE-285"
|
|
93
|
+
],
|
|
94
|
+
"recommendation": "Validate the current user's role on the server before allowing export",
|
|
95
|
+
"status": "unverified"
|
|
96
|
+
},
|
|
97
|
+
{
|
|
98
|
+
"finding_id": "BFLA-R-0023-1",
|
|
99
|
+
"category": "bfla",
|
|
100
|
+
"subtype": "missing_role_check",
|
|
101
|
+
"title": "Unprotected user deletion in Spring MVC AdminUserController",
|
|
102
|
+
"route_id": "R-0023",
|
|
103
|
+
"location": {
|
|
104
|
+
"file": "com.acme.web.AdminUserController.java",
|
|
105
|
+
"start_line": 13
|
|
106
|
+
},
|
|
107
|
+
"evidence": [
|
|
108
|
+
{
|
|
109
|
+
"file": "com.acme.web.AdminUserController.java",
|
|
110
|
+
"line": 13,
|
|
111
|
+
"why": "Delete method lacks @PreAuthorize"
|
|
112
|
+
},
|
|
113
|
+
{
|
|
114
|
+
"file": "com.acme.web.AdminUserController.java",
|
|
115
|
+
"line": 19,
|
|
116
|
+
"why": "Only grant method has role check"
|
|
117
|
+
}
|
|
118
|
+
],
|
|
119
|
+
"impact": "Any authenticated user can delete any user account",
|
|
120
|
+
"severity": "critical",
|
|
121
|
+
"confidence": "high",
|
|
122
|
+
"cwe": [
|
|
123
|
+
"CWE-285"
|
|
124
|
+
],
|
|
125
|
+
"recommendation": "Add @PreAuthorize(\"hasRole('ADMIN')\") to the delete method or perform a role check inside",
|
|
126
|
+
"status": "unverified"
|
|
127
|
+
},
|
|
128
|
+
{
|
|
129
|
+
"finding_id": "BFLA-R-0030-1",
|
|
130
|
+
"category": "bfla",
|
|
131
|
+
"subtype": "missing_role_check",
|
|
132
|
+
"title": "Unprotected user deletion in Express router",
|
|
133
|
+
"route_id": "R-0030",
|
|
134
|
+
"location": {
|
|
135
|
+
"file": "routes.js",
|
|
136
|
+
"start_line": 8
|
|
137
|
+
},
|
|
138
|
+
"evidence": [
|
|
139
|
+
{
|
|
140
|
+
"file": "routes.js",
|
|
141
|
+
"line": 8,
|
|
142
|
+
"why": "Route deletes user without requireAdmin middleware"
|
|
143
|
+
},
|
|
144
|
+
{
|
|
145
|
+
"file": "routes.js",
|
|
146
|
+
"line": 6,
|
|
147
|
+
"why": "ensureLoggedIn only checks authentication"
|
|
148
|
+
}
|
|
149
|
+
],
|
|
150
|
+
"impact": "Any authenticated user can delete any user account",
|
|
151
|
+
"severity": "critical",
|
|
152
|
+
"confidence": "high",
|
|
153
|
+
"cwe": [
|
|
154
|
+
"CWE-285"
|
|
155
|
+
],
|
|
156
|
+
"recommendation": "Add requireAdmin middleware to the delete route",
|
|
157
|
+
"status": "unverified"
|
|
158
|
+
},
|
|
159
|
+
{
|
|
160
|
+
"finding_id": "BFLA-R-0032-1",
|
|
161
|
+
"category": "bfla",
|
|
162
|
+
"subtype": "role_from_request",
|
|
163
|
+
"title": "Export endpoint trusts request parameter for admin access in Express",
|
|
164
|
+
"route_id": "R-0032",
|
|
165
|
+
"location": {
|
|
166
|
+
"file": "routes.js",
|
|
167
|
+
"start_line": 16
|
|
168
|
+
},
|
|
169
|
+
"evidence": [
|
|
170
|
+
{
|
|
171
|
+
"file": "routes.js",
|
|
172
|
+
"line": 17,
|
|
173
|
+
"why": "Allows export if req.query.isAdmin == 'true' without verifying role"
|
|
174
|
+
},
|
|
175
|
+
{
|
|
176
|
+
"file": "routes.js",
|
|
177
|
+
"line": 6,
|
|
178
|
+
"why": "ensureLoggedIn only checks authentication"
|
|
179
|
+
}
|
|
180
|
+
],
|
|
181
|
+
"impact": "Any user can export all user data by setting isAdmin=true",
|
|
182
|
+
"severity": "critical",
|
|
183
|
+
"confidence": "high",
|
|
184
|
+
"cwe": [
|
|
185
|
+
"CWE-285"
|
|
186
|
+
],
|
|
187
|
+
"recommendation": "Validate the current user's role on the server before allowing export",
|
|
188
|
+
"status": "unverified"
|
|
189
|
+
},
|
|
190
|
+
{
|
|
191
|
+
"finding_id": "BFLA-R-0057-1",
|
|
192
|
+
"category": "bfla",
|
|
193
|
+
"subtype": "missing_role_check",
|
|
194
|
+
"title": "Unprotected user view in PHP admin.php",
|
|
195
|
+
"route_id": "R-0057",
|
|
196
|
+
"location": {
|
|
197
|
+
"file": "php-plain/admin.php",
|
|
198
|
+
"start_line": 6
|
|
199
|
+
},
|
|
200
|
+
"evidence": [
|
|
201
|
+
{
|
|
202
|
+
"file": "php-plain/admin.php",
|
|
203
|
+
"line": 6,
|
|
204
|
+
"why": "SELECT user by id without role check"
|
|
205
|
+
},
|
|
206
|
+
{
|
|
207
|
+
"file": "php-plain/admin.php",
|
|
208
|
+
"line": 2,
|
|
209
|
+
"why": "Only includes auth.php which only checks login"
|
|
210
|
+
}
|
|
211
|
+
],
|
|
212
|
+
"impact": "Any authenticated user can view any user record",
|
|
213
|
+
"severity": "critical",
|
|
214
|
+
"confidence": "high",
|
|
215
|
+
"cwe": [
|
|
216
|
+
"CWE-285"
|
|
217
|
+
],
|
|
218
|
+
"recommendation": "Add a role check before executing the SELECT",
|
|
219
|
+
"status": "unverified"
|
|
220
|
+
},
|
|
221
|
+
{
|
|
222
|
+
"finding_id": "BFLA-R-0058-1",
|
|
223
|
+
"category": "bfla",
|
|
224
|
+
"subtype": "missing_role_check",
|
|
225
|
+
"title": "Unprotected user deletion in PHP admin.php",
|
|
226
|
+
"route_id": "R-0058",
|
|
227
|
+
"location": {
|
|
228
|
+
"file": "php-plain/admin.php",
|
|
229
|
+
"start_line": 10
|
|
230
|
+
},
|
|
231
|
+
"evidence": [
|
|
232
|
+
{
|
|
233
|
+
"file": "php-plain/admin.php",
|
|
234
|
+
"line": 10,
|
|
235
|
+
"why": "DELETE statement executed without role check"
|
|
236
|
+
},
|
|
237
|
+
{
|
|
238
|
+
"file": "php-plain/admin.php",
|
|
239
|
+
"line": 2,
|
|
240
|
+
"why": "Only includes auth.php which only checks login"
|
|
241
|
+
}
|
|
242
|
+
],
|
|
243
|
+
"impact": "Any authenticated user can delete any user record",
|
|
244
|
+
"severity": "critical",
|
|
245
|
+
"confidence": "high",
|
|
246
|
+
"cwe": [
|
|
247
|
+
"CWE-285"
|
|
248
|
+
],
|
|
249
|
+
"recommendation": "Add a role check before executing the DELETE",
|
|
250
|
+
"status": "unverified"
|
|
251
|
+
},
|
|
252
|
+
{
|
|
253
|
+
"finding_id": "BFLA-R-0066-1",
|
|
254
|
+
"category": "bfla",
|
|
255
|
+
"subtype": "missing_role_check",
|
|
256
|
+
"title": "Unprotected user deletion in PHP admin/delete_user.php",
|
|
257
|
+
"route_id": "R-0066",
|
|
258
|
+
"location": {
|
|
259
|
+
"file": "php-plain/admin/delete_user.php",
|
|
260
|
+
"start_line": 1
|
|
261
|
+
},
|
|
262
|
+
"evidence": [
|
|
263
|
+
{
|
|
264
|
+
"file": "php-plain/admin/delete_user.php",
|
|
265
|
+
"line": 5,
|
|
266
|
+
"why": "DELETE statement executed without role check"
|
|
267
|
+
},
|
|
268
|
+
{
|
|
269
|
+
"file": "php-plain/admin/delete_user.php",
|
|
270
|
+
"line": 2,
|
|
271
|
+
"why": "Only includes auth.php which only checks login"
|
|
272
|
+
}
|
|
273
|
+
],
|
|
274
|
+
"impact": "Any authenticated user can delete any user record",
|
|
275
|
+
"severity": "critical",
|
|
276
|
+
"confidence": "high",
|
|
277
|
+
"cwe": [
|
|
278
|
+
"CWE-285"
|
|
279
|
+
],
|
|
280
|
+
"recommendation": "Add a role check before executing the DELETE",
|
|
281
|
+
"status": "unverified"
|
|
282
|
+
},
|
|
283
|
+
{
|
|
284
|
+
"finding_id": "BFLA-R-0067-1",
|
|
285
|
+
"category": "bfla",
|
|
286
|
+
"subtype": "role_from_request",
|
|
287
|
+
"title": "Privilege escalation via role promotion in PHP admin/promote.php",
|
|
288
|
+
"route_id": "R-0067",
|
|
289
|
+
"location": {
|
|
290
|
+
"file": "php-plain/admin/promote.php",
|
|
291
|
+
"start_line": 1
|
|
292
|
+
},
|
|
293
|
+
"evidence": [
|
|
294
|
+
{
|
|
295
|
+
"file": "php-plain/admin/promote.php",
|
|
296
|
+
"line": 5,
|
|
297
|
+
"why": "Sets role to admin based on $_POST['is_admin'] without role check"
|
|
298
|
+
},
|
|
299
|
+
{
|
|
300
|
+
"file": "php-plain/admin/promote.php",
|
|
301
|
+
"line": 2,
|
|
302
|
+
"why": "Only includes auth.php which only checks login"
|
|
303
|
+
}
|
|
304
|
+
],
|
|
305
|
+
"impact": "Any authenticated user can promote themselves to admin",
|
|
306
|
+
"severity": "critical",
|
|
307
|
+
"confidence": "high",
|
|
308
|
+
"cwe": [
|
|
309
|
+
"CWE-285"
|
|
310
|
+
],
|
|
311
|
+
"recommendation": "Validate the current user's role before allowing role changes",
|
|
312
|
+
"status": "unverified"
|
|
313
|
+
},
|
|
314
|
+
{
|
|
315
|
+
"finding_id": "BFLA-R-0059-1",
|
|
316
|
+
"category": "bfla",
|
|
317
|
+
"subtype": "missing_role_check",
|
|
318
|
+
"title": "Unprotected user deletion in PHP manage_users.php",
|
|
319
|
+
"route_id": "R-0059",
|
|
320
|
+
"location": {
|
|
321
|
+
"file": "php-plain/manage_users.php",
|
|
322
|
+
"start_line": 5
|
|
323
|
+
},
|
|
324
|
+
"evidence": [
|
|
325
|
+
{
|
|
326
|
+
"file": "php-plain/manage_users.php",
|
|
327
|
+
"line": 5,
|
|
328
|
+
"why": "DELETE statement executed without role check"
|
|
329
|
+
},
|
|
330
|
+
{
|
|
331
|
+
"file": "php-plain/manage_users.php",
|
|
332
|
+
"line": 11,
|
|
333
|
+
"why": "Client\u2011side role check only"
|
|
334
|
+
}
|
|
335
|
+
],
|
|
336
|
+
"impact": "Any authenticated user can delete any user record",
|
|
337
|
+
"severity": "critical",
|
|
338
|
+
"confidence": "high",
|
|
339
|
+
"cwe": [
|
|
340
|
+
"CWE-285"
|
|
341
|
+
],
|
|
342
|
+
"recommendation": "Add a server\u2011side role check before executing the DELETE",
|
|
343
|
+
"status": "unverified"
|
|
344
|
+
},
|
|
345
|
+
{
|
|
346
|
+
"finding_id": "BFLA-R-0063-1",
|
|
347
|
+
"category": "bfla",
|
|
348
|
+
"subtype": "role_from_request",
|
|
349
|
+
"title": "Privilege escalation via role field in PHP profile.php",
|
|
350
|
+
"route_id": "R-0063",
|
|
351
|
+
"location": {
|
|
352
|
+
"file": "php-plain/profile.php",
|
|
353
|
+
"start_line": 10
|
|
354
|
+
},
|
|
355
|
+
"evidence": [
|
|
356
|
+
{
|
|
357
|
+
"file": "php-plain/profile.php",
|
|
358
|
+
"line": 10,
|
|
359
|
+
"why": "Sets $user->role from $_POST without role check"
|
|
360
|
+
},
|
|
361
|
+
{
|
|
362
|
+
"file": "php-plain/profile.php",
|
|
363
|
+
"line": 5,
|
|
364
|
+
"why": "No server\u2011side role validation"
|
|
365
|
+
}
|
|
366
|
+
],
|
|
367
|
+
"impact": "Any authenticated user can change their role to admin",
|
|
368
|
+
"severity": "critical",
|
|
369
|
+
"confidence": "high",
|
|
370
|
+
"cwe": [
|
|
371
|
+
"CWE-285"
|
|
372
|
+
],
|
|
373
|
+
"recommendation": "Remove role assignment from user input or enforce role check",
|
|
374
|
+
"status": "unverified"
|
|
375
|
+
},
|
|
376
|
+
{
|
|
377
|
+
"finding_id": "MASS-M-0011-1",
|
|
378
|
+
"category": "mass_assignment",
|
|
379
|
+
"subtype": "whole_object_binding",
|
|
380
|
+
"title": "Unrestricted binding of all POST fields to User model in PHP profile.php",
|
|
381
|
+
"candidate_id": "M-0011",
|
|
382
|
+
"location": {
|
|
383
|
+
"file": "php-plain/profile.php",
|
|
384
|
+
"start_line": 5
|
|
385
|
+
},
|
|
386
|
+
"evidence": [
|
|
387
|
+
{
|
|
388
|
+
"file": "php-plain/profile.php",
|
|
389
|
+
"line": 6,
|
|
390
|
+
"why": "foreach ($_POST as $field => $value) assigns all fields"
|
|
391
|
+
},
|
|
392
|
+
{
|
|
393
|
+
"file": "php-plain/profile.php",
|
|
394
|
+
"line": 10,
|
|
395
|
+
"why": "Explicitly sets $user->role from request"
|
|
396
|
+
}
|
|
397
|
+
],
|
|
398
|
+
"impact": "Any user can set privileged fields such as role",
|
|
399
|
+
"severity": "critical",
|
|
400
|
+
"confidence": "high",
|
|
401
|
+
"cwe": [
|
|
402
|
+
"CWE-915"
|
|
403
|
+
],
|
|
404
|
+
"recommendation": "Implement an allowlist or strip privileged fields before persisting",
|
|
405
|
+
"status": "unverified"
|
|
406
|
+
},
|
|
407
|
+
{
|
|
408
|
+
"finding_id": "MASS-M-0012-1",
|
|
409
|
+
"category": "mass_assignment",
|
|
410
|
+
"subtype": "privileged_field_writable",
|
|
411
|
+
"title": "Explicit writable privileged field 'role' in PHP profile.php",
|
|
412
|
+
"candidate_id": "M-0012",
|
|
413
|
+
"location": {
|
|
414
|
+
"file": "php-plain/profile.php",
|
|
415
|
+
"start_line": 5
|
|
416
|
+
},
|
|
417
|
+
"evidence": [
|
|
418
|
+
{
|
|
419
|
+
"file": "php-plain/profile.php",
|
|
420
|
+
"line": 10,
|
|
421
|
+
"why": "$user->role = $_POST['role'] writes privileged field without validation"
|
|
422
|
+
}
|
|
423
|
+
],
|
|
424
|
+
"impact": "Any user can set their role to admin",
|
|
425
|
+
"severity": "critical",
|
|
426
|
+
"confidence": "high",
|
|
427
|
+
"cwe": [
|
|
428
|
+
"CWE-915",
|
|
429
|
+
"CWE-269"
|
|
430
|
+
],
|
|
431
|
+
"recommendation": "Remove role assignment from user input or enforce role check",
|
|
432
|
+
"status": "unverified"
|
|
433
|
+
},
|
|
434
|
+
{
|
|
435
|
+
"finding_id": "MASS-M-0001-1",
|
|
436
|
+
"category": "mass_assignment",
|
|
437
|
+
"subtype": "whole_object_binding",
|
|
438
|
+
"title": "Unrestricted binding of Customer model in C# controller",
|
|
439
|
+
"candidate_id": "M-0001",
|
|
440
|
+
"location": {
|
|
441
|
+
"file": "Web.Controllers.CustomerController.cs",
|
|
442
|
+
"start_line": 12
|
|
443
|
+
},
|
|
444
|
+
"evidence": [
|
|
445
|
+
{
|
|
446
|
+
"file": "Web.Controllers.CustomerController.cs",
|
|
447
|
+
"line": 12,
|
|
448
|
+
"why": "Edit action accepts Customer object without allowlist"
|
|
449
|
+
}
|
|
450
|
+
],
|
|
451
|
+
"impact": "Potentially writable privileged fields if Customer contains them",
|
|
452
|
+
"severity": "high",
|
|
453
|
+
"confidence": "medium",
|
|
454
|
+
"cwe": [
|
|
455
|
+
"CWE-915"
|
|
456
|
+
],
|
|
457
|
+
"recommendation": "Use a view model or [Bind(Include=...)] to restrict bound properties",
|
|
458
|
+
"status": "needs_review"
|
|
459
|
+
},
|
|
460
|
+
{
|
|
461
|
+
"finding_id": "MASS-M-0002-1",
|
|
462
|
+
"category": "mass_assignment",
|
|
463
|
+
"subtype": "whole_object_binding",
|
|
464
|
+
"title": "TryUpdateModel usage in Customer controller may bind privileged fields",
|
|
465
|
+
"candidate_id": "M-0002",
|
|
466
|
+
"location": {
|
|
467
|
+
"file": "Web.Controllers.CustomerController.cs",
|
|
468
|
+
"start_line": 27
|
|
469
|
+
},
|
|
470
|
+
"evidence": [
|
|
471
|
+
{
|
|
472
|
+
"file": "Web.Controllers.CustomerController.cs",
|
|
473
|
+
"line": 27,
|
|
474
|
+
"why": "TryUpdateModel(customer) binds all request fields"
|
|
475
|
+
}
|
|
476
|
+
],
|
|
477
|
+
"impact": "Potentially writable privileged fields if Customer contains them",
|
|
478
|
+
"severity": "high",
|
|
479
|
+
"confidence": "medium",
|
|
480
|
+
"cwe": [
|
|
481
|
+
"CWE-915"
|
|
482
|
+
],
|
|
483
|
+
"recommendation": "Specify bind include or use a view model",
|
|
484
|
+
"status": "needs_review"
|
|
485
|
+
},
|
|
486
|
+
{
|
|
487
|
+
"finding_id": "MASS-M-0003-1",
|
|
488
|
+
"category": "mass_assignment",
|
|
489
|
+
"subtype": "whole_object_binding",
|
|
490
|
+
"title": "Unrestricted binding of Account model in Java controller",
|
|
491
|
+
"candidate_id": "M-0003",
|
|
492
|
+
"location": {
|
|
493
|
+
"file": "com.acme.web.AccountController.java",
|
|
494
|
+
"start_line": 14
|
|
495
|
+
},
|
|
496
|
+
"evidence": [
|
|
497
|
+
{
|
|
498
|
+
"file": "com.acme.web.AccountController.java",
|
|
499
|
+
"line": 14,
|
|
500
|
+
"why": "save(@ModelAttribute Account account) binds all fields"
|
|
501
|
+
}
|
|
502
|
+
],
|
|
503
|
+
"impact": "Potentially writable privileged fields if Account contains them",
|
|
504
|
+
"severity": "high",
|
|
505
|
+
"confidence": "medium",
|
|
506
|
+
"cwe": [
|
|
507
|
+
"CWE-915"
|
|
508
|
+
],
|
|
509
|
+
"recommendation": "Use a DTO or @InitBinder to restrict fields",
|
|
510
|
+
"status": "needs_review"
|
|
511
|
+
},
|
|
512
|
+
{
|
|
513
|
+
"finding_id": "MASS-M-0004-1",
|
|
514
|
+
"category": "mass_assignment",
|
|
515
|
+
"subtype": "whole_object_binding",
|
|
516
|
+
"title": "Unrestricted binding of Account model in Java controller (duplicate file)",
|
|
517
|
+
"candidate_id": "M-0004",
|
|
518
|
+
"location": {
|
|
519
|
+
"file": "com.acme.web.AccountController.java",
|
|
520
|
+
"start_line": 14
|
|
521
|
+
},
|
|
522
|
+
"evidence": [
|
|
523
|
+
{
|
|
524
|
+
"file": "com.acme.web.AccountController.java",
|
|
525
|
+
"line": 14,
|
|
526
|
+
"why": "save(@ModelAttribute Account account) binds all fields"
|
|
527
|
+
}
|
|
528
|
+
],
|
|
529
|
+
"impact": "Potentially writable privileged fields if Account contains them",
|
|
530
|
+
"severity": "high",
|
|
531
|
+
"confidence": "medium",
|
|
532
|
+
"cwe": [
|
|
533
|
+
"CWE-915"
|
|
534
|
+
],
|
|
535
|
+
"recommendation": "Use a DTO or @InitBinder to restrict fields",
|
|
536
|
+
"status": "needs_review"
|
|
537
|
+
},
|
|
538
|
+
{
|
|
539
|
+
"finding_id": "MASS-M-0005-1",
|
|
540
|
+
"category": "mass_assignment",
|
|
541
|
+
"subtype": "whole_object_binding",
|
|
542
|
+
"title": "BeanUtils.populate binds all request parameters to Account in Java servlet",
|
|
543
|
+
"candidate_id": "M-0005",
|
|
544
|
+
"location": {
|
|
545
|
+
"file": "com.acme.web.ProfileServlet.java",
|
|
546
|
+
"start_line": 12
|
|
547
|
+
},
|
|
548
|
+
"evidence": [
|
|
549
|
+
{
|
|
550
|
+
"file": "com.acme.web.ProfileServlet.java",
|
|
551
|
+
"line": 12,
|
|
552
|
+
"why": "BeanUtils.populate(account, request.getParameterMap()) binds all fields"
|
|
553
|
+
}
|
|
554
|
+
],
|
|
555
|
+
"impact": "Potentially writable privileged fields if Account contains them",
|
|
556
|
+
"severity": "high",
|
|
557
|
+
"confidence": "medium",
|
|
558
|
+
"cwe": [
|
|
559
|
+
"CWE-915"
|
|
560
|
+
],
|
|
561
|
+
"recommendation": "Whitelist allowed properties or use a DTO",
|
|
562
|
+
"status": "needs_review"
|
|
563
|
+
}
|
|
564
|
+
],
|
|
565
|
+
"privilege_route_verdicts": [
|
|
566
|
+
{
|
|
567
|
+
"route_id": "R-0003",
|
|
568
|
+
"verdict": "vulnerable"
|
|
569
|
+
},
|
|
570
|
+
{
|
|
571
|
+
"route_id": "R-0007",
|
|
572
|
+
"verdict": "vulnerable"
|
|
573
|
+
},
|
|
574
|
+
{
|
|
575
|
+
"route_id": "R-0009",
|
|
576
|
+
"verdict": "vulnerable"
|
|
577
|
+
},
|
|
578
|
+
{
|
|
579
|
+
"route_id": "R-0023",
|
|
580
|
+
"verdict": "vulnerable"
|
|
581
|
+
},
|
|
582
|
+
{
|
|
583
|
+
"route_id": "R-0030",
|
|
584
|
+
"verdict": "vulnerable"
|
|
585
|
+
},
|
|
586
|
+
{
|
|
587
|
+
"route_id": "R-0032",
|
|
588
|
+
"verdict": "vulnerable"
|
|
589
|
+
},
|
|
590
|
+
{
|
|
591
|
+
"route_id": "R-0057",
|
|
592
|
+
"verdict": "vulnerable"
|
|
593
|
+
},
|
|
594
|
+
{
|
|
595
|
+
"route_id": "R-0058",
|
|
596
|
+
"verdict": "vulnerable"
|
|
597
|
+
},
|
|
598
|
+
{
|
|
599
|
+
"route_id": "R-0066",
|
|
600
|
+
"verdict": "vulnerable"
|
|
601
|
+
},
|
|
602
|
+
{
|
|
603
|
+
"route_id": "R-0067",
|
|
604
|
+
"verdict": "vulnerable"
|
|
605
|
+
},
|
|
606
|
+
{
|
|
607
|
+
"route_id": "R-0059",
|
|
608
|
+
"verdict": "vulnerable"
|
|
609
|
+
},
|
|
610
|
+
{
|
|
611
|
+
"route_id": "R-0063",
|
|
612
|
+
"verdict": "vulnerable"
|
|
613
|
+
}
|
|
614
|
+
],
|
|
615
|
+
"candidate_verdicts": [
|
|
616
|
+
{
|
|
617
|
+
"candidate_id": "M-0011",
|
|
618
|
+
"verdict": "vulnerable"
|
|
619
|
+
},
|
|
620
|
+
{
|
|
621
|
+
"candidate_id": "M-0012",
|
|
622
|
+
"verdict": "vulnerable"
|
|
623
|
+
},
|
|
624
|
+
{
|
|
625
|
+
"candidate_id": "M-0001",
|
|
626
|
+
"verdict": "needs_review"
|
|
627
|
+
},
|
|
628
|
+
{
|
|
629
|
+
"candidate_id": "M-0002",
|
|
630
|
+
"verdict": "needs_review"
|
|
631
|
+
},
|
|
632
|
+
{
|
|
633
|
+
"candidate_id": "M-0003",
|
|
634
|
+
"verdict": "needs_review"
|
|
635
|
+
},
|
|
636
|
+
{
|
|
637
|
+
"candidate_id": "M-0004",
|
|
638
|
+
"verdict": "needs_review"
|
|
639
|
+
},
|
|
640
|
+
{
|
|
641
|
+
"candidate_id": "M-0005",
|
|
642
|
+
"verdict": "needs_review"
|
|
643
|
+
}
|
|
644
|
+
]
|
|
645
|
+
}
|