@hoanghainh/komagu 2.5.0 → 2.6.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 +17 -0
- package/assess/lsa/examples/eval-run-6/gptoss-a/ai-run-stats.json +87 -0
- package/assess/lsa/examples/eval-run-6/gptoss-a/auth-model.md +120 -0
- package/assess/lsa/examples/eval-run-6/gptoss-a/batches/index.json +60 -0
- package/assess/lsa/examples/eval-run-6/gptoss-a/batches/injection-001.json +383 -0
- package/assess/lsa/examples/eval-run-6/gptoss-a/batches/injection-002.json +205 -0
- package/assess/lsa/examples/eval-run-6/gptoss-a/batches/privilege-001.json +838 -0
- package/assess/lsa/examples/eval-run-6/gptoss-a/batches/privilege-002.json +124 -0
- package/assess/lsa/examples/eval-run-6/gptoss-a/batches/routes-001.json +778 -0
- package/assess/lsa/examples/eval-run-6/gptoss-a/batches/routes-002.json +546 -0
- package/assess/lsa/examples/eval-run-6/gptoss-a/batches/routes-003.json +661 -0
- package/assess/lsa/examples/eval-run-6/gptoss-a/batches/routes-004.json +659 -0
- package/assess/lsa/examples/eval-run-6/gptoss-a/batches/routes-005.json +612 -0
- package/assess/lsa/examples/eval-run-6/gptoss-a/batches/routes-006.json +106 -0
- package/assess/lsa/examples/eval-run-6/gptoss-a/coverage.json +19 -0
- package/assess/lsa/examples/eval-run-6/gptoss-a/findings/bola-routes-001.json +516 -0
- package/assess/lsa/examples/eval-run-6/gptoss-a/findings/bola-routes-002.json +332 -0
- package/assess/lsa/examples/eval-run-6/gptoss-a/findings/bola-routes-003.json +218 -0
- package/assess/lsa/examples/eval-run-6/gptoss-a/findings/bola-routes-004.json +561 -0
- package/assess/lsa/examples/eval-run-6/gptoss-a/findings/bola-routes-005.json +316 -0
- package/assess/lsa/examples/eval-run-6/gptoss-a/findings/bola-routes-006.json +14 -0
- package/assess/lsa/examples/eval-run-6/gptoss-a/findings/inj-injection-001.json +782 -0
- package/assess/lsa/examples/eval-run-6/gptoss-a/findings/inj-injection-002.json +418 -0
- package/assess/lsa/examples/eval-run-6/gptoss-a/findings/priv-privilege-001.json +627 -0
- package/assess/lsa/examples/eval-run-6/gptoss-a/findings/priv-privilege-002.json +253 -0
- package/assess/lsa/examples/eval-run-6/gptoss-a/findings/verified-1.json +68 -0
- package/assess/lsa/examples/eval-run-6/gptoss-a/findings/verified-10.json +68 -0
- package/assess/lsa/examples/eval-run-6/gptoss-a/findings/verified-11.json +61 -0
- package/assess/lsa/examples/eval-run-6/gptoss-a/findings/verified-12.json +60 -0
- package/assess/lsa/examples/eval-run-6/gptoss-a/findings/verified-13.json +60 -0
- package/assess/lsa/examples/eval-run-6/gptoss-a/findings/verified-14.json +66 -0
- package/assess/lsa/examples/eval-run-6/gptoss-a/findings/verified-15.json +69 -0
- package/assess/lsa/examples/eval-run-6/gptoss-a/findings/verified-16.json +60 -0
- package/assess/lsa/examples/eval-run-6/gptoss-a/findings/verified-17.json +61 -0
- package/assess/lsa/examples/eval-run-6/gptoss-a/findings/verified-18.json +69 -0
- package/assess/lsa/examples/eval-run-6/gptoss-a/findings/verified-19.json +64 -0
- package/assess/lsa/examples/eval-run-6/gptoss-a/findings/verified-2.json +60 -0
- package/assess/lsa/examples/eval-run-6/gptoss-a/findings/verified-20.json +60 -0
- package/assess/lsa/examples/eval-run-6/gptoss-a/findings/verified-21.json +61 -0
- package/assess/lsa/examples/eval-run-6/gptoss-a/findings/verified-22.json +50 -0
- package/assess/lsa/examples/eval-run-6/gptoss-a/findings/verified-3.json +60 -0
- package/assess/lsa/examples/eval-run-6/gptoss-a/findings/verified-4.json +60 -0
- package/assess/lsa/examples/eval-run-6/gptoss-a/findings/verified-5.json +60 -0
- package/assess/lsa/examples/eval-run-6/gptoss-a/findings/verified-6.json +70 -0
- package/assess/lsa/examples/eval-run-6/gptoss-a/findings/verified-7.json +60 -0
- package/assess/lsa/examples/eval-run-6/gptoss-a/findings/verified-8.json +60 -0
- package/assess/lsa/examples/eval-run-6/gptoss-a/findings/verified-9.json +60 -0
- package/assess/lsa/examples/eval-run-6/gptoss-a/findings.json +4857 -0
- package/assess/lsa/examples/eval-run-6/gptoss-a/mass-assignment.candidates.json +232 -0
- package/assess/lsa/examples/eval-run-6/gptoss-a/report.ja.md +2112 -0
- package/assess/lsa/examples/eval-run-6/gptoss-a/report.md +2112 -0
- package/assess/lsa/examples/eval-run-6/gptoss-a/routes/routes-001.json +425 -0
- package/assess/lsa/examples/eval-run-6/gptoss-a/routes/routes-002.json +333 -0
- package/assess/lsa/examples/eval-run-6/gptoss-a/routes/routes-003.json +400 -0
- package/assess/lsa/examples/eval-run-6/gptoss-a/routes/routes-004.json +403 -0
- package/assess/lsa/examples/eval-run-6/gptoss-a/routes/routes-005.json +398 -0
- package/assess/lsa/examples/eval-run-6/gptoss-a/routes/routes-006.json +63 -0
- package/assess/lsa/examples/eval-run-6/gptoss-a/score.json +82 -0
- package/assess/lsa/examples/eval-run-6/gptoss-a/stack-profile.json +225 -0
- package/assess/lsa/examples/eval-run-6/gptoss-b/ai-run-stats.json +91 -0
- package/assess/lsa/examples/eval-run-6/gptoss-b/auth-model.md +120 -0
- package/assess/lsa/examples/eval-run-6/gptoss-b/batches/index.json +60 -0
- package/assess/lsa/examples/eval-run-6/gptoss-b/batches/injection-001.json +383 -0
- package/assess/lsa/examples/eval-run-6/gptoss-b/batches/injection-002.json +205 -0
- package/assess/lsa/examples/eval-run-6/gptoss-b/batches/privilege-001.json +838 -0
- package/assess/lsa/examples/eval-run-6/gptoss-b/batches/privilege-002.json +124 -0
- package/assess/lsa/examples/eval-run-6/gptoss-b/batches/routes-001.json +778 -0
- package/assess/lsa/examples/eval-run-6/gptoss-b/batches/routes-002.json +546 -0
- package/assess/lsa/examples/eval-run-6/gptoss-b/batches/routes-003.json +661 -0
- package/assess/lsa/examples/eval-run-6/gptoss-b/batches/routes-004.json +659 -0
- package/assess/lsa/examples/eval-run-6/gptoss-b/batches/routes-005.json +612 -0
- package/assess/lsa/examples/eval-run-6/gptoss-b/batches/routes-006.json +106 -0
- package/assess/lsa/examples/eval-run-6/gptoss-b/coverage.json +21 -0
- package/assess/lsa/examples/eval-run-6/gptoss-b/findings/bola-routes-001.json +593 -0
- package/assess/lsa/examples/eval-run-6/gptoss-b/findings/bola-routes-002.json +367 -0
- package/assess/lsa/examples/eval-run-6/gptoss-b/findings/bola-routes-003.json +207 -0
- package/assess/lsa/examples/eval-run-6/gptoss-b/findings/bola-routes-004.json +477 -0
- package/assess/lsa/examples/eval-run-6/gptoss-b/findings/bola-routes-005.json +341 -0
- package/assess/lsa/examples/eval-run-6/gptoss-b/findings/bola-routes-006.json +14 -0
- package/assess/lsa/examples/eval-run-6/gptoss-b/findings/inj-injection-001.json +821 -0
- package/assess/lsa/examples/eval-run-6/gptoss-b/findings/inj-injection-002.json +410 -0
- package/assess/lsa/examples/eval-run-6/gptoss-b/findings/priv-privilege-001.json +649 -0
- package/assess/lsa/examples/eval-run-6/gptoss-b/findings/priv-privilege-002.json +222 -0
- package/assess/lsa/examples/eval-run-6/gptoss-b/findings/verified-1.json +60 -0
- package/assess/lsa/examples/eval-run-6/gptoss-b/findings/verified-10.json +67 -0
- package/assess/lsa/examples/eval-run-6/gptoss-b/findings/verified-11.json +68 -0
- package/assess/lsa/examples/eval-run-6/gptoss-b/findings/verified-12.json +60 -0
- package/assess/lsa/examples/eval-run-6/gptoss-b/findings/verified-13.json +60 -0
- package/assess/lsa/examples/eval-run-6/gptoss-b/findings/verified-14.json +64 -0
- package/assess/lsa/examples/eval-run-6/gptoss-b/findings/verified-15.json +70 -0
- package/assess/lsa/examples/eval-run-6/gptoss-b/findings/verified-16.json +60 -0
- package/assess/lsa/examples/eval-run-6/gptoss-b/findings/verified-17.json +61 -0
- package/assess/lsa/examples/eval-run-6/gptoss-b/findings/verified-18.json +60 -0
- package/assess/lsa/examples/eval-run-6/gptoss-b/findings/verified-19.json +65 -0
- package/assess/lsa/examples/eval-run-6/gptoss-b/findings/verified-2.json +60 -0
- package/assess/lsa/examples/eval-run-6/gptoss-b/findings/verified-20.json +60 -0
- package/assess/lsa/examples/eval-run-6/gptoss-b/findings/verified-21.json +62 -0
- package/assess/lsa/examples/eval-run-6/gptoss-b/findings/verified-22.json +50 -0
- package/assess/lsa/examples/eval-run-6/gptoss-b/findings/verified-3.json +60 -0
- package/assess/lsa/examples/eval-run-6/gptoss-b/findings/verified-4.json +60 -0
- package/assess/lsa/examples/eval-run-6/gptoss-b/findings/verified-5.json +60 -0
- package/assess/lsa/examples/eval-run-6/gptoss-b/findings/verified-6.json +60 -0
- package/assess/lsa/examples/eval-run-6/gptoss-b/findings/verified-7.json +64 -0
- package/assess/lsa/examples/eval-run-6/gptoss-b/findings/verified-8.json +60 -0
- package/assess/lsa/examples/eval-run-6/gptoss-b/findings/verified-9.json +60 -0
- package/assess/lsa/examples/eval-run-6/gptoss-b/findings.json +4966 -0
- package/assess/lsa/examples/eval-run-6/gptoss-b/mass-assignment.candidates.json +232 -0
- package/assess/lsa/examples/eval-run-6/gptoss-b/routes/routes-001.json +425 -0
- package/assess/lsa/examples/eval-run-6/gptoss-b/routes/routes-002.json +333 -0
- package/assess/lsa/examples/eval-run-6/gptoss-b/routes/routes-003.json +400 -0
- package/assess/lsa/examples/eval-run-6/gptoss-b/routes/routes-004.json +403 -0
- package/assess/lsa/examples/eval-run-6/gptoss-b/routes/routes-005.json +398 -0
- package/assess/lsa/examples/eval-run-6/gptoss-b/routes/routes-006.json +63 -0
- package/assess/lsa/examples/eval-run-6/gptoss-b/score.json +87 -0
- package/assess/lsa/examples/eval-run-6/gptoss-b/stack-profile.json +225 -0
- package/assess/lsa/examples/eval-run-6/ground-truth.json +851 -0
- package/assess/lsa/examples/eval-run-6/qwen-16k-nothink/ai-run-stats.json +96 -0
- package/assess/lsa/examples/eval-run-6/qwen-16k-nothink/auth-model.md +191 -0
- package/assess/lsa/examples/eval-run-6/qwen-16k-nothink/batches/index.json +60 -0
- package/assess/lsa/examples/eval-run-6/qwen-16k-nothink/batches/injection-001.json +383 -0
- package/assess/lsa/examples/eval-run-6/qwen-16k-nothink/batches/injection-002.json +205 -0
- package/assess/lsa/examples/eval-run-6/qwen-16k-nothink/batches/privilege-001.json +838 -0
- package/assess/lsa/examples/eval-run-6/qwen-16k-nothink/batches/privilege-002.json +124 -0
- package/assess/lsa/examples/eval-run-6/qwen-16k-nothink/batches/routes-001.json +778 -0
- package/assess/lsa/examples/eval-run-6/qwen-16k-nothink/batches/routes-002.json +546 -0
- package/assess/lsa/examples/eval-run-6/qwen-16k-nothink/batches/routes-003.json +661 -0
- package/assess/lsa/examples/eval-run-6/qwen-16k-nothink/batches/routes-004.json +659 -0
- package/assess/lsa/examples/eval-run-6/qwen-16k-nothink/batches/routes-005.json +612 -0
- package/assess/lsa/examples/eval-run-6/qwen-16k-nothink/batches/routes-006.json +106 -0
- package/assess/lsa/examples/eval-run-6/qwen-16k-nothink/coverage.json +31 -0
- package/assess/lsa/examples/eval-run-6/qwen-16k-nothink/findings/bola-routes-001.json +527 -0
- package/assess/lsa/examples/eval-run-6/qwen-16k-nothink/findings/bola-routes-002.json +568 -0
- package/assess/lsa/examples/eval-run-6/qwen-16k-nothink/findings/bola-routes-003.json +467 -0
- package/assess/lsa/examples/eval-run-6/qwen-16k-nothink/findings/bola-routes-004.json +342 -0
- package/assess/lsa/examples/eval-run-6/qwen-16k-nothink/findings/bola-routes-005.json +693 -0
- package/assess/lsa/examples/eval-run-6/qwen-16k-nothink/findings/bola-routes-006.json +16 -0
- package/assess/lsa/examples/eval-run-6/qwen-16k-nothink/findings/inj-injection-001.json +1123 -0
- package/assess/lsa/examples/eval-run-6/qwen-16k-nothink/findings/inj-injection-002.json +391 -0
- package/assess/lsa/examples/eval-run-6/qwen-16k-nothink/findings/priv-privilege-001.json +726 -0
- package/assess/lsa/examples/eval-run-6/qwen-16k-nothink/findings/priv-privilege-002.json +306 -0
- package/assess/lsa/examples/eval-run-6/qwen-16k-nothink/findings/verified-1.json +137 -0
- package/assess/lsa/examples/eval-run-6/qwen-16k-nothink/findings/verified-10.json +106 -0
- package/assess/lsa/examples/eval-run-6/qwen-16k-nothink/findings/verified-11.json +81 -0
- package/assess/lsa/examples/eval-run-6/qwen-16k-nothink/findings/verified-12.json +135 -0
- package/assess/lsa/examples/eval-run-6/qwen-16k-nothink/findings/verified-13.json +135 -0
- package/assess/lsa/examples/eval-run-6/qwen-16k-nothink/findings/verified-14.json +135 -0
- package/assess/lsa/examples/eval-run-6/qwen-16k-nothink/findings/verified-15.json +110 -0
- package/assess/lsa/examples/eval-run-6/qwen-16k-nothink/findings/verified-16.json +116 -0
- package/assess/lsa/examples/eval-run-6/qwen-16k-nothink/findings/verified-17.json +141 -0
- package/assess/lsa/examples/eval-run-6/qwen-16k-nothink/findings/verified-18.json +135 -0
- package/assess/lsa/examples/eval-run-6/qwen-16k-nothink/findings/verified-19.json +140 -0
- package/assess/lsa/examples/eval-run-6/qwen-16k-nothink/findings/verified-2.json +135 -0
- package/assess/lsa/examples/eval-run-6/qwen-16k-nothink/findings/verified-20.json +82 -0
- package/assess/lsa/examples/eval-run-6/qwen-16k-nothink/findings/verified-21.json +74 -0
- package/assess/lsa/examples/eval-run-6/qwen-16k-nothink/findings/verified-22.json +99 -0
- package/assess/lsa/examples/eval-run-6/qwen-16k-nothink/findings/verified-3.json +140 -0
- package/assess/lsa/examples/eval-run-6/qwen-16k-nothink/findings/verified-4.json +145 -0
- package/assess/lsa/examples/eval-run-6/qwen-16k-nothink/findings/verified-5.json +135 -0
- package/assess/lsa/examples/eval-run-6/qwen-16k-nothink/findings/verified-6.json +135 -0
- package/assess/lsa/examples/eval-run-6/qwen-16k-nothink/findings/verified-7.json +87 -0
- package/assess/lsa/examples/eval-run-6/qwen-16k-nothink/findings/verified-8.json +125 -0
- package/assess/lsa/examples/eval-run-6/qwen-16k-nothink/findings/verified-9.json +135 -0
- package/assess/lsa/examples/eval-run-6/qwen-16k-nothink/findings.json +6989 -0
- package/assess/lsa/examples/eval-run-6/qwen-16k-nothink/mass-assignment.candidates.json +232 -0
- package/assess/lsa/examples/eval-run-6/qwen-16k-nothink/memory.log +36 -0
- package/assess/lsa/examples/eval-run-6/qwen-16k-nothink/routes/routes-001.json +425 -0
- package/assess/lsa/examples/eval-run-6/qwen-16k-nothink/routes/routes-002.json +333 -0
- package/assess/lsa/examples/eval-run-6/qwen-16k-nothink/routes/routes-003.json +400 -0
- package/assess/lsa/examples/eval-run-6/qwen-16k-nothink/routes/routes-004.json +403 -0
- package/assess/lsa/examples/eval-run-6/qwen-16k-nothink/routes/routes-005.json +398 -0
- package/assess/lsa/examples/eval-run-6/qwen-16k-nothink/routes/routes-006.json +63 -0
- package/assess/lsa/examples/eval-run-6/qwen-16k-nothink/score.json +106 -0
- package/assess/lsa/examples/eval-run-6/qwen-16k-nothink/stack-profile.json +225 -0
- package/assess/lsa/examples/eval-run-6/qwen-16k-partial/auth-model.md +517 -0
- package/assess/lsa/examples/eval-run-6/qwen-16k-partial/findings/bola-routes-001.json +5 -0
- package/assess/lsa/examples/eval-run-6/qwen-16k-partial/findings/bola-routes-002.json +428 -0
- package/assess/lsa/examples/eval-run-6/qwen-16k-partial/findings/bola-routes-003.json +388 -0
- package/assess/lsa/examples/eval-run-6/qwen-16k-partial/findings/bola-routes-004.json +463 -0
- package/assess/lsa/examples/eval-run-6/qwen-16k-partial/findings/bola-routes-005.json +5 -0
- package/assess/lsa/examples/eval-run-6/qwen-16k-partial/findings/bola-routes-006.json +67 -0
- package/assess/lsa/examples/eval-run-6/qwen-16k-partial/findings/inj-injection-001.json +964 -0
- package/assess/lsa/examples/eval-run-6/qwen-16k-partial/findings.partial.json +1872 -0
- package/assess/lsa/examples/eval-run-6/qwen-16k-partial/memory.log +194 -0
- package/assess/lsa/examples/eval-run-6/qwen-16k-partial/score.partial.json +108 -0
- package/assess/lsa/examples/eval-run-6/qwen-16k-partial/stack-profile.json +225 -0
- package/assess/lsa/scripts/laravel_routes.py +102 -0
- package/assess/lsa/scripts/map_routes.py +4 -1
- package/assess/lsa/tests/EVAL-RESULTS.md +126 -0
- package/assess/lsa/tests/test_eval_run_6.py +104 -0
- package/assess/lsa/tests/test_laravel_routes.py +95 -0
- package/operate/ai/client.py +22 -9
- package/operate/ai/runner.py +4 -2
- package/operate/cli/__init__.py +1 -1
- package/operate/cli/commands/scan.py +8 -1
- package/operate/tests/test_ai_reasoning_effort.py +65 -0
- package/operate/tests/test_ai_route_inventory.py +53 -0
- package/package.json +1 -1
|
@@ -0,0 +1,428 @@
|
|
|
1
|
+
{
|
|
2
|
+
"batch_id": "routes-002",
|
|
3
|
+
"findings": [
|
|
4
|
+
{
|
|
5
|
+
"finding_id": "BOLA-R-0020-1",
|
|
6
|
+
"category": "bola",
|
|
7
|
+
"subtype": "missing_ownership_check",
|
|
8
|
+
"title": "Account save missing ownership verification",
|
|
9
|
+
"route_id": "R-0020",
|
|
10
|
+
"endpoint": {
|
|
11
|
+
"method": "POST",
|
|
12
|
+
"path": "/account/save"
|
|
13
|
+
},
|
|
14
|
+
"location": {
|
|
15
|
+
"file": "java-legacy/src/com/acme/web/AccountController.java",
|
|
16
|
+
"start_line": 13,
|
|
17
|
+
"end_line": 16
|
|
18
|
+
},
|
|
19
|
+
"evidence": [
|
|
20
|
+
{
|
|
21
|
+
"file": "java-legacy/src/com/acme/web/AccountController.java",
|
|
22
|
+
"line": 14,
|
|
23
|
+
"code": "public String save(@ModelAttribute Account account) {",
|
|
24
|
+
"why": "ID comes from request model binding (form/body), not verified against session user"
|
|
25
|
+
},
|
|
26
|
+
{
|
|
27
|
+
"file": "java-legacy/src/com/acme/web/AccountController.java",
|
|
28
|
+
"line": 15,
|
|
29
|
+
"code": "accountDao.save(account);",
|
|
30
|
+
"why": "No ownership check (e.g. WHERE user_id = ?) before save"
|
|
31
|
+
}
|
|
32
|
+
],
|
|
33
|
+
"attack_scenario": "User A sends POST /account/save with account.id set to User B's ID and modifies the data.",
|
|
34
|
+
"impact": "Modify another customer's account details (name, email, etc.).",
|
|
35
|
+
"severity": "high",
|
|
36
|
+
"confidence": "high",
|
|
37
|
+
"cwe": [
|
|
38
|
+
"CWE-639"
|
|
39
|
+
],
|
|
40
|
+
"owasp": [
|
|
41
|
+
"API1:2023"
|
|
42
|
+
],
|
|
43
|
+
"recommendation": "Add ownership verification in the DAO or controller to ensure the account belongs to the current user before saving.",
|
|
44
|
+
"status": "unverified",
|
|
45
|
+
"attack_vector": {
|
|
46
|
+
"target_param": "id"
|
|
47
|
+
}
|
|
48
|
+
},
|
|
49
|
+
{
|
|
50
|
+
"finding_id": "BOLA-R-0021-1",
|
|
51
|
+
"category": "bola",
|
|
52
|
+
"subtype": "missing_ownership_check",
|
|
53
|
+
"title": "Account rename missing ownership verification",
|
|
54
|
+
"route_id": "R-0021",
|
|
55
|
+
"endpoint": {
|
|
56
|
+
"method": "POST",
|
|
57
|
+
"path": "/account/rename"
|
|
58
|
+
},
|
|
59
|
+
"location": {
|
|
60
|
+
"file": "java-legacy/src/com/acme/web/AccountController.java",
|
|
61
|
+
"start_line": 19,
|
|
62
|
+
"end_line": 22
|
|
63
|
+
},
|
|
64
|
+
"evidence": [
|
|
65
|
+
{
|
|
66
|
+
"file": "java-legacy/src/com/acme/web/AccountController.java",
|
|
67
|
+
"line": 20,
|
|
68
|
+
"code": "public String rename(@ModelAttribute RenameForm form) {",
|
|
69
|
+
"why": "ID comes from request model binding (form), not verified against session user"
|
|
70
|
+
},
|
|
71
|
+
{
|
|
72
|
+
"file": "java-legacy/src/com/acme/web/AccountController.java",
|
|
73
|
+
"line": 21,
|
|
74
|
+
"code": "accountDao.rename(form.getId(), form.getName());",
|
|
75
|
+
"why": "No ownership check (e.g. WHERE user_id = ?) before rename"
|
|
76
|
+
}
|
|
77
|
+
],
|
|
78
|
+
"attack_scenario": "User A sends POST /account/rename with form.id set to User B's ID and a new name.",
|
|
79
|
+
"impact": "Modify another customer's account name.",
|
|
80
|
+
"severity": "high",
|
|
81
|
+
"confidence": "high",
|
|
82
|
+
"cwe": [
|
|
83
|
+
"CWE-639"
|
|
84
|
+
],
|
|
85
|
+
"owasp": [
|
|
86
|
+
"API1:2023"
|
|
87
|
+
],
|
|
88
|
+
"recommendation": "Add ownership verification in the DAO or controller to ensure the account belongs to the current user before renaming.",
|
|
89
|
+
"status": "unverified",
|
|
90
|
+
"attack_vector": {
|
|
91
|
+
"target_param": "id"
|
|
92
|
+
}
|
|
93
|
+
},
|
|
94
|
+
{
|
|
95
|
+
"finding_id": "BOLA-R-0022-1",
|
|
96
|
+
"category": "bola",
|
|
97
|
+
"subtype": "missing_ownership_check",
|
|
98
|
+
"title": "Account API update missing ownership verification",
|
|
99
|
+
"route_id": "R-0022",
|
|
100
|
+
"endpoint": {
|
|
101
|
+
"method": "PUT",
|
|
102
|
+
"path": "/account/api"
|
|
103
|
+
},
|
|
104
|
+
"location": {
|
|
105
|
+
"file": "java-legacy/src/com/acme/web/AccountController.java",
|
|
106
|
+
"start_line": 25,
|
|
107
|
+
"end_line": 28
|
|
108
|
+
},
|
|
109
|
+
"evidence": [
|
|
110
|
+
{
|
|
111
|
+
"file": "java-legacy/src/com/acme/web/AccountController.java",
|
|
112
|
+
"line": 26,
|
|
113
|
+
"code": "public Account update(@RequestBody Account account) {",
|
|
114
|
+
"why": "ID comes from request body, not verified against session user"
|
|
115
|
+
},
|
|
116
|
+
{
|
|
117
|
+
"file": "java-legacy/src/com/acme/web/AccountController.java",
|
|
118
|
+
"line": 27,
|
|
119
|
+
"code": "return accountDao.save(account);",
|
|
120
|
+
"why": "No ownership check (e.g. WHERE user_id = ?) before save"
|
|
121
|
+
}
|
|
122
|
+
],
|
|
123
|
+
"attack_scenario": "User A sends PUT /account/api with account.id set to User B's ID and modified data.",
|
|
124
|
+
"impact": "Modify another customer's account details via API.",
|
|
125
|
+
"severity": "high",
|
|
126
|
+
"confidence": "high",
|
|
127
|
+
"cwe": [
|
|
128
|
+
"CWE-639"
|
|
129
|
+
],
|
|
130
|
+
"owasp": [
|
|
131
|
+
"API1:2023"
|
|
132
|
+
],
|
|
133
|
+
"recommendation": "Add ownership verification in the DAO or controller to ensure the account belongs to the current user before saving.",
|
|
134
|
+
"status": "unverified",
|
|
135
|
+
"attack_vector": {
|
|
136
|
+
"target_param": "id"
|
|
137
|
+
}
|
|
138
|
+
},
|
|
139
|
+
{
|
|
140
|
+
"finding_id": "BOLA-R-0023-1",
|
|
141
|
+
"category": "bola",
|
|
142
|
+
"subtype": "missing_role_check",
|
|
143
|
+
"title": "Admin user delete missing role check",
|
|
144
|
+
"route_id": "R-0023",
|
|
145
|
+
"endpoint": {
|
|
146
|
+
"method": "POST",
|
|
147
|
+
"path": "/admin/users/{id}/delete"
|
|
148
|
+
},
|
|
149
|
+
"location": {
|
|
150
|
+
"file": "java-legacy/src/com/acme/web/AdminUserController.java",
|
|
151
|
+
"start_line": 13,
|
|
152
|
+
"end_line": 16
|
|
153
|
+
},
|
|
154
|
+
"evidence": [
|
|
155
|
+
{
|
|
156
|
+
"file": "java-legacy/src/com/acme/web/AdminUserController.java",
|
|
157
|
+
"line": 14,
|
|
158
|
+
"code": "public String delete(@PathVariable(\"id\") Long id) {",
|
|
159
|
+
"why": "No @PreAuthorize annotation restricting access to ADMIN role"
|
|
160
|
+
},
|
|
161
|
+
{
|
|
162
|
+
"file": "java-legacy/src/com/acme/web/AdminUserController.java",
|
|
163
|
+
"line": 15,
|
|
164
|
+
"code": "userDao.deleteById(id);",
|
|
165
|
+
"why": "Allows deletion of any user ID without verifying admin status or ownership"
|
|
166
|
+
}
|
|
167
|
+
],
|
|
168
|
+
"attack_scenario": "User A sends POST /admin/users/{id}/delete with User B's ID. If no role check, User A can delete User B.",
|
|
169
|
+
"impact": "Delete another user's account (Privilege Escalation / BOLA).",
|
|
170
|
+
"severity": "high",
|
|
171
|
+
"confidence": "high",
|
|
172
|
+
"cwe": [
|
|
173
|
+
"CWE-285"
|
|
174
|
+
],
|
|
175
|
+
"owasp": [
|
|
176
|
+
"API5:2023"
|
|
177
|
+
],
|
|
178
|
+
"recommendation": "Add @PreAuthorize(\"hasRole('ADMIN')\") to restrict access to authorized administrators only.",
|
|
179
|
+
"status": "unverified",
|
|
180
|
+
"attack_vector": {
|
|
181
|
+
"target_param": "id"
|
|
182
|
+
}
|
|
183
|
+
},
|
|
184
|
+
{
|
|
185
|
+
"finding_id": "BOLA-R-0025-1",
|
|
186
|
+
"category": "bola",
|
|
187
|
+
"subtype": "missing_ownership_check",
|
|
188
|
+
"title": "Invoice read missing ownership verification",
|
|
189
|
+
"route_id": "R-0025",
|
|
190
|
+
"endpoint": {
|
|
191
|
+
"method": "GET",
|
|
192
|
+
"path": "/invoices/{id}"
|
|
193
|
+
},
|
|
194
|
+
"location": {
|
|
195
|
+
"file": "java-legacy/src/com/acme/web/InvoiceController.java",
|
|
196
|
+
"start_line": 15,
|
|
197
|
+
"end_line": 18
|
|
198
|
+
},
|
|
199
|
+
"evidence": [
|
|
200
|
+
{
|
|
201
|
+
"file": "java-legacy/src/com/acme/web/InvoiceController.java",
|
|
202
|
+
"line": 16,
|
|
203
|
+
"code": "public String show(@PathVariable(\"id\") Long id, Model model) {",
|
|
204
|
+
"why": "ID comes from path parameter, not verified against session user"
|
|
205
|
+
},
|
|
206
|
+
{
|
|
207
|
+
"file": "java-legacy/src/com/acme/web/InvoiceController.java",
|
|
208
|
+
"line": 17,
|
|
209
|
+
"code": "model.addAttribute(\"invoice\", invoiceDao.findById(id));",
|
|
210
|
+
"why": "No ownership check (e.g. findByIdAndOwner) before returning data"
|
|
211
|
+
}
|
|
212
|
+
],
|
|
213
|
+
"attack_scenario": "User A sends GET /invoices/{id} with User B's Invoice ID.",
|
|
214
|
+
"impact": "Read another customer's invoice details (amount, items, etc.).",
|
|
215
|
+
"severity": "high",
|
|
216
|
+
"confidence": "high",
|
|
217
|
+
"cwe": [
|
|
218
|
+
"CWE-639"
|
|
219
|
+
],
|
|
220
|
+
"owasp": [
|
|
221
|
+
"API1:2023"
|
|
222
|
+
],
|
|
223
|
+
"recommendation": "Add ownership verification in the DAO or controller to ensure the invoice belongs to the current user before returning data.",
|
|
224
|
+
"status": "unverified",
|
|
225
|
+
"attack_vector": {
|
|
226
|
+
"target_param": "id"
|
|
227
|
+
}
|
|
228
|
+
},
|
|
229
|
+
{
|
|
230
|
+
"finding_id": "BOLA-R-0028-1",
|
|
231
|
+
"category": "bola",
|
|
232
|
+
"subtype": "missing_ownership_check",
|
|
233
|
+
"title": "Order view missing ownership verification",
|
|
234
|
+
"route_id": "R-0028",
|
|
235
|
+
"endpoint": {
|
|
236
|
+
"method": "GET",
|
|
237
|
+
"path": "/order/view"
|
|
238
|
+
},
|
|
239
|
+
"location": {
|
|
240
|
+
"file": "java-legacy/src/com/acme/web/OrderServlet.java",
|
|
241
|
+
"start_line": 8,
|
|
242
|
+
"end_line": 21
|
|
243
|
+
},
|
|
244
|
+
"evidence": [
|
|
245
|
+
{
|
|
246
|
+
"file": "java-legacy/src/com/acme/web/OrderServlet.java",
|
|
247
|
+
"line": 11,
|
|
248
|
+
"code": "String id = request.getParameter(\"orderId\");",
|
|
249
|
+
"why": "ID comes from query parameter (request-controlled)"
|
|
250
|
+
},
|
|
251
|
+
{
|
|
252
|
+
"file": "java-legacy/src/com/acme/web/OrderServlet.java",
|
|
253
|
+
"line": 15,
|
|
254
|
+
"code": "ResultSet rs = stmt.executeQuery(\"SELECT * FROM orders WHERE id = '\" + id + \"'\");",
|
|
255
|
+
"why": "No ownership check (e.g. AND user_id = ?) in SQL query"
|
|
256
|
+
}
|
|
257
|
+
],
|
|
258
|
+
"attack_scenario": "User A sends GET /order/view?orderId=<User B's Order ID>.",
|
|
259
|
+
"impact": "Read another customer's order details (items, address, etc.).",
|
|
260
|
+
"severity": "high",
|
|
261
|
+
"confidence": "high",
|
|
262
|
+
"cwe": [
|
|
263
|
+
"CWE-639"
|
|
264
|
+
],
|
|
265
|
+
"owasp": [
|
|
266
|
+
"API1:2023"
|
|
267
|
+
],
|
|
268
|
+
"recommendation": "Add ownership verification in the query to ensure the order belongs to the current user before returning data.",
|
|
269
|
+
"status": "unverified",
|
|
270
|
+
"attack_vector": {
|
|
271
|
+
"target_param": "orderId"
|
|
272
|
+
}
|
|
273
|
+
},
|
|
274
|
+
{
|
|
275
|
+
"finding_id": "BOLA-R-0030-1",
|
|
276
|
+
"category": "bola",
|
|
277
|
+
"subtype": "missing_role_check",
|
|
278
|
+
"title": "Admin user delete missing role check",
|
|
279
|
+
"route_id": "R-0030",
|
|
280
|
+
"endpoint": {
|
|
281
|
+
"method": "POST",
|
|
282
|
+
"path": "/admin/users/:id/delete"
|
|
283
|
+
},
|
|
284
|
+
"location": {
|
|
285
|
+
"file": "node-express/routes/admin.js",
|
|
286
|
+
"start_line": 8,
|
|
287
|
+
"end_line": 10
|
|
288
|
+
},
|
|
289
|
+
"evidence": [
|
|
290
|
+
{
|
|
291
|
+
"file": "node-express/routes/admin.js",
|
|
292
|
+
"line": 9,
|
|
293
|
+
"code": "User.deleteOne({ _id: req.params.id }, function () { res.sendStatus(204); });",
|
|
294
|
+
"why": "No role check (e.g. requireAdmin) before deletion"
|
|
295
|
+
}
|
|
296
|
+
],
|
|
297
|
+
"attack_scenario": "User A sends POST /admin/users/:id/delete with User B's ID. If no role check, User A can delete User B.",
|
|
298
|
+
"impact": "Delete another user's account (Privilege Escalation / BOLA).",
|
|
299
|
+
"severity": "high",
|
|
300
|
+
"confidence": "high",
|
|
301
|
+
"cwe": [
|
|
302
|
+
"CWE-285"
|
|
303
|
+
],
|
|
304
|
+
"owasp": [
|
|
305
|
+
"API5:2023"
|
|
306
|
+
],
|
|
307
|
+
"recommendation": "Add role check middleware (e.g. requireAdmin) to restrict access to authorized administrators only.",
|
|
308
|
+
"status": "unverified",
|
|
309
|
+
"attack_vector": {
|
|
310
|
+
"target_param": "id"
|
|
311
|
+
}
|
|
312
|
+
},
|
|
313
|
+
{
|
|
314
|
+
"finding_id": "BOLA-R-0032-1",
|
|
315
|
+
"category": "bola",
|
|
316
|
+
"subtype": "missing_role_check",
|
|
317
|
+
"title": "Report export missing role check",
|
|
318
|
+
"route_id": "R-0032",
|
|
319
|
+
"endpoint": {
|
|
320
|
+
"method": "GET",
|
|
321
|
+
"path": "/reports/export"
|
|
322
|
+
},
|
|
323
|
+
"location": {
|
|
324
|
+
"file": "node-express/routes/admin.js",
|
|
325
|
+
"start_line": 16,
|
|
326
|
+
"end_line": 18
|
|
327
|
+
},
|
|
328
|
+
"evidence": [
|
|
329
|
+
{
|
|
330
|
+
"file": "node-express/routes/admin.js",
|
|
331
|
+
"line": 17,
|
|
332
|
+
"code": "if (req.query.isAdmin === 'true') { res.json([]); }",
|
|
333
|
+
"why": "Only checks query param for isAdmin, does not verify user role"
|
|
334
|
+
}
|
|
335
|
+
],
|
|
336
|
+
"attack_scenario": "User A sends GET /reports/export?isAdmin=false. If no role check, User A can export all data.",
|
|
337
|
+
"impact": "Export all users' data (including other customers).",
|
|
338
|
+
"severity": "high",
|
|
339
|
+
"confidence": "high",
|
|
340
|
+
"cwe": [
|
|
341
|
+
"CWE-285"
|
|
342
|
+
],
|
|
343
|
+
"owasp": [
|
|
344
|
+
"API5:2023"
|
|
345
|
+
],
|
|
346
|
+
"recommendation": "Add role check middleware (e.g. requireAdmin) to restrict access to authorized administrators only.",
|
|
347
|
+
"status": "unverified"
|
|
348
|
+
}
|
|
349
|
+
],
|
|
350
|
+
"route_verdicts": [
|
|
351
|
+
{
|
|
352
|
+
"route_id": "R-0020",
|
|
353
|
+
"verdict": "vulnerable",
|
|
354
|
+
"finding_ids": [
|
|
355
|
+
"BOLA-R-0020-1"
|
|
356
|
+
]
|
|
357
|
+
},
|
|
358
|
+
{
|
|
359
|
+
"route_id": "R-0021",
|
|
360
|
+
"verdict": "vulnerable",
|
|
361
|
+
"finding_ids": [
|
|
362
|
+
"BOLA-R-0021-1"
|
|
363
|
+
]
|
|
364
|
+
},
|
|
365
|
+
{
|
|
366
|
+
"route_id": "R-0022",
|
|
367
|
+
"verdict": "vulnerable",
|
|
368
|
+
"finding_ids": [
|
|
369
|
+
"BOLA-R-0022-1"
|
|
370
|
+
]
|
|
371
|
+
},
|
|
372
|
+
{
|
|
373
|
+
"route_id": "R-0023",
|
|
374
|
+
"verdict": "vulnerable",
|
|
375
|
+
"finding_ids": [
|
|
376
|
+
"BOLA-R-0023-1"
|
|
377
|
+
]
|
|
378
|
+
},
|
|
379
|
+
{
|
|
380
|
+
"route_id": "R-0024",
|
|
381
|
+
"verdict": "safe",
|
|
382
|
+
"reason": "Method has @PreAuthorize(\"hasRole('ADMIN')\") restricting access to admins only."
|
|
383
|
+
},
|
|
384
|
+
{
|
|
385
|
+
"route_id": "R-0025",
|
|
386
|
+
"verdict": "vulnerable",
|
|
387
|
+
"finding_ids": [
|
|
388
|
+
"BOLA-R-0025-1"
|
|
389
|
+
]
|
|
390
|
+
},
|
|
391
|
+
{
|
|
392
|
+
"route_id": "R-0026",
|
|
393
|
+
"verdict": "safe",
|
|
394
|
+
"reason": "Method uses findByIdAndOwner(id, principal.getName()) which binds ID to session user."
|
|
395
|
+
},
|
|
396
|
+
{
|
|
397
|
+
"route_id": "R-0027",
|
|
398
|
+
"verdict": "not_applicable",
|
|
399
|
+
"reason": "Search endpoint with free-text filter, no specific object identifier for BOLA/IDOR check."
|
|
400
|
+
},
|
|
401
|
+
{
|
|
402
|
+
"route_id": "R-0028",
|
|
403
|
+
"verdict": "vulnerable",
|
|
404
|
+
"finding_ids": [
|
|
405
|
+
"BOLA-R-0028-1"
|
|
406
|
+
]
|
|
407
|
+
},
|
|
408
|
+
{
|
|
409
|
+
"route_id": "R-0030",
|
|
410
|
+
"verdict": "vulnerable",
|
|
411
|
+
"finding_ids": [
|
|
412
|
+
"BOLA-R-0030-1"
|
|
413
|
+
]
|
|
414
|
+
},
|
|
415
|
+
{
|
|
416
|
+
"route_id": "R-0031",
|
|
417
|
+
"verdict": "safe",
|
|
418
|
+
"reason": "Method has requireAdmin middleware restricting access to admins only."
|
|
419
|
+
},
|
|
420
|
+
{
|
|
421
|
+
"route_id": "R-0032",
|
|
422
|
+
"verdict": "vulnerable",
|
|
423
|
+
"finding_ids": [
|
|
424
|
+
"BOLA-R-0032-1"
|
|
425
|
+
]
|
|
426
|
+
}
|
|
427
|
+
]
|
|
428
|
+
}
|