@hoanghainh/komagu 2.0.0 → 2.0.1
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 +7 -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/prompts/35-privilege-auditor.md +3 -1
- package/assess/lsa/tests/EVAL-RESULTS.md +156 -0
- package/assess/lsa/tests/score_findings.py +58 -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_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,613 @@
|
|
|
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": "Unprotected member deletion in Classic ASP",
|
|
9
|
+
"route_id": "R-0003",
|
|
10
|
+
"location": {
|
|
11
|
+
"file": "classic-asp/shop/member.asp",
|
|
12
|
+
"start_line": 1
|
|
13
|
+
},
|
|
14
|
+
"evidence": [
|
|
15
|
+
{
|
|
16
|
+
"file": "classic-asp/shop/member.asp",
|
|
17
|
+
"line": 6,
|
|
18
|
+
"why": "DELETE query on members table \u2013 privileged action"
|
|
19
|
+
},
|
|
20
|
+
{
|
|
21
|
+
"file": "classic-asp/shop/member.asp",
|
|
22
|
+
"line": 9,
|
|
23
|
+
"why": "no role check 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",
|
|
40
|
+
"route_id": "R-0007",
|
|
41
|
+
"location": {
|
|
42
|
+
"file": "Web/Controllers/AdminController.cs",
|
|
43
|
+
"start_line": 11
|
|
44
|
+
},
|
|
45
|
+
"evidence": [
|
|
46
|
+
{
|
|
47
|
+
"file": "Web/Controllers/AdminController.cs",
|
|
48
|
+
"line": 12,
|
|
49
|
+
"why": "DELETE user \u2013 privileged action"
|
|
50
|
+
},
|
|
51
|
+
{
|
|
52
|
+
"file": "Web/Controllers/AdminController.cs",
|
|
53
|
+
"line": 12,
|
|
54
|
+
"why": "no role check on DeleteUser method"
|
|
55
|
+
}
|
|
56
|
+
],
|
|
57
|
+
"impact": "Any authenticated user can delete any account",
|
|
58
|
+
"severity": "critical",
|
|
59
|
+
"confidence": "high",
|
|
60
|
+
"cwe": [
|
|
61
|
+
"CWE-285"
|
|
62
|
+
],
|
|
63
|
+
"recommendation": "Add [Authorize(Roles=\"Admin\")] to DeleteUser or enforce 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 query for admin rights",
|
|
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": "uses Request.QueryString[\"isAdmin\"] to allow export \u2013 role from request"
|
|
81
|
+
},
|
|
82
|
+
{
|
|
83
|
+
"file": "Web/Controllers/AdminController.cs",
|
|
84
|
+
"line": 30,
|
|
85
|
+
"why": "no server\u2011side role check"
|
|
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 caller's role from the session, not from the query string",
|
|
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",
|
|
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 user \u2013 privileged action"
|
|
112
|
+
},
|
|
113
|
+
{
|
|
114
|
+
"file": "com/acme/web/AdminUserController.java",
|
|
115
|
+
"line": 13,
|
|
116
|
+
"why": "no @PreAuthorize on delete method"
|
|
117
|
+
}
|
|
118
|
+
],
|
|
119
|
+
"impact": "Any authenticated user can delete any account",
|
|
120
|
+
"severity": "critical",
|
|
121
|
+
"confidence": "high",
|
|
122
|
+
"cwe": [
|
|
123
|
+
"CWE-285"
|
|
124
|
+
],
|
|
125
|
+
"recommendation": "Add @PreAuthorize(\"hasRole('ADMIN')\") to delete method or enforce 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",
|
|
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": "DELETE user \u2013 privileged action"
|
|
143
|
+
},
|
|
144
|
+
{
|
|
145
|
+
"file": "routes.js",
|
|
146
|
+
"line": 8,
|
|
147
|
+
"why": "only ensureLoggedIn, no admin check"
|
|
148
|
+
}
|
|
149
|
+
],
|
|
150
|
+
"impact": "Any logged\u2011in user can delete any account",
|
|
151
|
+
"severity": "critical",
|
|
152
|
+
"confidence": "high",
|
|
153
|
+
"cwe": [
|
|
154
|
+
"CWE-285"
|
|
155
|
+
],
|
|
156
|
+
"recommendation": "Add requireAdmin middleware before the delete handler",
|
|
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 query for admin rights 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": "uses req.query.isAdmin to allow export \u2013 role from request"
|
|
174
|
+
},
|
|
175
|
+
{
|
|
176
|
+
"file": "routes.js",
|
|
177
|
+
"line": 16,
|
|
178
|
+
"why": "no admin check"
|
|
179
|
+
}
|
|
180
|
+
],
|
|
181
|
+
"impact": "Any logged\u2011in 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 caller's role from the session, not from the query string",
|
|
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": 1
|
|
199
|
+
},
|
|
200
|
+
"evidence": [
|
|
201
|
+
{
|
|
202
|
+
"file": "php-plain/admin.php",
|
|
203
|
+
"line": 7,
|
|
204
|
+
"why": "SELECT user by id \u2013 privileged action"
|
|
205
|
+
},
|
|
206
|
+
{
|
|
207
|
+
"file": "php-plain/admin.php",
|
|
208
|
+
"line": 6,
|
|
209
|
+
"why": "no role check before query"
|
|
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 server\u2011side check that the current user is admin 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": 1
|
|
230
|
+
},
|
|
231
|
+
"evidence": [
|
|
232
|
+
{
|
|
233
|
+
"file": "php-plain/admin.php",
|
|
234
|
+
"line": 11,
|
|
235
|
+
"why": "DELETE user \u2013 privileged action"
|
|
236
|
+
},
|
|
237
|
+
{
|
|
238
|
+
"file": "php-plain/admin.php",
|
|
239
|
+
"line": 10,
|
|
240
|
+
"why": "no role check before deletion"
|
|
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 server\u2011side check that the current user is admin 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 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 user \u2013 privileged action"
|
|
267
|
+
},
|
|
268
|
+
{
|
|
269
|
+
"file": "php-plain/admin/delete_user.php",
|
|
270
|
+
"line": 1,
|
|
271
|
+
"why": "no role check before deletion"
|
|
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 server\u2011side check that the current user is admin 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 assignment in PHP 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'] \u2013 role from request"
|
|
298
|
+
},
|
|
299
|
+
{
|
|
300
|
+
"file": "php-plain/admin/promote.php",
|
|
301
|
+
"line": 1,
|
|
302
|
+
"why": "no role check before assignment"
|
|
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 caller's role from the session before allowing role changes",
|
|
312
|
+
"status": "unverified"
|
|
313
|
+
},
|
|
314
|
+
{
|
|
315
|
+
"finding_id": "BFLA-R-0059-1",
|
|
316
|
+
"category": "bfla",
|
|
317
|
+
"subtype": "client_side_role_check",
|
|
318
|
+
"title": "Client\u2011side role check only in PHP manage_users.php",
|
|
319
|
+
"route_id": "R-0059",
|
|
320
|
+
"location": {
|
|
321
|
+
"file": "php-plain/manage_users.php",
|
|
322
|
+
"start_line": 1
|
|
323
|
+
},
|
|
324
|
+
"evidence": [
|
|
325
|
+
{
|
|
326
|
+
"file": "php-plain/manage_users.php",
|
|
327
|
+
"line": 6,
|
|
328
|
+
"why": "DELETE user \u2013 privileged action"
|
|
329
|
+
},
|
|
330
|
+
{
|
|
331
|
+
"file": "php-plain/manage_users.php",
|
|
332
|
+
"line": 11,
|
|
333
|
+
"why": "role check only in UI, not server side"
|
|
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": "MASS-M-0011-1",
|
|
347
|
+
"category": "mass_assignment",
|
|
348
|
+
"subtype": "whole_object_binding",
|
|
349
|
+
"title": "Unrestricted binding of all POST fields to User in PHP profile.php",
|
|
350
|
+
"candidate_id": "M-0011",
|
|
351
|
+
"location": {
|
|
352
|
+
"file": "php-plain/profile.php",
|
|
353
|
+
"start_line": 5
|
|
354
|
+
},
|
|
355
|
+
"evidence": [
|
|
356
|
+
{
|
|
357
|
+
"file": "php-plain/profile.php",
|
|
358
|
+
"line": 6,
|
|
359
|
+
"why": "foreach ($_POST as $field => $value) { $user->$field = $value; } \u2013 whole object binding"
|
|
360
|
+
},
|
|
361
|
+
{
|
|
362
|
+
"file": "php-plain/profile.php",
|
|
363
|
+
"line": 10,
|
|
364
|
+
"why": "privileged field 'role' is written from request"
|
|
365
|
+
}
|
|
366
|
+
],
|
|
367
|
+
"impact": "Any user can set their own role to admin",
|
|
368
|
+
"severity": "critical",
|
|
369
|
+
"confidence": "high",
|
|
370
|
+
"cwe": [
|
|
371
|
+
"CWE-915"
|
|
372
|
+
],
|
|
373
|
+
"recommendation": "Copy only allowed fields (e.g., nickname) from the request and ignore role",
|
|
374
|
+
"status": "unverified"
|
|
375
|
+
},
|
|
376
|
+
{
|
|
377
|
+
"finding_id": "MASS-M-0012-1",
|
|
378
|
+
"category": "mass_assignment",
|
|
379
|
+
"subtype": "privileged_field_writable",
|
|
380
|
+
"title": "Privileged field 'role' writable in PHP profile.php",
|
|
381
|
+
"candidate_id": "M-0012",
|
|
382
|
+
"location": {
|
|
383
|
+
"file": "php-plain/profile.php",
|
|
384
|
+
"start_line": 5
|
|
385
|
+
},
|
|
386
|
+
"evidence": [
|
|
387
|
+
{
|
|
388
|
+
"file": "php-plain/profile.php",
|
|
389
|
+
"line": 10,
|
|
390
|
+
"why": "writes $_POST['role'] to user object \u2013 privileged field writable"
|
|
391
|
+
}
|
|
392
|
+
],
|
|
393
|
+
"impact": "Any user can set their own role to admin",
|
|
394
|
+
"severity": "critical",
|
|
395
|
+
"confidence": "high",
|
|
396
|
+
"cwe": [
|
|
397
|
+
"CWE-915"
|
|
398
|
+
],
|
|
399
|
+
"recommendation": "Remove role from the list of fields that can be updated by the user",
|
|
400
|
+
"status": "unverified"
|
|
401
|
+
},
|
|
402
|
+
{
|
|
403
|
+
"finding_id": "MASS-M-0001-1",
|
|
404
|
+
"category": "mass_assignment",
|
|
405
|
+
"subtype": "whole_object_binding",
|
|
406
|
+
"title": "Potential mass assignment in CustomerController Edit action",
|
|
407
|
+
"candidate_id": "M-0001",
|
|
408
|
+
"location": {
|
|
409
|
+
"file": "Web/Controllers/CustomerController.cs",
|
|
410
|
+
"start_line": 12
|
|
411
|
+
},
|
|
412
|
+
"evidence": [
|
|
413
|
+
{
|
|
414
|
+
"file": "Web/Controllers/CustomerController.cs",
|
|
415
|
+
"line": 12,
|
|
416
|
+
"why": "binds entire Customer object from request \u2013 potential whole object binding"
|
|
417
|
+
}
|
|
418
|
+
],
|
|
419
|
+
"impact": "Unknown \u2013 depends on Customer model fields",
|
|
420
|
+
"severity": "medium",
|
|
421
|
+
"confidence": "medium",
|
|
422
|
+
"cwe": [
|
|
423
|
+
"CWE-915"
|
|
424
|
+
],
|
|
425
|
+
"recommendation": "Review Customer model for privileged fields and add an allow\u2011list or explicit field copy",
|
|
426
|
+
"status": "needs_review"
|
|
427
|
+
},
|
|
428
|
+
{
|
|
429
|
+
"finding_id": "MASS-M-0002-1",
|
|
430
|
+
"category": "mass_assignment",
|
|
431
|
+
"subtype": "whole_object_binding",
|
|
432
|
+
"title": "Potential mass assignment in CustomerController Refresh action",
|
|
433
|
+
"candidate_id": "M-0002",
|
|
434
|
+
"location": {
|
|
435
|
+
"file": "Web/Controllers/CustomerController.cs",
|
|
436
|
+
"start_line": 26
|
|
437
|
+
},
|
|
438
|
+
"evidence": [
|
|
439
|
+
{
|
|
440
|
+
"file": "Web/Controllers/CustomerController.cs",
|
|
441
|
+
"line": 30,
|
|
442
|
+
"why": "TryUpdateModel binds all fields from request"
|
|
443
|
+
}
|
|
444
|
+
],
|
|
445
|
+
"impact": "Unknown \u2013 depends on Customer model fields",
|
|
446
|
+
"severity": "medium",
|
|
447
|
+
"confidence": "medium",
|
|
448
|
+
"cwe": [
|
|
449
|
+
"CWE-915"
|
|
450
|
+
],
|
|
451
|
+
"recommendation": "Review Customer model for privileged fields and add an allow\u2011list or explicit field copy",
|
|
452
|
+
"status": "needs_review"
|
|
453
|
+
},
|
|
454
|
+
{
|
|
455
|
+
"finding_id": "MASS-M-0003-1",
|
|
456
|
+
"category": "mass_assignment",
|
|
457
|
+
"subtype": "whole_object_binding",
|
|
458
|
+
"title": "Potential mass assignment in AccountController save action",
|
|
459
|
+
"candidate_id": "M-0003",
|
|
460
|
+
"location": {
|
|
461
|
+
"file": "com/acme/web/AccountController.java",
|
|
462
|
+
"start_line": 13
|
|
463
|
+
},
|
|
464
|
+
"evidence": [
|
|
465
|
+
{
|
|
466
|
+
"file": "com/acme/web/AccountController.java",
|
|
467
|
+
"line": 14,
|
|
468
|
+
"why": "binds entire Account object from request \u2013 potential whole object binding"
|
|
469
|
+
}
|
|
470
|
+
],
|
|
471
|
+
"impact": "Unknown \u2013 depends on Account model fields",
|
|
472
|
+
"severity": "medium",
|
|
473
|
+
"confidence": "medium",
|
|
474
|
+
"cwe": [
|
|
475
|
+
"CWE-915"
|
|
476
|
+
],
|
|
477
|
+
"recommendation": "Review Account model for privileged fields and add an allow\u2011list or explicit field copy",
|
|
478
|
+
"status": "needs_review"
|
|
479
|
+
},
|
|
480
|
+
{
|
|
481
|
+
"finding_id": "MASS-M-0004-1",
|
|
482
|
+
"category": "mass_assignment",
|
|
483
|
+
"subtype": "whole_object_binding",
|
|
484
|
+
"title": "Potential mass assignment in AccountController update action",
|
|
485
|
+
"candidate_id": "M-0004",
|
|
486
|
+
"location": {
|
|
487
|
+
"file": "com/acme/web/AccountController.java",
|
|
488
|
+
"start_line": 25
|
|
489
|
+
},
|
|
490
|
+
"evidence": [
|
|
491
|
+
{
|
|
492
|
+
"file": "com/acme/web/AccountController.java",
|
|
493
|
+
"line": 27,
|
|
494
|
+
"why": "binds entire Account object from request \u2013 potential whole object binding"
|
|
495
|
+
}
|
|
496
|
+
],
|
|
497
|
+
"impact": "Unknown \u2013 depends on Account model fields",
|
|
498
|
+
"severity": "medium",
|
|
499
|
+
"confidence": "medium",
|
|
500
|
+
"cwe": [
|
|
501
|
+
"CWE-915"
|
|
502
|
+
],
|
|
503
|
+
"recommendation": "Review Account model for privileged fields and add an allow\u2011list or explicit field copy",
|
|
504
|
+
"status": "needs_review"
|
|
505
|
+
},
|
|
506
|
+
{
|
|
507
|
+
"finding_id": "MASS-M-0005-1",
|
|
508
|
+
"category": "mass_assignment",
|
|
509
|
+
"subtype": "whole_object_binding",
|
|
510
|
+
"title": "Potential mass assignment in ProfileServlet using BeanUtils",
|
|
511
|
+
"candidate_id": "M-0005",
|
|
512
|
+
"location": {
|
|
513
|
+
"file": "com/acme/web/ProfileServlet.java",
|
|
514
|
+
"start_line": 10
|
|
515
|
+
},
|
|
516
|
+
"evidence": [
|
|
517
|
+
{
|
|
518
|
+
"file": "com/acme/web/ProfileServlet.java",
|
|
519
|
+
"line": 12,
|
|
520
|
+
"why": "BeanUtils.populate binds all request parameters to Account object"
|
|
521
|
+
}
|
|
522
|
+
],
|
|
523
|
+
"impact": "Unknown \u2013 depends on Account model fields",
|
|
524
|
+
"severity": "medium",
|
|
525
|
+
"confidence": "medium",
|
|
526
|
+
"cwe": [
|
|
527
|
+
"CWE-915"
|
|
528
|
+
],
|
|
529
|
+
"recommendation": "Review Account model for privileged fields and add an allow\u2011list or explicit field copy",
|
|
530
|
+
"status": "needs_review"
|
|
531
|
+
}
|
|
532
|
+
],
|
|
533
|
+
"privilege_route_verdicts": [
|
|
534
|
+
{
|
|
535
|
+
"route_id": "R-0003",
|
|
536
|
+
"verdict": "vulnerable"
|
|
537
|
+
},
|
|
538
|
+
{
|
|
539
|
+
"route_id": "R-0007",
|
|
540
|
+
"verdict": "vulnerable"
|
|
541
|
+
},
|
|
542
|
+
{
|
|
543
|
+
"route_id": "R-0009",
|
|
544
|
+
"verdict": "vulnerable"
|
|
545
|
+
},
|
|
546
|
+
{
|
|
547
|
+
"route_id": "R-0023",
|
|
548
|
+
"verdict": "vulnerable"
|
|
549
|
+
},
|
|
550
|
+
{
|
|
551
|
+
"route_id": "R-0030",
|
|
552
|
+
"verdict": "vulnerable"
|
|
553
|
+
},
|
|
554
|
+
{
|
|
555
|
+
"route_id": "R-0032",
|
|
556
|
+
"verdict": "vulnerable"
|
|
557
|
+
},
|
|
558
|
+
{
|
|
559
|
+
"route_id": "R-0057",
|
|
560
|
+
"verdict": "vulnerable"
|
|
561
|
+
},
|
|
562
|
+
{
|
|
563
|
+
"route_id": "R-0058",
|
|
564
|
+
"verdict": "vulnerable"
|
|
565
|
+
},
|
|
566
|
+
{
|
|
567
|
+
"route_id": "R-0066",
|
|
568
|
+
"verdict": "vulnerable"
|
|
569
|
+
},
|
|
570
|
+
{
|
|
571
|
+
"route_id": "R-0067",
|
|
572
|
+
"verdict": "vulnerable"
|
|
573
|
+
},
|
|
574
|
+
{
|
|
575
|
+
"route_id": "R-0059",
|
|
576
|
+
"verdict": "vulnerable"
|
|
577
|
+
},
|
|
578
|
+
{
|
|
579
|
+
"route_id": "R-0063",
|
|
580
|
+
"verdict": "not_privileged"
|
|
581
|
+
}
|
|
582
|
+
],
|
|
583
|
+
"candidate_verdicts": [
|
|
584
|
+
{
|
|
585
|
+
"candidate_id": "M-0011",
|
|
586
|
+
"verdict": "vulnerable"
|
|
587
|
+
},
|
|
588
|
+
{
|
|
589
|
+
"candidate_id": "M-0012",
|
|
590
|
+
"verdict": "vulnerable"
|
|
591
|
+
},
|
|
592
|
+
{
|
|
593
|
+
"candidate_id": "M-0001",
|
|
594
|
+
"verdict": "needs_review"
|
|
595
|
+
},
|
|
596
|
+
{
|
|
597
|
+
"candidate_id": "M-0002",
|
|
598
|
+
"verdict": "needs_review"
|
|
599
|
+
},
|
|
600
|
+
{
|
|
601
|
+
"candidate_id": "M-0003",
|
|
602
|
+
"verdict": "needs_review"
|
|
603
|
+
},
|
|
604
|
+
{
|
|
605
|
+
"candidate_id": "M-0004",
|
|
606
|
+
"verdict": "needs_review"
|
|
607
|
+
},
|
|
608
|
+
{
|
|
609
|
+
"candidate_id": "M-0005",
|
|
610
|
+
"verdict": "needs_review"
|
|
611
|
+
}
|
|
612
|
+
]
|
|
613
|
+
}
|