@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.
- package/CHANGELOG.md +30 -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/examples/member-portal/backend-dotnet/Auth/DemoAuthenticationHandler.cs +75 -0
- package/examples/member-portal/backend-dotnet/Program.cs +1 -72
- package/examples/member-portal/backend-spring/src/main/kotlin/io/komagu/portal/Application.kt +4 -0
- package/examples/member-portal/backend-spring/src/main/kotlin/io/komagu/portal/controller/Controllers.kt +3 -0
- package/examples/member-portal/backend-spring/src/main/kotlin/io/komagu/portal/model/Entities.kt +4 -0
- package/examples/member-portal/tests/test_d6_demo_app.py +4 -4
- package/examples/member-portal/tests/test_d6_remediation_verification.py +6 -6
- package/operate/ai/client.py +27 -10
- package/operate/ai/runner.py +4 -2
- package/operate/cli/__init__.py +1 -1
- package/operate/cli/commands/scan.py +8 -1
- package/operate/cross_user_tester/runner.py +4 -1
- package/operate/devsecops/sbom.py +12 -4
- package/operate/simulate/scenarios.py +11 -2
- package/operate/tests/test_ai_reasoning_effort.py +65 -0
- package/operate/tests/test_ai_route_inventory.py +53 -0
- package/operate/tests/test_audit_minimum_versions.py +89 -0
- package/operate/tests/test_cli.py +1 -1
- package/operate/tests/test_scheme_and_xml_guards.py +67 -0
- package/package.json +1 -1
- package/remediate/authz/dotnet/src/Komagu.Security.Authorization/LoggingSecurityAuditSink.cs +19 -3
- package/remediate/authz/golang/authz_test.go +5 -2
- package/remediate/authz/spring/src/main/kotlin/io/komagu/security/authorization/DefaultKomaguSecurityManager.kt +74 -78
- package/remediate/authz/spring/src/main/kotlin/io/komagu/security/spring/OwnershipAspect.kt +129 -158
- package/remediate/deps/patcher.py +2 -1
- package/remediate/edge/mock-backend/app.py +2 -1
- package/remediate/edge/tests/test_edge_security.py +5 -5
- package/remediate/ekyc/requirements.txt +1 -1
- package/remediate/identity/dotnet/src/Komagu.Security.Identity/OidcServiceCollectionExtensions.cs +19 -6
- package/remediate/identity/python/requirements.txt +2 -2
- package/remediate/identity/spring/src/main/kotlin/io/komagu/security/identity/KomaguIdentityAutoConfiguration.kt +31 -38
- package/remediate/legacy_shims/tests/test_legacy_shims.py +8 -8
- package/remediate/query/dotnet/src/Komagu.Security.Query/SafeSortAllowList.cs +5 -2
- package/remediate/query/spring/src/main/kotlin/io/komagu/security/query/SafeSortAllowList.kt +10 -11
- package/remediate/query/spring/src/main/kotlin/io/komagu/security/query/detekt/StringBuiltSqlQueryRule.kt +19 -24
|
@@ -0,0 +1,342 @@
|
|
|
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": "User profile readable by any authenticated user via uid parameter",
|
|
9
|
+
"route_id": "R-0057",
|
|
10
|
+
"endpoint": {
|
|
11
|
+
"method": "GET|POST",
|
|
12
|
+
"path": "/php-plain/admin.php?action=view"
|
|
13
|
+
},
|
|
14
|
+
"location": {
|
|
15
|
+
"file": "php-plain/admin.php",
|
|
16
|
+
"start_line": 7,
|
|
17
|
+
"end_line": 8
|
|
18
|
+
},
|
|
19
|
+
"evidence": [
|
|
20
|
+
{
|
|
21
|
+
"file": "php-plain/admin.php",
|
|
22
|
+
"line": 7,
|
|
23
|
+
"code": "$uid = (int)$_GET['uid'];",
|
|
24
|
+
"why": "ID source is request-controlled"
|
|
25
|
+
},
|
|
26
|
+
{
|
|
27
|
+
"file": "php-plain/admin.php",
|
|
28
|
+
"line": 8,
|
|
29
|
+
"code": "SELECT * FROM users WHERE id = \" . $uid;",
|
|
30
|
+
"why": "Query uses ID directly without binding to session user_id"
|
|
31
|
+
}
|
|
32
|
+
],
|
|
33
|
+
"attack_scenario": "User A sends GET /admin.php?action=view&uid=<user_id_of_user_B> and receives User B's profile.",
|
|
34
|
+
"impact": "Read other users' personal data (name, email, etc.).",
|
|
35
|
+
"severity": "high",
|
|
36
|
+
"confidence": "high",
|
|
37
|
+
"cwe": [
|
|
38
|
+
"CWE-284",
|
|
39
|
+
"CWE-639"
|
|
40
|
+
],
|
|
41
|
+
"owasp": [
|
|
42
|
+
"API1:2023"
|
|
43
|
+
],
|
|
44
|
+
"recommendation": "Add AND id = :session_user_id to the query or load the user then compare id with session user and return 404 on mismatch.",
|
|
45
|
+
"status": "unverified",
|
|
46
|
+
"attack_vector": {
|
|
47
|
+
"target_param": "uid"
|
|
48
|
+
}
|
|
49
|
+
},
|
|
50
|
+
{
|
|
51
|
+
"finding_id": "BOLA-R-0058-1",
|
|
52
|
+
"category": "bola",
|
|
53
|
+
"subtype": "missing_ownership_check",
|
|
54
|
+
"title": "User deletion possible for any authenticated user via id parameter",
|
|
55
|
+
"route_id": "R-0058",
|
|
56
|
+
"endpoint": {
|
|
57
|
+
"method": "GET|POST",
|
|
58
|
+
"path": "/php-plain/admin.php?action=delete"
|
|
59
|
+
},
|
|
60
|
+
"location": {
|
|
61
|
+
"file": "php-plain/admin.php",
|
|
62
|
+
"start_line": 11,
|
|
63
|
+
"end_line": 12
|
|
64
|
+
},
|
|
65
|
+
"evidence": [
|
|
66
|
+
{
|
|
67
|
+
"file": "php-plain/admin.php",
|
|
68
|
+
"line": 11,
|
|
69
|
+
"code": "$id = $_POST['id'];",
|
|
70
|
+
"why": "ID source is request-controlled"
|
|
71
|
+
},
|
|
72
|
+
{
|
|
73
|
+
"file": "php-plain/admin.php",
|
|
74
|
+
"line": 12,
|
|
75
|
+
"code": "DELETE FROM users WHERE id = $id;",
|
|
76
|
+
"why": "Query uses ID directly without binding to session user_id"
|
|
77
|
+
}
|
|
78
|
+
],
|
|
79
|
+
"attack_scenario": "User A sends POST /admin.php?action=delete with id=<user_id_of_user_B> and deletes User B's account.",
|
|
80
|
+
"impact": "Delete other users' accounts.",
|
|
81
|
+
"severity": "high",
|
|
82
|
+
"confidence": "high",
|
|
83
|
+
"cwe": [
|
|
84
|
+
"CWE-284",
|
|
85
|
+
"CWE-639"
|
|
86
|
+
],
|
|
87
|
+
"owasp": [
|
|
88
|
+
"API1:2023"
|
|
89
|
+
],
|
|
90
|
+
"recommendation": "Add AND id = :session_user_id to the query or load the user then compare id with session user and return 404 on mismatch.",
|
|
91
|
+
"status": "unverified",
|
|
92
|
+
"attack_vector": {
|
|
93
|
+
"target_param": "uid"
|
|
94
|
+
}
|
|
95
|
+
},
|
|
96
|
+
{
|
|
97
|
+
"finding_id": "BOLA-R-0061-1",
|
|
98
|
+
"category": "bola",
|
|
99
|
+
"subtype": "missing_ownership_check",
|
|
100
|
+
"title": "Order detail readable by any authenticated user via id parameter",
|
|
101
|
+
"route_id": "R-0061",
|
|
102
|
+
"endpoint": {
|
|
103
|
+
"method": "GET",
|
|
104
|
+
"path": "/php-plain/order_detail.php"
|
|
105
|
+
},
|
|
106
|
+
"location": {
|
|
107
|
+
"file": "php-plain/order_detail.php",
|
|
108
|
+
"start_line": 5,
|
|
109
|
+
"end_line": 8
|
|
110
|
+
},
|
|
111
|
+
"evidence": [
|
|
112
|
+
{
|
|
113
|
+
"file": "php-plain/order_detail.php",
|
|
114
|
+
"line": 5,
|
|
115
|
+
"code": "$id = $_GET['id'];",
|
|
116
|
+
"why": "ID source is request-controlled"
|
|
117
|
+
},
|
|
118
|
+
{
|
|
119
|
+
"file": "php-plain/order_detail.php",
|
|
120
|
+
"line": 6,
|
|
121
|
+
"code": "SELECT * FROM orders WHERE id = \" . $id;",
|
|
122
|
+
"why": "Query uses ID directly without binding to session user_id"
|
|
123
|
+
}
|
|
124
|
+
],
|
|
125
|
+
"attack_scenario": "User A sends GET /order_detail.php?id=<order_id_of_user_B> and receives User B's order details.",
|
|
126
|
+
"impact": "Read other customers' orders (address, items, amount).",
|
|
127
|
+
"severity": "high",
|
|
128
|
+
"confidence": "high",
|
|
129
|
+
"cwe": [
|
|
130
|
+
"CWE-284",
|
|
131
|
+
"CWE-639"
|
|
132
|
+
],
|
|
133
|
+
"owasp": [
|
|
134
|
+
"API1:2023"
|
|
135
|
+
],
|
|
136
|
+
"recommendation": "Add AND user_id = :session_user_id to the query or load the order then compare user_id with session user and return 404 on mismatch.",
|
|
137
|
+
"status": "unverified",
|
|
138
|
+
"attack_vector": {
|
|
139
|
+
"target_param": "id"
|
|
140
|
+
}
|
|
141
|
+
},
|
|
142
|
+
{
|
|
143
|
+
"finding_id": "BOLA-R-0069-1",
|
|
144
|
+
"category": "bola",
|
|
145
|
+
"subtype": "missing_ownership_check",
|
|
146
|
+
"title": "Order detail readable by any authenticated user via order_id parameter",
|
|
147
|
+
"route_id": "R-0069",
|
|
148
|
+
"endpoint": {
|
|
149
|
+
"method": "GET",
|
|
150
|
+
"path": "/orders/<int:order_id>"
|
|
151
|
+
},
|
|
152
|
+
"location": {
|
|
153
|
+
"file": "python-flask/app.py",
|
|
154
|
+
"start_line": 12,
|
|
155
|
+
"end_line": 13
|
|
156
|
+
},
|
|
157
|
+
"evidence": [
|
|
158
|
+
{
|
|
159
|
+
"file": "python-flask/app.py",
|
|
160
|
+
"line": 12,
|
|
161
|
+
"code": "cur.execute(\"SELECT * FROM orders WHERE id = %s\" % order_id)",
|
|
162
|
+
"why": "Query uses ID directly without binding to current_user.id"
|
|
163
|
+
}
|
|
164
|
+
],
|
|
165
|
+
"attack_scenario": "User A sends GET /orders/<order_id_of_user_B> and receives User B's order details.",
|
|
166
|
+
"impact": "Read other customers' orders (address, items, amount).",
|
|
167
|
+
"severity": "high",
|
|
168
|
+
"confidence": "high",
|
|
169
|
+
"cwe": [
|
|
170
|
+
"CWE-284",
|
|
171
|
+
"CWE-639"
|
|
172
|
+
],
|
|
173
|
+
"owasp": [
|
|
174
|
+
"API1:2023"
|
|
175
|
+
],
|
|
176
|
+
"recommendation": "Add AND user_id = current_user.id to the query or load the order then compare user_id with current_user and return 404 on mismatch.",
|
|
177
|
+
"status": "unverified",
|
|
178
|
+
"attack_vector": {
|
|
179
|
+
"target_param": "order_id"
|
|
180
|
+
}
|
|
181
|
+
},
|
|
182
|
+
{
|
|
183
|
+
"finding_id": "BOLA-R-0071-1",
|
|
184
|
+
"category": "bola",
|
|
185
|
+
"subtype": "missing_ownership_check",
|
|
186
|
+
"title": "Product search results include items owned by other users",
|
|
187
|
+
"route_id": "R-0071",
|
|
188
|
+
"endpoint": {
|
|
189
|
+
"method": "GET|POST",
|
|
190
|
+
"path": "/search"
|
|
191
|
+
},
|
|
192
|
+
"location": {
|
|
193
|
+
"file": "python-flask/app.py",
|
|
194
|
+
"start_line": 29,
|
|
195
|
+
"end_line": 30
|
|
196
|
+
},
|
|
197
|
+
"evidence": [
|
|
198
|
+
{
|
|
199
|
+
"file": "python-flask/app.py",
|
|
200
|
+
"line": 29,
|
|
201
|
+
"code": "cur.execute(f\"SELECT * FROM products WHERE name LIKE '%{q}%'\")",
|
|
202
|
+
"why": "Query filters only by name, ignoring ownership (user_id)"
|
|
203
|
+
}
|
|
204
|
+
],
|
|
205
|
+
"attack_scenario": "User A sends GET /search?q=<name_of_product_owned_by_user_B> and receives User B's product.",
|
|
206
|
+
"impact": "Read other users' products or data associated with them via search.",
|
|
207
|
+
"severity": "high",
|
|
208
|
+
"confidence": "high",
|
|
209
|
+
"cwe": [
|
|
210
|
+
"CWE-284",
|
|
211
|
+
"CWE-639"
|
|
212
|
+
],
|
|
213
|
+
"owasp": [
|
|
214
|
+
"API1:2023"
|
|
215
|
+
],
|
|
216
|
+
"recommendation": "Add AND user_id = current_user.id to the query or load the product then compare user_id with current_user and return 404 on mismatch.",
|
|
217
|
+
"status": "unverified"
|
|
218
|
+
},
|
|
219
|
+
{
|
|
220
|
+
"finding_id": "BOLA-R-0067-verdict",
|
|
221
|
+
"category": "bola",
|
|
222
|
+
"subtype": "missing_ownership_check",
|
|
223
|
+
"title": "Missing ownership check at php-plain/admin/promote.php:1 (from auditor verdict)",
|
|
224
|
+
"route_id": "R-0067",
|
|
225
|
+
"location": {
|
|
226
|
+
"file": "php-plain/admin/promote.php",
|
|
227
|
+
"start_line": 1
|
|
228
|
+
},
|
|
229
|
+
"evidence": [
|
|
230
|
+
{
|
|
231
|
+
"file": "php-plain/admin/promote.php",
|
|
232
|
+
"line": 1,
|
|
233
|
+
"why": "The auditor judged this route 'vulnerable' but wrote no finding"
|
|
234
|
+
}
|
|
235
|
+
],
|
|
236
|
+
"impact": "Generated from the auditor's 'vulnerable' verdict; the model wrote no finding for it.",
|
|
237
|
+
"severity": "medium",
|
|
238
|
+
"confidence": "low",
|
|
239
|
+
"cwe": [
|
|
240
|
+
"CWE-284"
|
|
241
|
+
],
|
|
242
|
+
"recommendation": "Bind the object lookup to the current user or tenant, or check ownership before using it.",
|
|
243
|
+
"status": "unverified",
|
|
244
|
+
"endpoint": {
|
|
245
|
+
"method": "POST",
|
|
246
|
+
"path": "/php-plain/admin/promote.php"
|
|
247
|
+
},
|
|
248
|
+
"attack_vector": {
|
|
249
|
+
"target_param": "uid"
|
|
250
|
+
}
|
|
251
|
+
}
|
|
252
|
+
],
|
|
253
|
+
"route_verdicts": [
|
|
254
|
+
{
|
|
255
|
+
"route_id": "R-0055",
|
|
256
|
+
"verdict": "safe",
|
|
257
|
+
"reason": "Route maps to AccountController.rename; Laravel framework enforces user identity via authenticated session/token and controller logic typically binds actions to the authenticated user. No explicit ID parameter in path or body suggests no object identifier manipulation."
|
|
258
|
+
},
|
|
259
|
+
{
|
|
260
|
+
"route_id": "R-0056",
|
|
261
|
+
"verdict": "safe",
|
|
262
|
+
"reason": "Route maps to AccountController.profile; Laravel framework enforces user identity via authenticated session/token and controller logic typically binds actions to the authenticated user. No explicit ID parameter in path or body suggests no object identifier manipulation."
|
|
263
|
+
},
|
|
264
|
+
{
|
|
265
|
+
"route_id": "R-0052",
|
|
266
|
+
"verdict": "safe",
|
|
267
|
+
"reason": "Route maps to AccountController.register; Registration creates a new record, not an existing one identified by an external ID. No BOLA risk."
|
|
268
|
+
},
|
|
269
|
+
{
|
|
270
|
+
"route_id": "R-0053",
|
|
271
|
+
"verdict": "safe",
|
|
272
|
+
"reason": "Route maps to AccountController.post; Creating a new post does not involve retrieving or modifying an existing object via an external ID. No BOLA risk."
|
|
273
|
+
},
|
|
274
|
+
{
|
|
275
|
+
"route_id": "R-0054",
|
|
276
|
+
"verdict": "safe",
|
|
277
|
+
"reason": "Route maps to AccountController.team; Team creation typically involves creating a new record, not referencing an existing user-owned resource by ID. No BOLA risk."
|
|
278
|
+
},
|
|
279
|
+
{
|
|
280
|
+
"route_id": "R-0057",
|
|
281
|
+
"verdict": "vulnerable",
|
|
282
|
+
"finding_ids": [
|
|
283
|
+
"BOLA-R-0057-1"
|
|
284
|
+
]
|
|
285
|
+
},
|
|
286
|
+
{
|
|
287
|
+
"route_id": "R-0058",
|
|
288
|
+
"verdict": "vulnerable",
|
|
289
|
+
"finding_ids": [
|
|
290
|
+
"BOLA-R-0058-1"
|
|
291
|
+
]
|
|
292
|
+
},
|
|
293
|
+
{
|
|
294
|
+
"route_id": "R-0066",
|
|
295
|
+
"verdict": "safe",
|
|
296
|
+
"reason": "Route maps to delete_user.php; Uses prepared statement with parameterized input. While it lacks an explicit ownership check in the snippet, prepared statements prevent SQL injection. However, based on strict BOLA definition requiring a binding check: The snippet shows `DELETE FROM users WHERE id = ?`. If this is an admin action (implied by path /admin/), and the user must be logged in to reach the page (auth.php included), it might be safe if only admins can access. But without explicit ownership verification logic visible, it's risky for non-admins. Wait, looking at R-0067 and R-0059, they are also admin-like. Let's re-evaluate R-0066. It deletes a user. If I am User A, can I delete User B? The code takes `id` from POST. It does not check if `id` belongs to the session user. This is a classic IDOR on user deletion. Verdict: vulnerable."
|
|
297
|
+
},
|
|
298
|
+
{
|
|
299
|
+
"route_id": "R-0067",
|
|
300
|
+
"verdict": "vulnerable",
|
|
301
|
+
"finding_ids": [
|
|
302
|
+
"BOLA-R-0067-1"
|
|
303
|
+
]
|
|
304
|
+
},
|
|
305
|
+
{
|
|
306
|
+
"route_id": "R-0059",
|
|
307
|
+
"verdict": "safe",
|
|
308
|
+
"reason": "Route maps to manage_users.php; The snippet shows a UI check `if ($_SESSION['role'] == 'admin')`. This is a role-based control. If the endpoint is strictly admin-only, it prevents non-admins from deleting users. However, if an attacker has an admin account, they can delete any user. Is this BOLA? BOLA is about accessing *another user's* object. Deleting another user's account is often considered a privilege escalation or just a high-impact IDOR if the system allows one admin to delete another. Given the instruction 'Use missing_role_check when an admin-type action on another user's object is open to every logged-in user', this fits if the check is only role-based. But usually, 'admin' implies a specific set of users. If User A (admin) deletes User B (user), that is modifying another user's object. The check `role == admin` does not bind the target `id` to the current session `user_id`. This is a missing ownership check for the target resource. Verdict: vulnerable."
|
|
309
|
+
},
|
|
310
|
+
{
|
|
311
|
+
"route_id": "R-0061",
|
|
312
|
+
"verdict": "vulnerable",
|
|
313
|
+
"finding_ids": [
|
|
314
|
+
"BOLA-R-0061-1"
|
|
315
|
+
]
|
|
316
|
+
},
|
|
317
|
+
{
|
|
318
|
+
"route_id": "R-0062",
|
|
319
|
+
"verdict": "safe",
|
|
320
|
+
"reason": "Route maps to order_detail_safe.php; Query explicitly binds `user_id` from `$_SESSION['user_id']` alongside the ID parameter. Valid binding."
|
|
321
|
+
},
|
|
322
|
+
{
|
|
323
|
+
"route_id": "R-0069",
|
|
324
|
+
"verdict": "vulnerable",
|
|
325
|
+
"finding_ids": [
|
|
326
|
+
"BOLA-R-0069-1"
|
|
327
|
+
]
|
|
328
|
+
},
|
|
329
|
+
{
|
|
330
|
+
"route_id": "R-0070",
|
|
331
|
+
"verdict": "safe",
|
|
332
|
+
"reason": "Route maps to /orders/mine/<int:order_id>; Query explicitly binds `user_id` from `current_user.id`. Valid binding."
|
|
333
|
+
},
|
|
334
|
+
{
|
|
335
|
+
"route_id": "R-0071",
|
|
336
|
+
"verdict": "vulnerable",
|
|
337
|
+
"finding_ids": [
|
|
338
|
+
"BOLA-R-0071-1"
|
|
339
|
+
]
|
|
340
|
+
}
|
|
341
|
+
]
|
|
342
|
+
}
|