@hoanghainh/komagu 2.5.0 → 2.6.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.
Files changed (225) hide show
  1. package/CHANGELOG.md +30 -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/examples/member-portal/backend-dotnet/Auth/DemoAuthenticationHandler.cs +75 -0
  192. package/examples/member-portal/backend-dotnet/Program.cs +1 -72
  193. package/examples/member-portal/backend-spring/src/main/kotlin/io/komagu/portal/Application.kt +4 -0
  194. package/examples/member-portal/backend-spring/src/main/kotlin/io/komagu/portal/controller/Controllers.kt +3 -0
  195. package/examples/member-portal/backend-spring/src/main/kotlin/io/komagu/portal/model/Entities.kt +4 -0
  196. package/examples/member-portal/tests/test_d6_demo_app.py +4 -4
  197. package/examples/member-portal/tests/test_d6_remediation_verification.py +6 -6
  198. package/operate/ai/client.py +27 -10
  199. package/operate/ai/runner.py +4 -2
  200. package/operate/cli/__init__.py +1 -1
  201. package/operate/cli/commands/scan.py +8 -1
  202. package/operate/cross_user_tester/runner.py +4 -1
  203. package/operate/devsecops/sbom.py +12 -4
  204. package/operate/simulate/scenarios.py +11 -2
  205. package/operate/tests/test_ai_reasoning_effort.py +65 -0
  206. package/operate/tests/test_ai_route_inventory.py +53 -0
  207. package/operate/tests/test_audit_minimum_versions.py +89 -0
  208. package/operate/tests/test_cli.py +1 -1
  209. package/operate/tests/test_scheme_and_xml_guards.py +67 -0
  210. package/package.json +1 -1
  211. package/remediate/authz/dotnet/src/Komagu.Security.Authorization/LoggingSecurityAuditSink.cs +19 -3
  212. package/remediate/authz/golang/authz_test.go +5 -2
  213. package/remediate/authz/spring/src/main/kotlin/io/komagu/security/authorization/DefaultKomaguSecurityManager.kt +74 -78
  214. package/remediate/authz/spring/src/main/kotlin/io/komagu/security/spring/OwnershipAspect.kt +129 -158
  215. package/remediate/deps/patcher.py +2 -1
  216. package/remediate/edge/mock-backend/app.py +2 -1
  217. package/remediate/edge/tests/test_edge_security.py +5 -5
  218. package/remediate/ekyc/requirements.txt +1 -1
  219. package/remediate/identity/dotnet/src/Komagu.Security.Identity/OidcServiceCollectionExtensions.cs +19 -6
  220. package/remediate/identity/python/requirements.txt +2 -2
  221. package/remediate/identity/spring/src/main/kotlin/io/komagu/security/identity/KomaguIdentityAutoConfiguration.kt +31 -38
  222. package/remediate/legacy_shims/tests/test_legacy_shims.py +8 -8
  223. package/remediate/query/dotnet/src/Komagu.Security.Query/SafeSortAllowList.cs +5 -2
  224. package/remediate/query/spring/src/main/kotlin/io/komagu/security/query/SafeSortAllowList.kt +10 -11
  225. package/remediate/query/spring/src/main/kotlin/io/komagu/security/query/detekt/StringBuiltSqlQueryRule.kt +19 -24
@@ -0,0 +1,561 @@
1
+ {
2
+ "batch_id": "routes-004",
3
+ "findings": [
4
+ {
5
+ "finding_id": "BOLA-R-0057-1",
6
+ "category": "bola",
7
+ "subtype": "missing_ownership_check",
8
+ "title": "BOLA in GET /account/rename: missing owner verification",
9
+ "route_id": "R-0057",
10
+ "endpoint": {
11
+ "method": "GET",
12
+ "path": "/account/rename"
13
+ },
14
+ "location": {
15
+ "file": "php-plain/admin.php",
16
+ "start_line": 7
17
+ },
18
+ "evidence": [
19
+ {
20
+ "file": "php-plain/admin.php",
21
+ "start_line": 7,
22
+ "code": "$uid = (int)$_GET['uid'];",
23
+ "why": "Object ID comes from the request",
24
+ "line": 7
25
+ },
26
+ {
27
+ "file": "php-plain/admin.php",
28
+ "start_line": 8,
29
+ "code": "$r = mysql_query(\"SELECT * FROM users WHERE id = \" . $uid);",
30
+ "why": "Query does not restrict by current user",
31
+ "line": 8
32
+ }
33
+ ],
34
+ "severity": "high",
35
+ "confidence": "high",
36
+ "cwe": [
37
+ "CWE-284",
38
+ "CWE-639"
39
+ ],
40
+ "recommendation": "Add a WHERE clause that binds the user ID to the session user or verify ownership after fetching the record",
41
+ "status": "unverified",
42
+ "attack_vector": {
43
+ "target_param": "uid"
44
+ }
45
+ },
46
+ {
47
+ "finding_id": "BOLA-R-0057-2",
48
+ "category": "bola",
49
+ "subtype": "missing_ownership_check",
50
+ "title": "BOLA in POST /account/rename: missing owner verification",
51
+ "route_id": "R-0057",
52
+ "endpoint": {
53
+ "method": "POST",
54
+ "path": "/account/rename"
55
+ },
56
+ "location": {
57
+ "file": "php-plain/admin.php",
58
+ "start_line": 6
59
+ },
60
+ "evidence": [
61
+ {
62
+ "file": "php-plain/admin.php",
63
+ "start_line": 11,
64
+ "code": "$id = $_POST['id'];",
65
+ "why": "Object ID comes from the request",
66
+ "line": 11
67
+ },
68
+ {
69
+ "file": "php-plain/admin.php",
70
+ "start_line": 12,
71
+ "code": "mysql_query(\"DELETE FROM users WHERE id = $id\");",
72
+ "why": "Delete query does not restrict by current user",
73
+ "line": 12
74
+ }
75
+ ],
76
+ "severity": "high",
77
+ "confidence": "high",
78
+ "cwe": [
79
+ "CWE-284",
80
+ "CWE-639"
81
+ ],
82
+ "recommendation": "Add a WHERE clause that binds the user ID to the session user or verify ownership before deletion",
83
+ "status": "unverified",
84
+ "attack_vector": {
85
+ "target_param": "uid"
86
+ }
87
+ },
88
+ {
89
+ "finding_id": "BOLA-R-0058-1",
90
+ "category": "bola",
91
+ "subtype": "missing_ownership_check",
92
+ "title": "BOLA in POST /account/rename: missing owner verification",
93
+ "route_id": "R-0058",
94
+ "endpoint": {
95
+ "method": "POST",
96
+ "path": "/account/rename"
97
+ },
98
+ "location": {
99
+ "file": "php-plain/admin.php",
100
+ "start_line": 11
101
+ },
102
+ "evidence": [
103
+ {
104
+ "file": "php-plain/admin.php",
105
+ "start_line": 11,
106
+ "code": "$id = $_POST['id'];",
107
+ "why": "Object ID comes from the request",
108
+ "line": 11
109
+ },
110
+ {
111
+ "file": "php-plain/admin.php",
112
+ "start_line": 12,
113
+ "code": "mysql_query(\"DELETE FROM users WHERE id = $id\");",
114
+ "why": "Delete query does not restrict by current user",
115
+ "line": 12
116
+ }
117
+ ],
118
+ "severity": "high",
119
+ "confidence": "high",
120
+ "cwe": [
121
+ "CWE-284",
122
+ "CWE-639"
123
+ ],
124
+ "recommendation": "Add a WHERE clause that binds the user ID to the session user or verify ownership before deletion",
125
+ "status": "unverified",
126
+ "attack_vector": {
127
+ "target_param": "uid"
128
+ }
129
+ },
130
+ {
131
+ "finding_id": "BOLA-R-0066-1",
132
+ "category": "bola",
133
+ "subtype": "missing_ownership_check",
134
+ "title": "BOLA in POST /php-plain/admin/delete_user.php: missing owner verification",
135
+ "route_id": "R-0066",
136
+ "endpoint": {
137
+ "method": "POST",
138
+ "path": "/php-plain/admin/delete_user.php"
139
+ },
140
+ "location": {
141
+ "file": "php-plain/admin/delete_user.php",
142
+ "start_line": 5
143
+ },
144
+ "evidence": [
145
+ {
146
+ "file": "php-plain/admin/delete_user.php",
147
+ "start_line": 5,
148
+ "code": "$id = (int)$_POST['id'];",
149
+ "why": "Object ID comes from the request",
150
+ "line": 5
151
+ },
152
+ {
153
+ "file": "php-plain/admin/delete_user.php",
154
+ "start_line": 6,
155
+ "code": "$stmt = $db->prepare(\"DELETE FROM users WHERE id = ?\");",
156
+ "why": "Query does not restrict by current user",
157
+ "line": 6
158
+ }
159
+ ],
160
+ "severity": "high",
161
+ "confidence": "high",
162
+ "cwe": [
163
+ "CWE-284",
164
+ "CWE-639"
165
+ ],
166
+ "recommendation": "Add a WHERE clause that binds the user ID to the session user or verify ownership before deletion",
167
+ "status": "unverified",
168
+ "attack_vector": {
169
+ "target_param": "id"
170
+ }
171
+ },
172
+ {
173
+ "finding_id": "BOLA-R-0067-1",
174
+ "category": "bola",
175
+ "subtype": "missing_ownership_check",
176
+ "title": "BOLA in POST /php-plain/admin/promote.php: missing owner verification",
177
+ "route_id": "R-0067",
178
+ "endpoint": {
179
+ "method": "POST",
180
+ "path": "/php-plain/admin/promote.php"
181
+ },
182
+ "location": {
183
+ "file": "php-plain/admin/promote.php",
184
+ "start_line": 5
185
+ },
186
+ "evidence": [
187
+ {
188
+ "file": "php-plain/admin/promote.php",
189
+ "start_line": 5,
190
+ "code": "if ($_POST['is_admin'] == '1') {",
191
+ "why": "Object ID comes from the request",
192
+ "line": 5
193
+ },
194
+ {
195
+ "file": "php-plain/admin/promote.php",
196
+ "start_line": 6,
197
+ "code": "$stmt = $db->prepare(\"UPDATE users SET role = 'admin' WHERE id = ?\");",
198
+ "why": "Query does not restrict by current user",
199
+ "line": 6
200
+ }
201
+ ],
202
+ "severity": "high",
203
+ "confidence": "high",
204
+ "cwe": [
205
+ "CWE-284",
206
+ "CWE-639"
207
+ ],
208
+ "recommendation": "Add a WHERE clause that binds the user ID to the session user or verify ownership before role change",
209
+ "status": "unverified",
210
+ "attack_vector": {
211
+ "target_param": "uid"
212
+ }
213
+ },
214
+ {
215
+ "finding_id": "BOLA-R-0059-1",
216
+ "category": "bola",
217
+ "subtype": "missing_ownership_check",
218
+ "title": "BOLA in POST /php-plain/manage_users.php: missing owner verification",
219
+ "route_id": "R-0059",
220
+ "endpoint": {
221
+ "method": "POST",
222
+ "path": "/php-plain/manage_users.php"
223
+ },
224
+ "location": {
225
+ "file": "php-plain/manage_users.php",
226
+ "start_line": 5
227
+ },
228
+ "evidence": [
229
+ {
230
+ "file": "php-plain/manage_users.php",
231
+ "start_line": 5,
232
+ "code": "if ($_SERVER['REQUEST_METHOD'] === 'POST') {",
233
+ "why": "Object ID comes from the request",
234
+ "line": 5
235
+ },
236
+ {
237
+ "file": "php-plain/manage_users.php",
238
+ "start_line": 6,
239
+ "code": "$stmt = $db->prepare(\"DELETE FROM users WHERE id = ?\");",
240
+ "why": "Query does not restrict by current user",
241
+ "line": 6
242
+ }
243
+ ],
244
+ "severity": "high",
245
+ "confidence": "high",
246
+ "cwe": [
247
+ "CWE-284",
248
+ "CWE-639"
249
+ ],
250
+ "recommendation": "Add a WHERE clause that binds the user ID to the session user or verify ownership before deletion",
251
+ "status": "unverified",
252
+ "attack_vector": {
253
+ "target_param": "id"
254
+ }
255
+ },
256
+ {
257
+ "finding_id": "BOLA-R-0061-1",
258
+ "category": "bola",
259
+ "subtype": "missing_ownership_check",
260
+ "title": "BOLA in GET /php-plain/order_detail.php: missing owner verification",
261
+ "route_id": "R-0061",
262
+ "endpoint": {
263
+ "method": "GET",
264
+ "path": "/php-plain/order_detail.php"
265
+ },
266
+ "location": {
267
+ "file": "php-plain/order_detail.php",
268
+ "start_line": 5
269
+ },
270
+ "evidence": [
271
+ {
272
+ "file": "php-plain/order_detail.php",
273
+ "start_line": 5,
274
+ "code": "$id = $_GET['id'];",
275
+ "why": "Object ID comes from the request",
276
+ "line": 5
277
+ },
278
+ {
279
+ "file": "php-plain/order_detail.php",
280
+ "start_line": 6,
281
+ "code": "$res = mysql_query(\"SELECT * FROM orders WHERE id = \" . $id);",
282
+ "why": "Query does not restrict by current user",
283
+ "line": 6
284
+ }
285
+ ],
286
+ "severity": "high",
287
+ "confidence": "high",
288
+ "cwe": [
289
+ "CWE-284",
290
+ "CWE-639"
291
+ ],
292
+ "recommendation": "Add a WHERE clause that binds the user ID to the session user or verify ownership after fetching the record",
293
+ "status": "unverified",
294
+ "attack_vector": {
295
+ "target_param": "id"
296
+ }
297
+ },
298
+ {
299
+ "finding_id": "BOLA-R-0069-1",
300
+ "category": "bola",
301
+ "subtype": "missing_ownership_check",
302
+ "title": "BOLA in GET /orders/<int:order_id>: missing owner verification",
303
+ "route_id": "R-0069",
304
+ "endpoint": {
305
+ "method": "GET",
306
+ "path": "/orders/<int:order_id>"
307
+ },
308
+ "location": {
309
+ "file": "python-flask/app.py",
310
+ "start_line": 12
311
+ },
312
+ "evidence": [
313
+ {
314
+ "file": "python-flask/app.py",
315
+ "start_line": 12,
316
+ "code": "cur.execute(\"SELECT * FROM orders WHERE id = %s\" % order_id)",
317
+ "why": "Query does not restrict by current user",
318
+ "line": 12
319
+ }
320
+ ],
321
+ "severity": "high",
322
+ "confidence": "high",
323
+ "cwe": [
324
+ "CWE-284",
325
+ "CWE-639"
326
+ ],
327
+ "recommendation": "Add a WHERE clause that binds the user ID to the current_user.id or verify ownership after fetching the record",
328
+ "status": "unverified",
329
+ "attack_vector": {
330
+ "target_param": "order_id"
331
+ }
332
+ },
333
+ {
334
+ "finding_id": "BOLA-R-0055-verdict",
335
+ "category": "bola",
336
+ "subtype": "missing_ownership_check",
337
+ "title": "Missing ownership check at php-laravel/routes/web.php:9 (from auditor verdict)",
338
+ "route_id": "R-0055",
339
+ "location": {
340
+ "file": "php-laravel/routes/web.php",
341
+ "start_line": 9
342
+ },
343
+ "evidence": [
344
+ {
345
+ "file": "php-laravel/routes/web.php",
346
+ "line": 9,
347
+ "why": "The auditor judged this route 'needs_review' but wrote no finding"
348
+ }
349
+ ],
350
+ "impact": "Generated from the auditor's 'needs_review' verdict; the model wrote no finding for it.",
351
+ "severity": "medium",
352
+ "confidence": "low",
353
+ "cwe": [
354
+ "CWE-284"
355
+ ],
356
+ "recommendation": "Bind the object lookup to the current user or tenant, or check ownership before using it.",
357
+ "status": "unverified",
358
+ "endpoint": {
359
+ "method": "POST",
360
+ "path": "/account/rename"
361
+ },
362
+ "attack_vector": {
363
+ "target_param": "id"
364
+ }
365
+ },
366
+ {
367
+ "finding_id": "BOLA-R-0056-verdict",
368
+ "category": "bola",
369
+ "subtype": "missing_ownership_check",
370
+ "title": "Missing ownership check at php-laravel/routes/web.php:10 (from auditor verdict)",
371
+ "route_id": "R-0056",
372
+ "location": {
373
+ "file": "php-laravel/routes/web.php",
374
+ "start_line": 10
375
+ },
376
+ "evidence": [
377
+ {
378
+ "file": "php-laravel/routes/web.php",
379
+ "line": 10,
380
+ "why": "The auditor judged this route 'needs_review' but wrote no finding"
381
+ }
382
+ ],
383
+ "impact": "Generated from the auditor's 'needs_review' verdict; the model wrote no finding for it.",
384
+ "severity": "medium",
385
+ "confidence": "low",
386
+ "cwe": [
387
+ "CWE-284"
388
+ ],
389
+ "recommendation": "Bind the object lookup to the current user or tenant, or check ownership before using it.",
390
+ "status": "unverified",
391
+ "endpoint": {
392
+ "method": "POST",
393
+ "path": "/account/profile"
394
+ },
395
+ "attack_vector": {
396
+ "target_param": "id"
397
+ }
398
+ },
399
+ {
400
+ "finding_id": "BOLA-R-0052-verdict",
401
+ "category": "bola",
402
+ "subtype": "missing_ownership_check",
403
+ "title": "Missing ownership check at php-laravel/routes/web.php:6 (from auditor verdict)",
404
+ "route_id": "R-0052",
405
+ "location": {
406
+ "file": "php-laravel/routes/web.php",
407
+ "start_line": 6
408
+ },
409
+ "evidence": [
410
+ {
411
+ "file": "php-laravel/routes/web.php",
412
+ "line": 6,
413
+ "why": "The auditor judged this route 'needs_review' but wrote no finding"
414
+ }
415
+ ],
416
+ "impact": "Generated from the auditor's 'needs_review' verdict; the model wrote no finding for it.",
417
+ "severity": "medium",
418
+ "confidence": "low",
419
+ "cwe": [
420
+ "CWE-284"
421
+ ],
422
+ "recommendation": "Bind the object lookup to the current user or tenant, or check ownership before using it.",
423
+ "status": "unverified",
424
+ "endpoint": {
425
+ "method": "POST",
426
+ "path": "/register"
427
+ },
428
+ "attack_vector": {
429
+ "target_param": "id"
430
+ }
431
+ },
432
+ {
433
+ "finding_id": "BOLA-R-0053-verdict",
434
+ "category": "bola",
435
+ "subtype": "missing_ownership_check",
436
+ "title": "Missing ownership check at php-laravel/routes/web.php:7 (from auditor verdict)",
437
+ "route_id": "R-0053",
438
+ "location": {
439
+ "file": "php-laravel/routes/web.php",
440
+ "start_line": 7
441
+ },
442
+ "evidence": [
443
+ {
444
+ "file": "php-laravel/routes/web.php",
445
+ "line": 7,
446
+ "why": "The auditor judged this route 'needs_review' but wrote no finding"
447
+ }
448
+ ],
449
+ "impact": "Generated from the auditor's 'needs_review' verdict; the model wrote no finding for it.",
450
+ "severity": "medium",
451
+ "confidence": "low",
452
+ "cwe": [
453
+ "CWE-284"
454
+ ],
455
+ "recommendation": "Bind the object lookup to the current user or tenant, or check ownership before using it.",
456
+ "status": "unverified",
457
+ "endpoint": {
458
+ "method": "POST",
459
+ "path": "/posts"
460
+ },
461
+ "attack_vector": {
462
+ "target_param": "id"
463
+ }
464
+ },
465
+ {
466
+ "finding_id": "BOLA-R-0054-verdict",
467
+ "category": "bola",
468
+ "subtype": "missing_ownership_check",
469
+ "title": "Missing ownership check at php-laravel/routes/web.php:8 (from auditor verdict)",
470
+ "route_id": "R-0054",
471
+ "location": {
472
+ "file": "php-laravel/routes/web.php",
473
+ "start_line": 8
474
+ },
475
+ "evidence": [
476
+ {
477
+ "file": "php-laravel/routes/web.php",
478
+ "line": 8,
479
+ "why": "The auditor judged this route 'needs_review' but wrote no finding"
480
+ }
481
+ ],
482
+ "impact": "Generated from the auditor's 'needs_review' verdict; the model wrote no finding for it.",
483
+ "severity": "medium",
484
+ "confidence": "low",
485
+ "cwe": [
486
+ "CWE-284"
487
+ ],
488
+ "recommendation": "Bind the object lookup to the current user or tenant, or check ownership before using it.",
489
+ "status": "unverified",
490
+ "endpoint": {
491
+ "method": "POST",
492
+ "path": "/teams"
493
+ },
494
+ "attack_vector": {
495
+ "target_param": "id"
496
+ }
497
+ }
498
+ ],
499
+ "route_verdicts": [
500
+ {
501
+ "route_id": "R-0055",
502
+ "verdict": "needs_review"
503
+ },
504
+ {
505
+ "route_id": "R-0056",
506
+ "verdict": "needs_review"
507
+ },
508
+ {
509
+ "route_id": "R-0052",
510
+ "verdict": "needs_review"
511
+ },
512
+ {
513
+ "route_id": "R-0053",
514
+ "verdict": "needs_review"
515
+ },
516
+ {
517
+ "route_id": "R-0054",
518
+ "verdict": "needs_review"
519
+ },
520
+ {
521
+ "route_id": "R-0057",
522
+ "verdict": "vulnerable"
523
+ },
524
+ {
525
+ "route_id": "R-0058",
526
+ "verdict": "vulnerable"
527
+ },
528
+ {
529
+ "route_id": "R-0066",
530
+ "verdict": "vulnerable"
531
+ },
532
+ {
533
+ "route_id": "R-0067",
534
+ "verdict": "vulnerable"
535
+ },
536
+ {
537
+ "route_id": "R-0059",
538
+ "verdict": "vulnerable"
539
+ },
540
+ {
541
+ "route_id": "R-0061",
542
+ "verdict": "vulnerable"
543
+ },
544
+ {
545
+ "route_id": "R-0062",
546
+ "verdict": "safe"
547
+ },
548
+ {
549
+ "route_id": "R-0069",
550
+ "verdict": "vulnerable"
551
+ },
552
+ {
553
+ "route_id": "R-0070",
554
+ "verdict": "safe"
555
+ },
556
+ {
557
+ "route_id": "R-0071",
558
+ "verdict": "safe"
559
+ }
560
+ ]
561
+ }