@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.
Files changed (197) hide show
  1. package/CHANGELOG.md +17 -0
  2. package/assess/lsa/examples/eval-run-6/gptoss-a/ai-run-stats.json +87 -0
  3. package/assess/lsa/examples/eval-run-6/gptoss-a/auth-model.md +120 -0
  4. package/assess/lsa/examples/eval-run-6/gptoss-a/batches/index.json +60 -0
  5. package/assess/lsa/examples/eval-run-6/gptoss-a/batches/injection-001.json +383 -0
  6. package/assess/lsa/examples/eval-run-6/gptoss-a/batches/injection-002.json +205 -0
  7. package/assess/lsa/examples/eval-run-6/gptoss-a/batches/privilege-001.json +838 -0
  8. package/assess/lsa/examples/eval-run-6/gptoss-a/batches/privilege-002.json +124 -0
  9. package/assess/lsa/examples/eval-run-6/gptoss-a/batches/routes-001.json +778 -0
  10. package/assess/lsa/examples/eval-run-6/gptoss-a/batches/routes-002.json +546 -0
  11. package/assess/lsa/examples/eval-run-6/gptoss-a/batches/routes-003.json +661 -0
  12. package/assess/lsa/examples/eval-run-6/gptoss-a/batches/routes-004.json +659 -0
  13. package/assess/lsa/examples/eval-run-6/gptoss-a/batches/routes-005.json +612 -0
  14. package/assess/lsa/examples/eval-run-6/gptoss-a/batches/routes-006.json +106 -0
  15. package/assess/lsa/examples/eval-run-6/gptoss-a/coverage.json +19 -0
  16. package/assess/lsa/examples/eval-run-6/gptoss-a/findings/bola-routes-001.json +516 -0
  17. package/assess/lsa/examples/eval-run-6/gptoss-a/findings/bola-routes-002.json +332 -0
  18. package/assess/lsa/examples/eval-run-6/gptoss-a/findings/bola-routes-003.json +218 -0
  19. package/assess/lsa/examples/eval-run-6/gptoss-a/findings/bola-routes-004.json +561 -0
  20. package/assess/lsa/examples/eval-run-6/gptoss-a/findings/bola-routes-005.json +316 -0
  21. package/assess/lsa/examples/eval-run-6/gptoss-a/findings/bola-routes-006.json +14 -0
  22. package/assess/lsa/examples/eval-run-6/gptoss-a/findings/inj-injection-001.json +782 -0
  23. package/assess/lsa/examples/eval-run-6/gptoss-a/findings/inj-injection-002.json +418 -0
  24. package/assess/lsa/examples/eval-run-6/gptoss-a/findings/priv-privilege-001.json +627 -0
  25. package/assess/lsa/examples/eval-run-6/gptoss-a/findings/priv-privilege-002.json +253 -0
  26. package/assess/lsa/examples/eval-run-6/gptoss-a/findings/verified-1.json +68 -0
  27. package/assess/lsa/examples/eval-run-6/gptoss-a/findings/verified-10.json +68 -0
  28. package/assess/lsa/examples/eval-run-6/gptoss-a/findings/verified-11.json +61 -0
  29. package/assess/lsa/examples/eval-run-6/gptoss-a/findings/verified-12.json +60 -0
  30. package/assess/lsa/examples/eval-run-6/gptoss-a/findings/verified-13.json +60 -0
  31. package/assess/lsa/examples/eval-run-6/gptoss-a/findings/verified-14.json +66 -0
  32. package/assess/lsa/examples/eval-run-6/gptoss-a/findings/verified-15.json +69 -0
  33. package/assess/lsa/examples/eval-run-6/gptoss-a/findings/verified-16.json +60 -0
  34. package/assess/lsa/examples/eval-run-6/gptoss-a/findings/verified-17.json +61 -0
  35. package/assess/lsa/examples/eval-run-6/gptoss-a/findings/verified-18.json +69 -0
  36. package/assess/lsa/examples/eval-run-6/gptoss-a/findings/verified-19.json +64 -0
  37. package/assess/lsa/examples/eval-run-6/gptoss-a/findings/verified-2.json +60 -0
  38. package/assess/lsa/examples/eval-run-6/gptoss-a/findings/verified-20.json +60 -0
  39. package/assess/lsa/examples/eval-run-6/gptoss-a/findings/verified-21.json +61 -0
  40. package/assess/lsa/examples/eval-run-6/gptoss-a/findings/verified-22.json +50 -0
  41. package/assess/lsa/examples/eval-run-6/gptoss-a/findings/verified-3.json +60 -0
  42. package/assess/lsa/examples/eval-run-6/gptoss-a/findings/verified-4.json +60 -0
  43. package/assess/lsa/examples/eval-run-6/gptoss-a/findings/verified-5.json +60 -0
  44. package/assess/lsa/examples/eval-run-6/gptoss-a/findings/verified-6.json +70 -0
  45. package/assess/lsa/examples/eval-run-6/gptoss-a/findings/verified-7.json +60 -0
  46. package/assess/lsa/examples/eval-run-6/gptoss-a/findings/verified-8.json +60 -0
  47. package/assess/lsa/examples/eval-run-6/gptoss-a/findings/verified-9.json +60 -0
  48. package/assess/lsa/examples/eval-run-6/gptoss-a/findings.json +4857 -0
  49. package/assess/lsa/examples/eval-run-6/gptoss-a/mass-assignment.candidates.json +232 -0
  50. package/assess/lsa/examples/eval-run-6/gptoss-a/report.ja.md +2112 -0
  51. package/assess/lsa/examples/eval-run-6/gptoss-a/report.md +2112 -0
  52. package/assess/lsa/examples/eval-run-6/gptoss-a/routes/routes-001.json +425 -0
  53. package/assess/lsa/examples/eval-run-6/gptoss-a/routes/routes-002.json +333 -0
  54. package/assess/lsa/examples/eval-run-6/gptoss-a/routes/routes-003.json +400 -0
  55. package/assess/lsa/examples/eval-run-6/gptoss-a/routes/routes-004.json +403 -0
  56. package/assess/lsa/examples/eval-run-6/gptoss-a/routes/routes-005.json +398 -0
  57. package/assess/lsa/examples/eval-run-6/gptoss-a/routes/routes-006.json +63 -0
  58. package/assess/lsa/examples/eval-run-6/gptoss-a/score.json +82 -0
  59. package/assess/lsa/examples/eval-run-6/gptoss-a/stack-profile.json +225 -0
  60. package/assess/lsa/examples/eval-run-6/gptoss-b/ai-run-stats.json +91 -0
  61. package/assess/lsa/examples/eval-run-6/gptoss-b/auth-model.md +120 -0
  62. package/assess/lsa/examples/eval-run-6/gptoss-b/batches/index.json +60 -0
  63. package/assess/lsa/examples/eval-run-6/gptoss-b/batches/injection-001.json +383 -0
  64. package/assess/lsa/examples/eval-run-6/gptoss-b/batches/injection-002.json +205 -0
  65. package/assess/lsa/examples/eval-run-6/gptoss-b/batches/privilege-001.json +838 -0
  66. package/assess/lsa/examples/eval-run-6/gptoss-b/batches/privilege-002.json +124 -0
  67. package/assess/lsa/examples/eval-run-6/gptoss-b/batches/routes-001.json +778 -0
  68. package/assess/lsa/examples/eval-run-6/gptoss-b/batches/routes-002.json +546 -0
  69. package/assess/lsa/examples/eval-run-6/gptoss-b/batches/routes-003.json +661 -0
  70. package/assess/lsa/examples/eval-run-6/gptoss-b/batches/routes-004.json +659 -0
  71. package/assess/lsa/examples/eval-run-6/gptoss-b/batches/routes-005.json +612 -0
  72. package/assess/lsa/examples/eval-run-6/gptoss-b/batches/routes-006.json +106 -0
  73. package/assess/lsa/examples/eval-run-6/gptoss-b/coverage.json +21 -0
  74. package/assess/lsa/examples/eval-run-6/gptoss-b/findings/bola-routes-001.json +593 -0
  75. package/assess/lsa/examples/eval-run-6/gptoss-b/findings/bola-routes-002.json +367 -0
  76. package/assess/lsa/examples/eval-run-6/gptoss-b/findings/bola-routes-003.json +207 -0
  77. package/assess/lsa/examples/eval-run-6/gptoss-b/findings/bola-routes-004.json +477 -0
  78. package/assess/lsa/examples/eval-run-6/gptoss-b/findings/bola-routes-005.json +341 -0
  79. package/assess/lsa/examples/eval-run-6/gptoss-b/findings/bola-routes-006.json +14 -0
  80. package/assess/lsa/examples/eval-run-6/gptoss-b/findings/inj-injection-001.json +821 -0
  81. package/assess/lsa/examples/eval-run-6/gptoss-b/findings/inj-injection-002.json +410 -0
  82. package/assess/lsa/examples/eval-run-6/gptoss-b/findings/priv-privilege-001.json +649 -0
  83. package/assess/lsa/examples/eval-run-6/gptoss-b/findings/priv-privilege-002.json +222 -0
  84. package/assess/lsa/examples/eval-run-6/gptoss-b/findings/verified-1.json +60 -0
  85. package/assess/lsa/examples/eval-run-6/gptoss-b/findings/verified-10.json +67 -0
  86. package/assess/lsa/examples/eval-run-6/gptoss-b/findings/verified-11.json +68 -0
  87. package/assess/lsa/examples/eval-run-6/gptoss-b/findings/verified-12.json +60 -0
  88. package/assess/lsa/examples/eval-run-6/gptoss-b/findings/verified-13.json +60 -0
  89. package/assess/lsa/examples/eval-run-6/gptoss-b/findings/verified-14.json +64 -0
  90. package/assess/lsa/examples/eval-run-6/gptoss-b/findings/verified-15.json +70 -0
  91. package/assess/lsa/examples/eval-run-6/gptoss-b/findings/verified-16.json +60 -0
  92. package/assess/lsa/examples/eval-run-6/gptoss-b/findings/verified-17.json +61 -0
  93. package/assess/lsa/examples/eval-run-6/gptoss-b/findings/verified-18.json +60 -0
  94. package/assess/lsa/examples/eval-run-6/gptoss-b/findings/verified-19.json +65 -0
  95. package/assess/lsa/examples/eval-run-6/gptoss-b/findings/verified-2.json +60 -0
  96. package/assess/lsa/examples/eval-run-6/gptoss-b/findings/verified-20.json +60 -0
  97. package/assess/lsa/examples/eval-run-6/gptoss-b/findings/verified-21.json +62 -0
  98. package/assess/lsa/examples/eval-run-6/gptoss-b/findings/verified-22.json +50 -0
  99. package/assess/lsa/examples/eval-run-6/gptoss-b/findings/verified-3.json +60 -0
  100. package/assess/lsa/examples/eval-run-6/gptoss-b/findings/verified-4.json +60 -0
  101. package/assess/lsa/examples/eval-run-6/gptoss-b/findings/verified-5.json +60 -0
  102. package/assess/lsa/examples/eval-run-6/gptoss-b/findings/verified-6.json +60 -0
  103. package/assess/lsa/examples/eval-run-6/gptoss-b/findings/verified-7.json +64 -0
  104. package/assess/lsa/examples/eval-run-6/gptoss-b/findings/verified-8.json +60 -0
  105. package/assess/lsa/examples/eval-run-6/gptoss-b/findings/verified-9.json +60 -0
  106. package/assess/lsa/examples/eval-run-6/gptoss-b/findings.json +4966 -0
  107. package/assess/lsa/examples/eval-run-6/gptoss-b/mass-assignment.candidates.json +232 -0
  108. package/assess/lsa/examples/eval-run-6/gptoss-b/routes/routes-001.json +425 -0
  109. package/assess/lsa/examples/eval-run-6/gptoss-b/routes/routes-002.json +333 -0
  110. package/assess/lsa/examples/eval-run-6/gptoss-b/routes/routes-003.json +400 -0
  111. package/assess/lsa/examples/eval-run-6/gptoss-b/routes/routes-004.json +403 -0
  112. package/assess/lsa/examples/eval-run-6/gptoss-b/routes/routes-005.json +398 -0
  113. package/assess/lsa/examples/eval-run-6/gptoss-b/routes/routes-006.json +63 -0
  114. package/assess/lsa/examples/eval-run-6/gptoss-b/score.json +87 -0
  115. package/assess/lsa/examples/eval-run-6/gptoss-b/stack-profile.json +225 -0
  116. package/assess/lsa/examples/eval-run-6/ground-truth.json +851 -0
  117. package/assess/lsa/examples/eval-run-6/qwen-16k-nothink/ai-run-stats.json +96 -0
  118. package/assess/lsa/examples/eval-run-6/qwen-16k-nothink/auth-model.md +191 -0
  119. package/assess/lsa/examples/eval-run-6/qwen-16k-nothink/batches/index.json +60 -0
  120. package/assess/lsa/examples/eval-run-6/qwen-16k-nothink/batches/injection-001.json +383 -0
  121. package/assess/lsa/examples/eval-run-6/qwen-16k-nothink/batches/injection-002.json +205 -0
  122. package/assess/lsa/examples/eval-run-6/qwen-16k-nothink/batches/privilege-001.json +838 -0
  123. package/assess/lsa/examples/eval-run-6/qwen-16k-nothink/batches/privilege-002.json +124 -0
  124. package/assess/lsa/examples/eval-run-6/qwen-16k-nothink/batches/routes-001.json +778 -0
  125. package/assess/lsa/examples/eval-run-6/qwen-16k-nothink/batches/routes-002.json +546 -0
  126. package/assess/lsa/examples/eval-run-6/qwen-16k-nothink/batches/routes-003.json +661 -0
  127. package/assess/lsa/examples/eval-run-6/qwen-16k-nothink/batches/routes-004.json +659 -0
  128. package/assess/lsa/examples/eval-run-6/qwen-16k-nothink/batches/routes-005.json +612 -0
  129. package/assess/lsa/examples/eval-run-6/qwen-16k-nothink/batches/routes-006.json +106 -0
  130. package/assess/lsa/examples/eval-run-6/qwen-16k-nothink/coverage.json +31 -0
  131. package/assess/lsa/examples/eval-run-6/qwen-16k-nothink/findings/bola-routes-001.json +527 -0
  132. package/assess/lsa/examples/eval-run-6/qwen-16k-nothink/findings/bola-routes-002.json +568 -0
  133. package/assess/lsa/examples/eval-run-6/qwen-16k-nothink/findings/bola-routes-003.json +467 -0
  134. package/assess/lsa/examples/eval-run-6/qwen-16k-nothink/findings/bola-routes-004.json +342 -0
  135. package/assess/lsa/examples/eval-run-6/qwen-16k-nothink/findings/bola-routes-005.json +693 -0
  136. package/assess/lsa/examples/eval-run-6/qwen-16k-nothink/findings/bola-routes-006.json +16 -0
  137. package/assess/lsa/examples/eval-run-6/qwen-16k-nothink/findings/inj-injection-001.json +1123 -0
  138. package/assess/lsa/examples/eval-run-6/qwen-16k-nothink/findings/inj-injection-002.json +391 -0
  139. package/assess/lsa/examples/eval-run-6/qwen-16k-nothink/findings/priv-privilege-001.json +726 -0
  140. package/assess/lsa/examples/eval-run-6/qwen-16k-nothink/findings/priv-privilege-002.json +306 -0
  141. package/assess/lsa/examples/eval-run-6/qwen-16k-nothink/findings/verified-1.json +137 -0
  142. package/assess/lsa/examples/eval-run-6/qwen-16k-nothink/findings/verified-10.json +106 -0
  143. package/assess/lsa/examples/eval-run-6/qwen-16k-nothink/findings/verified-11.json +81 -0
  144. package/assess/lsa/examples/eval-run-6/qwen-16k-nothink/findings/verified-12.json +135 -0
  145. package/assess/lsa/examples/eval-run-6/qwen-16k-nothink/findings/verified-13.json +135 -0
  146. package/assess/lsa/examples/eval-run-6/qwen-16k-nothink/findings/verified-14.json +135 -0
  147. package/assess/lsa/examples/eval-run-6/qwen-16k-nothink/findings/verified-15.json +110 -0
  148. package/assess/lsa/examples/eval-run-6/qwen-16k-nothink/findings/verified-16.json +116 -0
  149. package/assess/lsa/examples/eval-run-6/qwen-16k-nothink/findings/verified-17.json +141 -0
  150. package/assess/lsa/examples/eval-run-6/qwen-16k-nothink/findings/verified-18.json +135 -0
  151. package/assess/lsa/examples/eval-run-6/qwen-16k-nothink/findings/verified-19.json +140 -0
  152. package/assess/lsa/examples/eval-run-6/qwen-16k-nothink/findings/verified-2.json +135 -0
  153. package/assess/lsa/examples/eval-run-6/qwen-16k-nothink/findings/verified-20.json +82 -0
  154. package/assess/lsa/examples/eval-run-6/qwen-16k-nothink/findings/verified-21.json +74 -0
  155. package/assess/lsa/examples/eval-run-6/qwen-16k-nothink/findings/verified-22.json +99 -0
  156. package/assess/lsa/examples/eval-run-6/qwen-16k-nothink/findings/verified-3.json +140 -0
  157. package/assess/lsa/examples/eval-run-6/qwen-16k-nothink/findings/verified-4.json +145 -0
  158. package/assess/lsa/examples/eval-run-6/qwen-16k-nothink/findings/verified-5.json +135 -0
  159. package/assess/lsa/examples/eval-run-6/qwen-16k-nothink/findings/verified-6.json +135 -0
  160. package/assess/lsa/examples/eval-run-6/qwen-16k-nothink/findings/verified-7.json +87 -0
  161. package/assess/lsa/examples/eval-run-6/qwen-16k-nothink/findings/verified-8.json +125 -0
  162. package/assess/lsa/examples/eval-run-6/qwen-16k-nothink/findings/verified-9.json +135 -0
  163. package/assess/lsa/examples/eval-run-6/qwen-16k-nothink/findings.json +6989 -0
  164. package/assess/lsa/examples/eval-run-6/qwen-16k-nothink/mass-assignment.candidates.json +232 -0
  165. package/assess/lsa/examples/eval-run-6/qwen-16k-nothink/memory.log +36 -0
  166. package/assess/lsa/examples/eval-run-6/qwen-16k-nothink/routes/routes-001.json +425 -0
  167. package/assess/lsa/examples/eval-run-6/qwen-16k-nothink/routes/routes-002.json +333 -0
  168. package/assess/lsa/examples/eval-run-6/qwen-16k-nothink/routes/routes-003.json +400 -0
  169. package/assess/lsa/examples/eval-run-6/qwen-16k-nothink/routes/routes-004.json +403 -0
  170. package/assess/lsa/examples/eval-run-6/qwen-16k-nothink/routes/routes-005.json +398 -0
  171. package/assess/lsa/examples/eval-run-6/qwen-16k-nothink/routes/routes-006.json +63 -0
  172. package/assess/lsa/examples/eval-run-6/qwen-16k-nothink/score.json +106 -0
  173. package/assess/lsa/examples/eval-run-6/qwen-16k-nothink/stack-profile.json +225 -0
  174. package/assess/lsa/examples/eval-run-6/qwen-16k-partial/auth-model.md +517 -0
  175. package/assess/lsa/examples/eval-run-6/qwen-16k-partial/findings/bola-routes-001.json +5 -0
  176. package/assess/lsa/examples/eval-run-6/qwen-16k-partial/findings/bola-routes-002.json +428 -0
  177. package/assess/lsa/examples/eval-run-6/qwen-16k-partial/findings/bola-routes-003.json +388 -0
  178. package/assess/lsa/examples/eval-run-6/qwen-16k-partial/findings/bola-routes-004.json +463 -0
  179. package/assess/lsa/examples/eval-run-6/qwen-16k-partial/findings/bola-routes-005.json +5 -0
  180. package/assess/lsa/examples/eval-run-6/qwen-16k-partial/findings/bola-routes-006.json +67 -0
  181. package/assess/lsa/examples/eval-run-6/qwen-16k-partial/findings/inj-injection-001.json +964 -0
  182. package/assess/lsa/examples/eval-run-6/qwen-16k-partial/findings.partial.json +1872 -0
  183. package/assess/lsa/examples/eval-run-6/qwen-16k-partial/memory.log +194 -0
  184. package/assess/lsa/examples/eval-run-6/qwen-16k-partial/score.partial.json +108 -0
  185. package/assess/lsa/examples/eval-run-6/qwen-16k-partial/stack-profile.json +225 -0
  186. package/assess/lsa/scripts/laravel_routes.py +102 -0
  187. package/assess/lsa/scripts/map_routes.py +4 -1
  188. package/assess/lsa/tests/EVAL-RESULTS.md +126 -0
  189. package/assess/lsa/tests/test_eval_run_6.py +104 -0
  190. package/assess/lsa/tests/test_laravel_routes.py +95 -0
  191. package/operate/ai/client.py +22 -9
  192. package/operate/ai/runner.py +4 -2
  193. package/operate/cli/__init__.py +1 -1
  194. package/operate/cli/commands/scan.py +8 -1
  195. package/operate/tests/test_ai_reasoning_effort.py +65 -0
  196. package/operate/tests/test_ai_route_inventory.py +53 -0
  197. package/package.json +1 -1
@@ -0,0 +1,367 @@
1
+ {
2
+ "batch_id": "routes-002",
3
+ "findings": [
4
+ {
5
+ "finding_id": "BOLA-R-0020",
6
+ "category": "bola",
7
+ "subtype": "missing_ownership_check",
8
+ "title": "BOLA in POST /account/save: missing owner 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
+ },
18
+ "evidence": [
19
+ {
20
+ "file": "java-legacy/src/com/acme/web/AccountController.java",
21
+ "start_line": 13,
22
+ "code": "accountDao.save(account);",
23
+ "why": "The account is saved without checking that the current user owns it.",
24
+ "line": 13
25
+ }
26
+ ],
27
+ "severity": "high",
28
+ "confidence": "high",
29
+ "cwe": [
30
+ "CWE-284",
31
+ "CWE-639"
32
+ ],
33
+ "recommendation": "Add an ownership check that verifies the current user owns the account before saving.",
34
+ "status": "unverified",
35
+ "attack_vector": {
36
+ "target_param": "id"
37
+ }
38
+ },
39
+ {
40
+ "finding_id": "BOLA-R-0021",
41
+ "category": "bola",
42
+ "subtype": "missing_ownership_check",
43
+ "title": "BOLA in POST /account/rename: missing owner verification",
44
+ "route_id": "R-0021",
45
+ "endpoint": {
46
+ "method": "POST",
47
+ "path": "/account/rename"
48
+ },
49
+ "location": {
50
+ "file": "java-legacy/src/com/acme/web/AccountController.java",
51
+ "start_line": 19
52
+ },
53
+ "evidence": [
54
+ {
55
+ "file": "java-legacy/src/com/acme/web/AccountController.java",
56
+ "start_line": 21,
57
+ "code": "accountDao.rename(form.getId(), form.getName());",
58
+ "why": "The rename operation is performed on any account ID without verifying ownership.",
59
+ "line": 21
60
+ }
61
+ ],
62
+ "severity": "high",
63
+ "confidence": "high",
64
+ "cwe": [
65
+ "CWE-284",
66
+ "CWE-639"
67
+ ],
68
+ "recommendation": "Verify that the account belongs to the current user before renaming.",
69
+ "status": "unverified",
70
+ "attack_vector": {
71
+ "target_param": "id"
72
+ }
73
+ },
74
+ {
75
+ "finding_id": "BOLA-R-0022",
76
+ "category": "bola",
77
+ "subtype": "missing_ownership_check",
78
+ "title": "BOLA in PUT /account/api: missing owner verification",
79
+ "route_id": "R-0022",
80
+ "endpoint": {
81
+ "method": "PUT",
82
+ "path": "/account/api"
83
+ },
84
+ "location": {
85
+ "file": "java-legacy/src/com/acme/web/AccountController.java",
86
+ "start_line": 25
87
+ },
88
+ "evidence": [
89
+ {
90
+ "file": "java-legacy/src/com/acme/web/AccountController.java",
91
+ "start_line": 27,
92
+ "code": "return accountDao.save(account);",
93
+ "why": "The account is saved without checking that the current user owns it.",
94
+ "line": 27
95
+ }
96
+ ],
97
+ "severity": "high",
98
+ "confidence": "high",
99
+ "cwe": [
100
+ "CWE-284",
101
+ "CWE-639"
102
+ ],
103
+ "recommendation": "Add an ownership check that verifies the current user owns the account before saving.",
104
+ "status": "unverified",
105
+ "attack_vector": {
106
+ "target_param": "id"
107
+ }
108
+ },
109
+ {
110
+ "finding_id": "BOLA-R-0023",
111
+ "category": "bola",
112
+ "subtype": "missing_ownership_check",
113
+ "title": "BOLA in POST /admin/users/{id}/delete: missing owner verification",
114
+ "route_id": "R-0023",
115
+ "endpoint": {
116
+ "method": "POST",
117
+ "path": "/admin/users/{id}/delete"
118
+ },
119
+ "location": {
120
+ "file": "java-legacy/src/com/acme/web/AdminUserController.java",
121
+ "start_line": 13
122
+ },
123
+ "evidence": [
124
+ {
125
+ "file": "java-legacy/src/com/acme/web/AdminUserController.java",
126
+ "start_line": 15,
127
+ "code": "userDao.deleteById(id);",
128
+ "why": "Any authenticated user can delete any user without role or ownership checks.",
129
+ "line": 15
130
+ }
131
+ ],
132
+ "severity": "high",
133
+ "confidence": "high",
134
+ "cwe": [
135
+ "CWE-284",
136
+ "CWE-639"
137
+ ],
138
+ "recommendation": "Require admin role and verify that the target user is not the current user before deletion.",
139
+ "status": "unverified",
140
+ "attack_vector": {
141
+ "target_param": "id"
142
+ }
143
+ },
144
+ {
145
+ "finding_id": "BOLA-R-0024",
146
+ "category": "bola",
147
+ "subtype": "missing_ownership_check",
148
+ "title": "BOLA in POST /admin/users/{id}/role: missing owner verification",
149
+ "route_id": "R-0024",
150
+ "endpoint": {
151
+ "method": "POST",
152
+ "path": "/admin/users/{id}/role"
153
+ },
154
+ "location": {
155
+ "file": "java-legacy/src/com/acme/web/AdminUserController.java",
156
+ "start_line": 20
157
+ },
158
+ "evidence": [
159
+ {
160
+ "file": "java-legacy/src/com/acme/web/AdminUserController.java",
161
+ "start_line": 22,
162
+ "code": "userDao.updateRole(id, role);",
163
+ "why": "Any authenticated user can change any user's role without role or ownership checks.",
164
+ "line": 22
165
+ }
166
+ ],
167
+ "severity": "high",
168
+ "confidence": "high",
169
+ "cwe": [
170
+ "CWE-284",
171
+ "CWE-639"
172
+ ],
173
+ "recommendation": "Require admin role and verify that the target user is not the current user before changing role.",
174
+ "status": "unverified",
175
+ "attack_vector": {
176
+ "target_param": "id"
177
+ }
178
+ },
179
+ {
180
+ "finding_id": "BOLA-R-0025",
181
+ "category": "bola",
182
+ "subtype": "missing_ownership_check",
183
+ "title": "BOLA in GET /invoices/{id}: missing owner verification",
184
+ "route_id": "R-0025",
185
+ "endpoint": {
186
+ "method": "GET",
187
+ "path": "/invoices/{id}"
188
+ },
189
+ "location": {
190
+ "file": "java-legacy/src/com/acme/web/InvoiceController.java",
191
+ "start_line": 15
192
+ },
193
+ "evidence": [
194
+ {
195
+ "file": "java-legacy/src/com/acme/web/InvoiceController.java",
196
+ "start_line": 17,
197
+ "code": "model.addAttribute(\"invoice\", invoiceDao.findById(id));",
198
+ "why": "The invoice is retrieved by ID without checking that it belongs to the current user.",
199
+ "line": 17
200
+ }
201
+ ],
202
+ "severity": "high",
203
+ "confidence": "high",
204
+ "cwe": [
205
+ "CWE-284",
206
+ "CWE-639"
207
+ ],
208
+ "recommendation": "Add an ownership check that verifies the invoice belongs to the current user before displaying.",
209
+ "status": "unverified",
210
+ "attack_vector": {
211
+ "target_param": "id"
212
+ }
213
+ },
214
+ {
215
+ "finding_id": "BOLA-R-0027",
216
+ "category": "bola",
217
+ "subtype": "missing_ownership_check",
218
+ "title": "BOLA in GET /invoices/search: missing owner verification",
219
+ "route_id": "R-0027",
220
+ "endpoint": {
221
+ "method": "GET",
222
+ "path": "/invoices/search"
223
+ },
224
+ "location": {
225
+ "file": "java-legacy/src/com/acme/web/InvoiceController.java",
226
+ "start_line": 27
227
+ },
228
+ "evidence": [
229
+ {
230
+ "file": "java-legacy/src/com/acme/web/InvoiceController.java",
231
+ "start_line": 29,
232
+ "code": "model.addAttribute(\"list\", session.createQuery(\"from Invoice i where i.customer = '\" + customer + \"'\").list());",
233
+ "why": "Search results are not filtered by the current user, exposing all invoices for the searched customer.",
234
+ "line": 29
235
+ }
236
+ ],
237
+ "severity": "high",
238
+ "confidence": "high",
239
+ "cwe": [
240
+ "CWE-284",
241
+ "CWE-639"
242
+ ],
243
+ "recommendation": "Filter search results by the current user or restrict the endpoint to admin only.",
244
+ "status": "unverified"
245
+ },
246
+ {
247
+ "finding_id": "BOLA-R-0028",
248
+ "category": "bola",
249
+ "subtype": "missing_ownership_check",
250
+ "title": "BOLA in GET /order/view: missing owner verification",
251
+ "route_id": "R-0028",
252
+ "endpoint": {
253
+ "method": "GET",
254
+ "path": "/order/view"
255
+ },
256
+ "location": {
257
+ "file": "java-legacy/src/com/acme/web/OrderServlet.java",
258
+ "start_line": 8
259
+ },
260
+ "evidence": [
261
+ {
262
+ "file": "java-legacy/src/com/acme/web/OrderServlet.java",
263
+ "start_line": 15,
264
+ "code": "ResultSet rs = stmt.executeQuery(\"SELECT * FROM orders WHERE id = '\" + id + \"'\");",
265
+ "why": "The order is fetched by ID without verifying that it belongs to the logged\u2011in user.",
266
+ "line": 15
267
+ }
268
+ ],
269
+ "severity": "high",
270
+ "confidence": "high",
271
+ "cwe": [
272
+ "CWE-284",
273
+ "CWE-639"
274
+ ],
275
+ "recommendation": "Add an ownership check that verifies the order belongs to the current user before displaying.",
276
+ "status": "unverified",
277
+ "attack_vector": {
278
+ "target_param": "orderId"
279
+ }
280
+ },
281
+ {
282
+ "finding_id": "BOLA-R-0030",
283
+ "category": "bola",
284
+ "subtype": "missing_ownership_check",
285
+ "title": "BOLA in POST /admin/users/:id/delete: missing owner verification",
286
+ "route_id": "R-0030",
287
+ "endpoint": {
288
+ "method": "POST",
289
+ "path": "/admin/users/:id/delete"
290
+ },
291
+ "location": {
292
+ "file": "node-express/routes/admin.js",
293
+ "start_line": 8
294
+ },
295
+ "evidence": [
296
+ {
297
+ "file": "node-express/routes/admin.js",
298
+ "start_line": 9,
299
+ "code": "User.deleteOne({ _id: req.params.id }, function () { res.sendStatus(204); });",
300
+ "why": "Any authenticated user can delete any user without role or ownership checks.",
301
+ "line": 9
302
+ }
303
+ ],
304
+ "severity": "high",
305
+ "confidence": "high",
306
+ "cwe": [
307
+ "CWE-284",
308
+ "CWE-639"
309
+ ],
310
+ "recommendation": "Require admin role and verify that the target user is not the current user before deletion.",
311
+ "status": "unverified",
312
+ "attack_vector": {
313
+ "target_param": "id"
314
+ }
315
+ }
316
+ ],
317
+ "route_verdicts": [
318
+ {
319
+ "route_id": "R-0020",
320
+ "verdict": "vulnerable"
321
+ },
322
+ {
323
+ "route_id": "R-0021",
324
+ "verdict": "vulnerable"
325
+ },
326
+ {
327
+ "route_id": "R-0022",
328
+ "verdict": "vulnerable"
329
+ },
330
+ {
331
+ "route_id": "R-0023",
332
+ "verdict": "vulnerable"
333
+ },
334
+ {
335
+ "route_id": "R-0024",
336
+ "verdict": "vulnerable"
337
+ },
338
+ {
339
+ "route_id": "R-0025",
340
+ "verdict": "vulnerable"
341
+ },
342
+ {
343
+ "route_id": "R-0026",
344
+ "verdict": "safe"
345
+ },
346
+ {
347
+ "route_id": "R-0027",
348
+ "verdict": "vulnerable"
349
+ },
350
+ {
351
+ "route_id": "R-0028",
352
+ "verdict": "vulnerable"
353
+ },
354
+ {
355
+ "route_id": "R-0030",
356
+ "verdict": "vulnerable"
357
+ },
358
+ {
359
+ "route_id": "R-0031",
360
+ "verdict": "safe"
361
+ },
362
+ {
363
+ "route_id": "R-0032",
364
+ "verdict": "safe"
365
+ }
366
+ ]
367
+ }
@@ -0,0 +1,207 @@
1
+ {
2
+ "batch_id": "routes-003",
3
+ "findings": [
4
+ {
5
+ "finding_id": "BOLA-R-0033",
6
+ "category": "bola",
7
+ "subtype": "missing_ownership_check",
8
+ "title": "BOLA in GET /orders/:id: missing owner verification",
9
+ "route_id": "R-0033",
10
+ "endpoint": {
11
+ "method": "GET",
12
+ "path": "/orders/:id"
13
+ },
14
+ "location": {
15
+ "file": "node-express/routes/orders.js",
16
+ "start_line": 8
17
+ },
18
+ "evidence": [
19
+ {
20
+ "file": "node-express/routes/orders.js",
21
+ "start_line": 8,
22
+ "code": "Order.findById(req.params.id, function (err, order) { res.json(order); });",
23
+ "why": "The query retrieves an order solely by its id, with no filter on the current user.",
24
+ "line": 8
25
+ }
26
+ ],
27
+ "severity": "high",
28
+ "confidence": "high",
29
+ "cwe": [
30
+ "CWE-284",
31
+ "CWE-639"
32
+ ],
33
+ "recommendation": "Add a check that the order belongs to the authenticated user before returning it, e.g., by filtering on user_id or comparing the owner after retrieval.",
34
+ "status": "unverified",
35
+ "attack_vector": {
36
+ "target_param": "id"
37
+ }
38
+ },
39
+ {
40
+ "finding_id": "BOLA-R-0043",
41
+ "category": "bola",
42
+ "subtype": "missing_ownership_check",
43
+ "title": "BOLA in ANY /perl-cgi/cgi-bin/order.cgi: missing owner verification",
44
+ "route_id": "R-0043",
45
+ "endpoint": {
46
+ "method": "ANY",
47
+ "path": "/perl-cgi/cgi-bin/order.cgi"
48
+ },
49
+ "location": {
50
+ "file": "perl-cgi/cgi-bin/order.cgi",
51
+ "start_line": 13
52
+ },
53
+ "evidence": [
54
+ {
55
+ "file": "perl-cgi/cgi-bin/order.cgi",
56
+ "start_line": 13,
57
+ "code": "$sth = $dbh->prepare(\"SELECT * FROM orders WHERE id = $id\");",
58
+ "why": "The SQL statement selects an order by id supplied from the request without filtering by the logged\u2011in user.",
59
+ "line": 13
60
+ }
61
+ ],
62
+ "severity": "high",
63
+ "confidence": "high",
64
+ "cwe": [
65
+ "CWE-284",
66
+ "CWE-639"
67
+ ],
68
+ "recommendation": "Include the user_id in the WHERE clause or verify ownership after fetching the record.",
69
+ "status": "unverified",
70
+ "attack_vector": {
71
+ "target_param": "user_id"
72
+ }
73
+ },
74
+ {
75
+ "finding_id": "BOLA-R-0044",
76
+ "category": "bola",
77
+ "subtype": "missing_ownership_check",
78
+ "title": "BOLA in ANY /invoice/view/{id}: missing owner verification",
79
+ "route_id": "R-0044",
80
+ "endpoint": {
81
+ "method": "ANY",
82
+ "path": "/invoice/view/{id}"
83
+ },
84
+ "location": {
85
+ "file": "php-codeigniter/application/controllers/Invoice.php",
86
+ "start_line": 10
87
+ },
88
+ "evidence": [
89
+ {
90
+ "file": "php-codeigniter/application/controllers/Invoice.php",
91
+ "start_line": 10,
92
+ "code": "$q = $this->db->query(\"SELECT * FROM invoices WHERE id = $id\");",
93
+ "why": "The query retrieves an invoice by id without checking that the invoice belongs to the current user.",
94
+ "line": 10
95
+ }
96
+ ],
97
+ "severity": "high",
98
+ "confidence": "high",
99
+ "cwe": [
100
+ "CWE-284",
101
+ "CWE-639"
102
+ ],
103
+ "recommendation": "Add a user_id filter to the query or compare the invoice's owner after retrieval.",
104
+ "status": "unverified",
105
+ "attack_vector": {
106
+ "target_param": "id"
107
+ }
108
+ },
109
+ {
110
+ "finding_id": "BOLA-R-0046",
111
+ "category": "bola",
112
+ "subtype": "missing_ownership_check",
113
+ "title": "BOLA in ANY /invoice/update: missing owner verification",
114
+ "route_id": "R-0046",
115
+ "endpoint": {
116
+ "method": "ANY",
117
+ "path": "/invoice/update"
118
+ },
119
+ "location": {
120
+ "file": "php-codeigniter/application/controllers/Invoice.php",
121
+ "start_line": 20
122
+ },
123
+ "evidence": [
124
+ {
125
+ "file": "php-codeigniter/application/controllers/Invoice.php",
126
+ "start_line": 23,
127
+ "code": "$this->db->query(\"UPDATE invoices SET note = ? WHERE id = ?\", array($note, $id));",
128
+ "why": "The update statement modifies an invoice identified only by id, with no check that the invoice belongs to the authenticated user.",
129
+ "line": 23
130
+ }
131
+ ],
132
+ "severity": "high",
133
+ "confidence": "high",
134
+ "cwe": [
135
+ "CWE-284",
136
+ "CWE-639"
137
+ ],
138
+ "recommendation": "Ensure the invoice belongs to the current user before performing the update, e.g., by adding a user_id filter or verifying ownership after retrieval.",
139
+ "status": "unverified",
140
+ "attack_vector": {
141
+ "target_param": "invoice_id"
142
+ }
143
+ }
144
+ ],
145
+ "route_verdicts": [
146
+ {
147
+ "route_id": "R-0033",
148
+ "verdict": "vulnerable"
149
+ },
150
+ {
151
+ "route_id": "R-0034",
152
+ "verdict": "safe"
153
+ },
154
+ {
155
+ "route_id": "R-0035",
156
+ "verdict": "safe"
157
+ },
158
+ {
159
+ "route_id": "R-0036",
160
+ "verdict": "safe"
161
+ },
162
+ {
163
+ "route_id": "R-0037",
164
+ "verdict": "safe"
165
+ },
166
+ {
167
+ "route_id": "R-0038",
168
+ "verdict": "safe"
169
+ },
170
+ {
171
+ "route_id": "R-0043",
172
+ "verdict": "vulnerable"
173
+ },
174
+ {
175
+ "route_id": "R-0044",
176
+ "verdict": "vulnerable"
177
+ },
178
+ {
179
+ "route_id": "R-0045",
180
+ "verdict": "safe"
181
+ },
182
+ {
183
+ "route_id": "R-0046",
184
+ "verdict": "vulnerable"
185
+ },
186
+ {
187
+ "route_id": "R-0047",
188
+ "verdict": "safe"
189
+ },
190
+ {
191
+ "route_id": "R-0048",
192
+ "verdict": "safe"
193
+ },
194
+ {
195
+ "route_id": "R-0049",
196
+ "verdict": "safe"
197
+ },
198
+ {
199
+ "route_id": "R-0050",
200
+ "verdict": "safe"
201
+ },
202
+ {
203
+ "route_id": "R-0051",
204
+ "verdict": "safe"
205
+ }
206
+ ]
207
+ }