@hoanghainh/komagu 1.8.0 → 2.0.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +20 -0
- package/README.md +1 -1
- package/assess/lsa/CHANGELOG.md +6 -0
- package/assess/lsa/VERSION +1 -1
- package/assess/lsa/adapters/build_adapters.py +16 -8
- package/assess/lsa/adapters/codex/README.md +1 -1
- package/assess/lsa/adapters/generic/README.md +1 -1
- package/assess/lsa/examples/eval-run-4/ground-truth.json +823 -0
- package/assess/lsa/examples/eval-run-4/iter0-gptoss-a/ai-run-stats.json +58 -0
- package/assess/lsa/examples/eval-run-4/iter0-gptoss-a/coverage.json +85 -0
- package/assess/lsa/examples/eval-run-4/iter0-gptoss-a/findings/priv-privilege-001.json +822 -0
- package/assess/lsa/examples/eval-run-4/iter0-gptoss-a/findings/priv-privilege-002.json +393 -0
- package/assess/lsa/examples/eval-run-4/iter0-gptoss-a/findings.json +4477 -0
- package/assess/lsa/examples/eval-run-4/iter0-gptoss-a/mass-assignment.candidates.json +232 -0
- package/assess/lsa/examples/eval-run-4/iter0-gptoss-a/routes/routes-001.json +425 -0
- package/assess/lsa/examples/eval-run-4/iter0-gptoss-a/routes/routes-002.json +333 -0
- package/assess/lsa/examples/eval-run-4/iter0-gptoss-a/routes/routes-003.json +400 -0
- package/assess/lsa/examples/eval-run-4/iter0-gptoss-a/routes/routes-004.json +403 -0
- package/assess/lsa/examples/eval-run-4/iter0-gptoss-a/routes/routes-005.json +398 -0
- package/assess/lsa/examples/eval-run-4/iter0-gptoss-a/routes/routes-006.json +63 -0
- package/assess/lsa/examples/eval-run-4/iter0-gptoss-a/score.json +120 -0
- package/assess/lsa/examples/eval-run-4/iter1-gptoss-a/ai-run-stats.json +55 -0
- package/assess/lsa/examples/eval-run-4/iter1-gptoss-a/coverage.json +50 -0
- package/assess/lsa/examples/eval-run-4/iter1-gptoss-a/findings/priv-privilege-001.json +613 -0
- package/assess/lsa/examples/eval-run-4/iter1-gptoss-a/findings/priv-privilege-002.json +287 -0
- package/assess/lsa/examples/eval-run-4/iter1-gptoss-a/findings.json +4870 -0
- package/assess/lsa/examples/eval-run-4/iter1-gptoss-a/mass-assignment.candidates.json +232 -0
- package/assess/lsa/examples/eval-run-4/iter1-gptoss-a/routes/routes-001.json +425 -0
- package/assess/lsa/examples/eval-run-4/iter1-gptoss-a/routes/routes-002.json +333 -0
- package/assess/lsa/examples/eval-run-4/iter1-gptoss-a/routes/routes-003.json +400 -0
- package/assess/lsa/examples/eval-run-4/iter1-gptoss-a/routes/routes-004.json +403 -0
- package/assess/lsa/examples/eval-run-4/iter1-gptoss-a/routes/routes-005.json +398 -0
- package/assess/lsa/examples/eval-run-4/iter1-gptoss-a/routes/routes-006.json +63 -0
- package/assess/lsa/examples/eval-run-4/iter1-gptoss-a/score.json +107 -0
- package/assess/lsa/examples/eval-run-4/iter1-gptoss-b/ai-run-stats.json +58 -0
- package/assess/lsa/examples/eval-run-4/iter1-gptoss-b/coverage.json +92 -0
- package/assess/lsa/examples/eval-run-4/iter1-gptoss-b/findings/priv-privilege-001.json +645 -0
- package/assess/lsa/examples/eval-run-4/iter1-gptoss-b/findings/priv-privilege-002.json +222 -0
- package/assess/lsa/examples/eval-run-4/iter1-gptoss-b/findings.json +4859 -0
- package/assess/lsa/examples/eval-run-4/iter1-gptoss-b/mass-assignment.candidates.json +232 -0
- package/assess/lsa/examples/eval-run-4/iter1-gptoss-b/routes/routes-001.json +425 -0
- package/assess/lsa/examples/eval-run-4/iter1-gptoss-b/routes/routes-002.json +333 -0
- package/assess/lsa/examples/eval-run-4/iter1-gptoss-b/routes/routes-003.json +400 -0
- package/assess/lsa/examples/eval-run-4/iter1-gptoss-b/routes/routes-004.json +403 -0
- package/assess/lsa/examples/eval-run-4/iter1-gptoss-b/routes/routes-005.json +398 -0
- package/assess/lsa/examples/eval-run-4/iter1-gptoss-b/routes/routes-006.json +63 -0
- package/assess/lsa/examples/eval-run-4/iter1-gptoss-b/score.json +121 -0
- package/assess/lsa/examples/eval-run-4/iter1-qwen-a-incomplete/coverage.json +111 -0
- package/assess/lsa/examples/eval-run-4/iter1-qwen-a-incomplete/findings/priv-privilege-001.json +6 -0
- package/assess/lsa/examples/eval-run-4/iter1-qwen-a-incomplete/findings/priv-privilege-002.json +344 -0
- package/assess/lsa/examples/eval-run-4/iter1-qwen-a-incomplete/findings.json +3544 -0
- package/assess/lsa/examples/eval-run-4/iter1-qwen-a-incomplete/mass-assignment.candidates.json +232 -0
- package/assess/lsa/examples/eval-run-4/iter1-qwen-a-incomplete/routes/routes-001.json +425 -0
- package/assess/lsa/examples/eval-run-4/iter1-qwen-a-incomplete/routes/routes-002.json +333 -0
- package/assess/lsa/examples/eval-run-4/iter1-qwen-a-incomplete/routes/routes-003.json +400 -0
- package/assess/lsa/examples/eval-run-4/iter1-qwen-a-incomplete/routes/routes-004.json +403 -0
- package/assess/lsa/examples/eval-run-4/iter1-qwen-a-incomplete/routes/routes-005.json +398 -0
- package/assess/lsa/examples/eval-run-4/iter1-qwen-a-incomplete/routes/routes-006.json +63 -0
- package/assess/lsa/examples/eval-run-4/iter1-qwen-a-incomplete/score.json +123 -0
- package/assess/lsa/examples/eval-run-4/iter2-gptoss-a/ai-run-stats.json +50 -0
- package/assess/lsa/examples/eval-run-4/iter2-gptoss-a/coverage.json +42 -0
- package/assess/lsa/examples/eval-run-4/iter2-gptoss-a/findings/priv-privilege-001.json +540 -0
- package/assess/lsa/examples/eval-run-4/iter2-gptoss-a/findings/priv-privilege-002.json +238 -0
- package/assess/lsa/examples/eval-run-4/iter2-gptoss-a/findings.json +4383 -0
- package/assess/lsa/examples/eval-run-4/iter2-gptoss-a/findings.sarif +8729 -0
- package/assess/lsa/examples/eval-run-4/iter2-gptoss-a/mass-assignment.candidates.json +232 -0
- package/assess/lsa/examples/eval-run-4/iter2-gptoss-a/report.ja.md +1911 -0
- package/assess/lsa/examples/eval-run-4/iter2-gptoss-a/report.md +1911 -0
- package/assess/lsa/examples/eval-run-4/iter2-gptoss-a/routes/routes-001.json +425 -0
- package/assess/lsa/examples/eval-run-4/iter2-gptoss-a/routes/routes-002.json +333 -0
- package/assess/lsa/examples/eval-run-4/iter2-gptoss-a/routes/routes-003.json +400 -0
- package/assess/lsa/examples/eval-run-4/iter2-gptoss-a/routes/routes-004.json +403 -0
- package/assess/lsa/examples/eval-run-4/iter2-gptoss-a/routes/routes-005.json +398 -0
- package/assess/lsa/examples/eval-run-4/iter2-gptoss-a/routes/routes-006.json +63 -0
- package/assess/lsa/examples/eval-run-4/iter2-gptoss-a/score.json +101 -0
- package/assess/lsa/examples/eval-run-4/iter2-gptoss-a/stack-profile.json +226 -0
- package/assess/lsa/examples/eval-run-4/iter2-gptoss-b/ai-run-stats.json +54 -0
- package/assess/lsa/examples/eval-run-4/iter2-gptoss-b/coverage.json +66 -0
- package/assess/lsa/examples/eval-run-4/iter2-gptoss-b/findings/priv-privilege-001.json +440 -0
- package/assess/lsa/examples/eval-run-4/iter2-gptoss-b/findings/priv-privilege-002.json +229 -0
- package/assess/lsa/examples/eval-run-4/iter2-gptoss-b/findings.json +3424 -0
- package/assess/lsa/examples/eval-run-4/iter2-gptoss-b/mass-assignment.candidates.json +232 -0
- package/assess/lsa/examples/eval-run-4/iter2-gptoss-b/routes/routes-001.json +425 -0
- package/assess/lsa/examples/eval-run-4/iter2-gptoss-b/routes/routes-002.json +333 -0
- package/assess/lsa/examples/eval-run-4/iter2-gptoss-b/routes/routes-003.json +400 -0
- package/assess/lsa/examples/eval-run-4/iter2-gptoss-b/routes/routes-004.json +403 -0
- package/assess/lsa/examples/eval-run-4/iter2-gptoss-b/routes/routes-005.json +398 -0
- package/assess/lsa/examples/eval-run-4/iter2-gptoss-b/routes/routes-006.json +63 -0
- package/assess/lsa/examples/eval-run-4/iter2-gptoss-b/score.json +120 -0
- package/assess/lsa/examples/eval-run-5/gptoss-a/ai-run-stats.json +88 -0
- package/assess/lsa/examples/eval-run-5/gptoss-a/coverage.json +36 -0
- package/assess/lsa/examples/eval-run-5/gptoss-a/findings/priv-privilege-001.json +530 -0
- package/assess/lsa/examples/eval-run-5/gptoss-a/findings/priv-privilege-002.json +248 -0
- package/assess/lsa/examples/eval-run-5/gptoss-a/findings.json +4766 -0
- package/assess/lsa/examples/eval-run-5/gptoss-a/findings.sarif +9326 -0
- package/assess/lsa/examples/eval-run-5/gptoss-a/mass-assignment.candidates.json +232 -0
- package/assess/lsa/examples/eval-run-5/gptoss-a/report.ja.md +2011 -0
- package/assess/lsa/examples/eval-run-5/gptoss-a/report.md +2011 -0
- package/assess/lsa/examples/eval-run-5/gptoss-a/routes/routes-001.json +425 -0
- package/assess/lsa/examples/eval-run-5/gptoss-a/routes/routes-002.json +333 -0
- package/assess/lsa/examples/eval-run-5/gptoss-a/routes/routes-003.json +400 -0
- package/assess/lsa/examples/eval-run-5/gptoss-a/routes/routes-004.json +403 -0
- package/assess/lsa/examples/eval-run-5/gptoss-a/routes/routes-005.json +398 -0
- package/assess/lsa/examples/eval-run-5/gptoss-a/routes/routes-006.json +63 -0
- package/assess/lsa/examples/eval-run-5/gptoss-a/score.json +80 -0
- package/assess/lsa/examples/eval-run-5/gptoss-a/stack-profile.json +226 -0
- package/assess/lsa/examples/eval-run-5/gptoss-b/ai-run-stats.json +83 -0
- package/assess/lsa/examples/eval-run-5/gptoss-b/coverage.json +44 -0
- package/assess/lsa/examples/eval-run-5/gptoss-b/findings/priv-privilege-001.json +579 -0
- package/assess/lsa/examples/eval-run-5/gptoss-b/findings/priv-privilege-002.json +268 -0
- package/assess/lsa/examples/eval-run-5/gptoss-b/findings.json +3913 -0
- package/assess/lsa/examples/eval-run-5/gptoss-b/mass-assignment.candidates.json +232 -0
- package/assess/lsa/examples/eval-run-5/gptoss-b/routes/routes-001.json +425 -0
- package/assess/lsa/examples/eval-run-5/gptoss-b/routes/routes-002.json +333 -0
- package/assess/lsa/examples/eval-run-5/gptoss-b/routes/routes-003.json +400 -0
- package/assess/lsa/examples/eval-run-5/gptoss-b/routes/routes-004.json +403 -0
- package/assess/lsa/examples/eval-run-5/gptoss-b/routes/routes-005.json +398 -0
- package/assess/lsa/examples/eval-run-5/gptoss-b/routes/routes-006.json +63 -0
- package/assess/lsa/examples/eval-run-5/gptoss-b/score.json +94 -0
- package/assess/lsa/examples/eval-run-5/ground-truth.json +823 -0
- package/assess/lsa/knowledge/severity-and-cwe.md +1 -1
- package/assess/lsa/prompts/35-privilege-auditor.md +3 -1
- package/assess/lsa/scripts/baseline.py +5 -2
- package/assess/lsa/scripts/findings_to_sarif.py +24 -1
- package/assess/lsa/tests/EVAL-RESULTS.md +156 -0
- package/assess/lsa/tests/score_findings.py +58 -0
- package/assess/lsa/tests/test_adapters.py +21 -2
- package/assess/lsa/tests/test_baseline.py +8 -0
- package/assess/lsa/tests/test_contract_groundwork.py +7 -7
- package/assess/lsa/tests/test_eval_run_4.py +73 -0
- package/assess/lsa/tests/test_eval_run_5.py +73 -0
- package/assess/lsa/tests/test_privilege_tier2.py +30 -0
- package/operate/ai/anchoring.py +130 -0
- package/operate/ai/client.py +13 -0
- package/operate/ai/context.py +105 -0
- package/operate/ai/runner.py +197 -69
- package/operate/cli/__init__.py +1 -1
- package/operate/cli/commands/scan.py +3 -8
- package/operate/cli/commands/test.py +1 -1
- package/operate/cli/env.py +4 -20
- package/operate/cross_user_tester/persona_matrix.py +5 -1
- package/operate/devsecops/pipeline.py +5 -5
- package/operate/exploit/generator.py +5 -1
- package/operate/lsa_sarif/lsa_to_sarif.py +24 -2
- package/operate/lsa_sarif/sarif_findings.py +96 -0
- package/operate/remediator/runner.py +1 -5
- package/operate/remediator/strategies.py +1 -1
- package/operate/tests/test_ai_anchoring.py +184 -0
- package/operate/tests/test_cli_baseline.py +1 -9
- package/operate/tests/test_cli_env.py +8 -29
- package/operate/tests/test_cross_user_pipeline.py +2 -2
- package/operate/tests/test_exploit_and_virtual_patch.py +3 -3
- package/operate/tests/test_headless_ai.py +148 -1
- package/operate/tests/test_npm_package.py +2 -16
- package/operate/tests/test_sarif_from_scan.py +156 -0
- package/package.json +2 -4
- package/remediate/authz/README.md +1 -1
- package/remediate/authz/dotnet/src/Komagu.Security.Authorization/DefaultKomaguAuthorizationService.cs +1 -1
- package/remediate/authz/dotnet/src/Komagu.Security.Authorization/SecurityAuditEvent.cs +2 -2
- package/remediate/authz/golang/authz.go +1 -1
- package/remediate/authz/nodejs/src/service.js +1 -1
- package/remediate/authz/nodejs/tests/test-authz.js +1 -1
- package/remediate/authz/patcher.py +3 -4
- package/remediate/authz/python/komagu_authz/models.py +2 -2
- package/remediate/authz/python/tests/test_fastapi_adapter.py +1 -1
- package/remediate/authz/python/tests/test_fastapi_d5_crosstest.py +1 -1
- package/remediate/authz/python/tests/test_python_authz.py +3 -3
- package/remediate/authz/spring/src/main/kotlin/io/komagu/security/authorization/DefaultKomaguSecurityManager.kt +1 -1
- package/remediate/authz/spring/src/main/kotlin/io/komagu/security/authorization/SecurityAuditEvent.kt +1 -2
- package/remediate/authz/tests/test_bola_patcher.py +1 -1
- package/remediate/edge/coraza/rules/coraza-crs-custom.conf +3 -4
- package/remediate/edge/coraza/virtual_patcher.py +4 -6
- package/remediate/edge/docker-compose.yml +1 -1
- package/remediate/ekyc/server/jpki_verifier.py +2 -8
- package/remediate/ekyc/server/tokenization.py +2 -8
- package/remediate/identity/README.md +5 -5
- package/remediate/identity/dotnet/src/Komagu.Security.Identity/KomaguOidcOptions.cs +2 -2
- package/remediate/identity/dotnet/tests/Komagu.Security.Identity.Tests/TestTokenGenerator.cs +1 -1
- package/remediate/identity/dotnet/tests/Komagu.Security.Identity.Tests/TokenValidationTests.cs +1 -1
- package/remediate/identity/python/komagu_identity/oidc_validator.py +2 -8
- package/remediate/identity/python/tests/test_oidc_validator.py +1 -1
- package/remediate/identity/spring/src/main/kotlin/io/komagu/security/identity/KomaguOidcProperties.kt +2 -2
- package/remediate/identity/spring/src/test/kotlin/io/komagu/security/identity/KomaguIdentityAutoConfigurationTest.kt +2 -2
- package/remediate/identity/spring/src/test/kotlin/io/komagu/security/identity/TestJwtFactory.kt +1 -1
- package/remediate/identity/spring/src/test/kotlin/io/komagu/security/identity/TokenValidationIntegrationTest.kt +1 -1
- package/remediate/identity/test-env/realm-komagu.json +1 -1
- package/remediate/legacy_shims/coldfusion/KomaguSecurityShim.cfc +5 -5
- package/remediate/query/README.md +1 -1
- package/remediate/query/dotnet/src/Komagu.Security.Query.Analyzers/DiagnosticIds.cs +1 -1
- package/remediate/query/dotnet/src/Komagu.Security.Query.Analyzers/Komagu.Security.Query.Analyzers.csproj +1 -1
- package/remediate/query/spring/src/main/kotlin/io/komagu/security/query/detekt/KomaguRuleSetProvider.kt +1 -1
- package/remediate/resilience/dr/dr_manager.py +2 -8
- package/remediate/resilience/dr/runbook.md +2 -2
- package/remediate/resilience/terraform/variables.tf +1 -1
- package/remediate/tenancy/audit/audit_trail.py +2 -8
- package/remediate/tenancy/crypto/byok_manager.py +2 -8
- package/remediate/tenancy/middleware/tenant_context.py +2 -8
- package/remediate/tenancy/sql/rls_isolation.sql +11 -11
- package/remediate/tenancy/sql/schema_per_tenant.sql +7 -7
- package/remediate/tenancy/test_sql_postgres.py +1 -1
- package/remediate/tenancy/tests/test_tenancy.py +4 -4
- package/bin/komainu +0 -16
- package/bin/komainu-legacy.js +0 -16
- package/remediate/ekyc/tests/test_legacy_env.py +0 -33
- package/remediate/identity/python/tests/test_legacy_env.py +0 -33
- package/remediate/identity/spring/src/main/kotlin/io/komagu/security/identity/LegacyKomainuPropertiesPostProcessor.kt +0 -60
- package/remediate/identity/spring/src/main/resources/META-INF/spring.factories +0 -2
- package/remediate/identity/spring/src/test/kotlin/io/komagu/security/identity/LegacyKomainuPropertiesPostProcessorTest.kt +0 -86
- package/remediate/resilience/tests/test_legacy_env.py +0 -33
- package/remediate/tenancy/tests/test_legacy_env.py +0 -49
|
@@ -0,0 +1,540 @@
|
|
|
1
|
+
{
|
|
2
|
+
"batch_id": "privilege-001",
|
|
3
|
+
"findings": [
|
|
4
|
+
{
|
|
5
|
+
"finding_id": "BFLA-R-0003-1",
|
|
6
|
+
"category": "bfla",
|
|
7
|
+
"subtype": "missing_role_check",
|
|
8
|
+
"title": "Unrestricted member deletion in classic\u2011ASP",
|
|
9
|
+
"route_id": "R-0003",
|
|
10
|
+
"location": {
|
|
11
|
+
"file": "classic-asp/shop/member.asp",
|
|
12
|
+
"start_line": 1
|
|
13
|
+
},
|
|
14
|
+
"evidence": [
|
|
15
|
+
{
|
|
16
|
+
"file": "classic-asp/shop/member.asp",
|
|
17
|
+
"line": 10,
|
|
18
|
+
"why": "DELETE FROM members WHERE member_id = ... (privileged action, no role check)"
|
|
19
|
+
},
|
|
20
|
+
{
|
|
21
|
+
"file": "classic-asp/shop/member.asp",
|
|
22
|
+
"line": 9,
|
|
23
|
+
"why": "no role check before the delete"
|
|
24
|
+
}
|
|
25
|
+
],
|
|
26
|
+
"impact": "Any authenticated user can delete any member record.",
|
|
27
|
+
"severity": "critical",
|
|
28
|
+
"confidence": "high",
|
|
29
|
+
"cwe": [
|
|
30
|
+
"CWE-285"
|
|
31
|
+
],
|
|
32
|
+
"recommendation": "Add a server\u2011side check that the current user has admin privileges before executing the delete.",
|
|
33
|
+
"status": "unverified"
|
|
34
|
+
},
|
|
35
|
+
{
|
|
36
|
+
"finding_id": "BFLA-R-0007-1",
|
|
37
|
+
"category": "bfla",
|
|
38
|
+
"subtype": "missing_role_check",
|
|
39
|
+
"title": "Unauthenticated user can delete any user in ASP.NET MVC",
|
|
40
|
+
"route_id": "R-0007",
|
|
41
|
+
"location": {
|
|
42
|
+
"file": "Web/Controllers/AdminController.cs",
|
|
43
|
+
"start_line": 1
|
|
44
|
+
},
|
|
45
|
+
"evidence": [
|
|
46
|
+
{
|
|
47
|
+
"file": "Web/Controllers/AdminController.cs",
|
|
48
|
+
"line": 14,
|
|
49
|
+
"why": "db.Users.Remove(u); (privileged action, no role check)"
|
|
50
|
+
},
|
|
51
|
+
{
|
|
52
|
+
"file": "Web/Controllers/AdminController.cs",
|
|
53
|
+
"line": 12,
|
|
54
|
+
"why": "no [Authorize(Roles=\"Admin\")] on DeleteUser"
|
|
55
|
+
}
|
|
56
|
+
],
|
|
57
|
+
"impact": "Any authenticated user can delete any account.",
|
|
58
|
+
"severity": "critical",
|
|
59
|
+
"confidence": "high",
|
|
60
|
+
"cwe": [
|
|
61
|
+
"CWE-285"
|
|
62
|
+
],
|
|
63
|
+
"recommendation": "Add [Authorize(Roles=\"Admin\")] to DeleteUser or enforce role check in code.",
|
|
64
|
+
"status": "unverified"
|
|
65
|
+
},
|
|
66
|
+
{
|
|
67
|
+
"finding_id": "BFLA-R-0009-1",
|
|
68
|
+
"category": "bfla",
|
|
69
|
+
"subtype": "role_from_request",
|
|
70
|
+
"title": "Export endpoint controlled by request parameter in ASP.NET MVC",
|
|
71
|
+
"route_id": "R-0009",
|
|
72
|
+
"location": {
|
|
73
|
+
"file": "Web/Controllers/AdminController.cs",
|
|
74
|
+
"start_line": 1
|
|
75
|
+
},
|
|
76
|
+
"evidence": [
|
|
77
|
+
{
|
|
78
|
+
"file": "Web/Controllers/AdminController.cs",
|
|
79
|
+
"line": 32,
|
|
80
|
+
"why": "if (Request.QueryString[\"isAdmin\"] == \"true\") return Json(db.Users.ToList());"
|
|
81
|
+
},
|
|
82
|
+
{
|
|
83
|
+
"file": "Web/Controllers/AdminController.cs",
|
|
84
|
+
"line": 30,
|
|
85
|
+
"why": "no role check before the export"
|
|
86
|
+
}
|
|
87
|
+
],
|
|
88
|
+
"impact": "Any authenticated user can export all user data by setting isAdmin=true.",
|
|
89
|
+
"severity": "critical",
|
|
90
|
+
"confidence": "high",
|
|
91
|
+
"cwe": [
|
|
92
|
+
"CWE-269",
|
|
93
|
+
"CWE-285"
|
|
94
|
+
],
|
|
95
|
+
"recommendation": "Validate the caller's role server\u2011side before returning the data.",
|
|
96
|
+
"status": "unverified"
|
|
97
|
+
},
|
|
98
|
+
{
|
|
99
|
+
"finding_id": "BFLA-R-0023-1",
|
|
100
|
+
"category": "bfla",
|
|
101
|
+
"subtype": "missing_role_check",
|
|
102
|
+
"title": "Unprotected user deletion in Spring MVC",
|
|
103
|
+
"route_id": "R-0023",
|
|
104
|
+
"location": {
|
|
105
|
+
"file": "com/acme/web/AdminUserController.java",
|
|
106
|
+
"start_line": 1
|
|
107
|
+
},
|
|
108
|
+
"evidence": [
|
|
109
|
+
{
|
|
110
|
+
"file": "com/acme/web/AdminUserController.java",
|
|
111
|
+
"line": 15,
|
|
112
|
+
"why": "userDao.deleteById(id); (privileged action, no role check)"
|
|
113
|
+
},
|
|
114
|
+
{
|
|
115
|
+
"file": "com/acme/web/AdminUserController.java",
|
|
116
|
+
"line": 13,
|
|
117
|
+
"why": "no @PreAuthorize on delete method"
|
|
118
|
+
}
|
|
119
|
+
],
|
|
120
|
+
"impact": "Any authenticated user can delete any user.",
|
|
121
|
+
"severity": "critical",
|
|
122
|
+
"confidence": "high",
|
|
123
|
+
"cwe": [
|
|
124
|
+
"CWE-285"
|
|
125
|
+
],
|
|
126
|
+
"recommendation": "Add @PreAuthorize(\"hasRole('ADMIN')\") to the delete method.",
|
|
127
|
+
"status": "unverified"
|
|
128
|
+
},
|
|
129
|
+
{
|
|
130
|
+
"finding_id": "BFLA-R-0030-1",
|
|
131
|
+
"category": "bfla",
|
|
132
|
+
"subtype": "missing_role_check",
|
|
133
|
+
"title": "Unprotected user deletion in Express.js",
|
|
134
|
+
"route_id": "R-0030",
|
|
135
|
+
"location": {
|
|
136
|
+
"file": "routes.js",
|
|
137
|
+
"start_line": 1
|
|
138
|
+
},
|
|
139
|
+
"evidence": [
|
|
140
|
+
{
|
|
141
|
+
"file": "routes.js",
|
|
142
|
+
"line": 9,
|
|
143
|
+
"why": "User.deleteOne({ _id: req.params.id }) (privileged action, no admin check)"
|
|
144
|
+
},
|
|
145
|
+
{
|
|
146
|
+
"file": "routes.js",
|
|
147
|
+
"line": 8,
|
|
148
|
+
"why": "ensureLoggedIn only, no requireAdmin"
|
|
149
|
+
}
|
|
150
|
+
],
|
|
151
|
+
"impact": "Any authenticated user can delete any user.",
|
|
152
|
+
"severity": "critical",
|
|
153
|
+
"confidence": "high",
|
|
154
|
+
"cwe": [
|
|
155
|
+
"CWE-285"
|
|
156
|
+
],
|
|
157
|
+
"recommendation": "Add a server\u2011side admin check before the delete operation.",
|
|
158
|
+
"status": "unverified"
|
|
159
|
+
},
|
|
160
|
+
{
|
|
161
|
+
"finding_id": "BFLA-R-0032-1",
|
|
162
|
+
"category": "bfla",
|
|
163
|
+
"subtype": "role_from_request",
|
|
164
|
+
"title": "Export endpoint controlled by query param in Express.js",
|
|
165
|
+
"route_id": "R-0032",
|
|
166
|
+
"location": {
|
|
167
|
+
"file": "routes.js",
|
|
168
|
+
"start_line": 1
|
|
169
|
+
},
|
|
170
|
+
"evidence": [
|
|
171
|
+
{
|
|
172
|
+
"file": "routes.js",
|
|
173
|
+
"line": 17,
|
|
174
|
+
"why": "res.json([]) when req.query.isAdmin === 'true' (privileged action, no role check)"
|
|
175
|
+
},
|
|
176
|
+
{
|
|
177
|
+
"file": "routes.js",
|
|
178
|
+
"line": 16,
|
|
179
|
+
"why": "ensureLoggedIn only, no admin check"
|
|
180
|
+
}
|
|
181
|
+
],
|
|
182
|
+
"impact": "Any authenticated user can export all users by setting isAdmin=true.",
|
|
183
|
+
"severity": "critical",
|
|
184
|
+
"confidence": "high",
|
|
185
|
+
"cwe": [
|
|
186
|
+
"CWE-269",
|
|
187
|
+
"CWE-285"
|
|
188
|
+
],
|
|
189
|
+
"recommendation": "Validate the caller's role server\u2011side before returning data.",
|
|
190
|
+
"status": "unverified"
|
|
191
|
+
},
|
|
192
|
+
{
|
|
193
|
+
"finding_id": "BFLA-R-0057-1",
|
|
194
|
+
"category": "bfla",
|
|
195
|
+
"subtype": "missing_role_check",
|
|
196
|
+
"title": "Unprotected user view in PHP plain",
|
|
197
|
+
"route_id": "R-0057",
|
|
198
|
+
"location": {
|
|
199
|
+
"file": "php-plain/admin.php",
|
|
200
|
+
"start_line": 1
|
|
201
|
+
},
|
|
202
|
+
"evidence": [
|
|
203
|
+
{
|
|
204
|
+
"file": "php-plain/admin.php",
|
|
205
|
+
"line": 8,
|
|
206
|
+
"why": "SELECT * FROM users WHERE id = ... (privileged action, no role check)"
|
|
207
|
+
},
|
|
208
|
+
{
|
|
209
|
+
"file": "php-plain/admin.php",
|
|
210
|
+
"line": 6,
|
|
211
|
+
"why": "no role check before the query"
|
|
212
|
+
}
|
|
213
|
+
],
|
|
214
|
+
"impact": "Any authenticated user can view any user record.",
|
|
215
|
+
"severity": "critical",
|
|
216
|
+
"confidence": "high",
|
|
217
|
+
"cwe": [
|
|
218
|
+
"CWE-285"
|
|
219
|
+
],
|
|
220
|
+
"recommendation": "Add a server\u2011side admin check before executing the query.",
|
|
221
|
+
"status": "unverified"
|
|
222
|
+
},
|
|
223
|
+
{
|
|
224
|
+
"finding_id": "BFLA-R-0058-1",
|
|
225
|
+
"category": "bfla",
|
|
226
|
+
"subtype": "missing_role_check",
|
|
227
|
+
"title": "Unprotected user deletion in PHP plain",
|
|
228
|
+
"route_id": "R-0058",
|
|
229
|
+
"location": {
|
|
230
|
+
"file": "php-plain/admin.php",
|
|
231
|
+
"start_line": 1
|
|
232
|
+
},
|
|
233
|
+
"evidence": [
|
|
234
|
+
{
|
|
235
|
+
"file": "php-plain/admin.php",
|
|
236
|
+
"line": 12,
|
|
237
|
+
"why": "DELETE FROM users WHERE id = $id (privileged action, no role check)"
|
|
238
|
+
},
|
|
239
|
+
{
|
|
240
|
+
"file": "php-plain/admin.php",
|
|
241
|
+
"line": 10,
|
|
242
|
+
"why": "no role check before the delete"
|
|
243
|
+
}
|
|
244
|
+
],
|
|
245
|
+
"impact": "Any authenticated user can delete any user.",
|
|
246
|
+
"severity": "critical",
|
|
247
|
+
"confidence": "high",
|
|
248
|
+
"cwe": [
|
|
249
|
+
"CWE-285"
|
|
250
|
+
],
|
|
251
|
+
"recommendation": "Add a server\u2011side admin check before executing the delete.",
|
|
252
|
+
"status": "unverified"
|
|
253
|
+
},
|
|
254
|
+
{
|
|
255
|
+
"finding_id": "BFLA-R-0066-1",
|
|
256
|
+
"category": "bfla",
|
|
257
|
+
"subtype": "missing_role_check",
|
|
258
|
+
"title": "Unprotected user deletion in PHP plain",
|
|
259
|
+
"route_id": "R-0066",
|
|
260
|
+
"location": {
|
|
261
|
+
"file": "php-plain/admin/delete_user.php",
|
|
262
|
+
"start_line": 1
|
|
263
|
+
},
|
|
264
|
+
"evidence": [
|
|
265
|
+
{
|
|
266
|
+
"file": "php-plain/admin/delete_user.php",
|
|
267
|
+
"line": 6,
|
|
268
|
+
"why": "DELETE FROM users WHERE id = ? (privileged action, no role check)"
|
|
269
|
+
},
|
|
270
|
+
{
|
|
271
|
+
"file": "php-plain/admin/delete_user.php",
|
|
272
|
+
"line": 1,
|
|
273
|
+
"why": "no role check before the delete"
|
|
274
|
+
}
|
|
275
|
+
],
|
|
276
|
+
"impact": "Any authenticated user can delete any user.",
|
|
277
|
+
"severity": "critical",
|
|
278
|
+
"confidence": "high",
|
|
279
|
+
"cwe": [
|
|
280
|
+
"CWE-285"
|
|
281
|
+
],
|
|
282
|
+
"recommendation": "Add a server\u2011side admin check before executing the delete.",
|
|
283
|
+
"status": "unverified"
|
|
284
|
+
},
|
|
285
|
+
{
|
|
286
|
+
"finding_id": "BFLA-R-0067-1",
|
|
287
|
+
"category": "bfla",
|
|
288
|
+
"subtype": "role_from_request",
|
|
289
|
+
"title": "Privilege escalation via role promotion in PHP plain",
|
|
290
|
+
"route_id": "R-0067",
|
|
291
|
+
"location": {
|
|
292
|
+
"file": "php-plain/admin/promote.php",
|
|
293
|
+
"start_line": 1
|
|
294
|
+
},
|
|
295
|
+
"evidence": [
|
|
296
|
+
{
|
|
297
|
+
"file": "php-plain/admin/promote.php",
|
|
298
|
+
"line": 6,
|
|
299
|
+
"why": "UPDATE users SET role = 'admin' WHERE id = ... (privileged action, no role check)"
|
|
300
|
+
},
|
|
301
|
+
{
|
|
302
|
+
"file": "php-plain/admin/promote.php",
|
|
303
|
+
"line": 5,
|
|
304
|
+
"why": "role set from $_POST['is_admin'] (client\u2011side control)"
|
|
305
|
+
},
|
|
306
|
+
{
|
|
307
|
+
"file": "php-plain/admin/promote.php",
|
|
308
|
+
"line": 1,
|
|
309
|
+
"why": "no role check before the update"
|
|
310
|
+
}
|
|
311
|
+
],
|
|
312
|
+
"impact": "Any authenticated user can promote themselves to admin.",
|
|
313
|
+
"severity": "critical",
|
|
314
|
+
"confidence": "high",
|
|
315
|
+
"cwe": [
|
|
316
|
+
"CWE-269",
|
|
317
|
+
"CWE-285"
|
|
318
|
+
],
|
|
319
|
+
"recommendation": "Validate the caller's role server\u2011side before allowing role changes.",
|
|
320
|
+
"status": "unverified"
|
|
321
|
+
},
|
|
322
|
+
{
|
|
323
|
+
"finding_id": "BFLA-R-0059-1",
|
|
324
|
+
"category": "bfla",
|
|
325
|
+
"subtype": "client_side_role_check",
|
|
326
|
+
"title": "Client\u2011side role check only in PHP plain",
|
|
327
|
+
"route_id": "R-0059",
|
|
328
|
+
"location": {
|
|
329
|
+
"file": "php-plain/manage_users.php",
|
|
330
|
+
"start_line": 1
|
|
331
|
+
},
|
|
332
|
+
"evidence": [
|
|
333
|
+
{
|
|
334
|
+
"file": "php-plain/manage_users.php",
|
|
335
|
+
"line": 6,
|
|
336
|
+
"why": "DELETE FROM users WHERE id = ? (privileged action, no server\u2011side role check)"
|
|
337
|
+
},
|
|
338
|
+
{
|
|
339
|
+
"file": "php-plain/manage_users.php",
|
|
340
|
+
"line": 11,
|
|
341
|
+
"why": "role check only in HTML output, not in code"
|
|
342
|
+
}
|
|
343
|
+
],
|
|
344
|
+
"impact": "Any authenticated user can delete any user.",
|
|
345
|
+
"severity": "critical",
|
|
346
|
+
"confidence": "high",
|
|
347
|
+
"cwe": [
|
|
348
|
+
"CWE-602",
|
|
349
|
+
"CWE-285"
|
|
350
|
+
],
|
|
351
|
+
"recommendation": "Add a server\u2011side admin check before executing the delete.",
|
|
352
|
+
"status": "unverified"
|
|
353
|
+
},
|
|
354
|
+
{
|
|
355
|
+
"finding_id": "BFLA-R-0063-1",
|
|
356
|
+
"category": "bfla",
|
|
357
|
+
"subtype": "role_from_request",
|
|
358
|
+
"title": "Privilege escalation via role field in PHP plain profile update",
|
|
359
|
+
"route_id": "R-0063",
|
|
360
|
+
"location": {
|
|
361
|
+
"file": "php-plain/profile.php",
|
|
362
|
+
"start_line": 1
|
|
363
|
+
},
|
|
364
|
+
"evidence": [
|
|
365
|
+
{
|
|
366
|
+
"file": "php-plain/profile.php",
|
|
367
|
+
"line": 6,
|
|
368
|
+
"why": "foreach ($_POST as $field => $value) { $user->$field = $value; } (whole object binding)"
|
|
369
|
+
},
|
|
370
|
+
{
|
|
371
|
+
"file": "php-plain/profile.php",
|
|
372
|
+
"line": 10,
|
|
373
|
+
"why": "$user->role = $_POST['role']; (privileged field)"
|
|
374
|
+
},
|
|
375
|
+
{
|
|
376
|
+
"file": "php-plain/profile.php",
|
|
377
|
+
"line": 11,
|
|
378
|
+
"why": "save_user($user); (writes role to DB)"
|
|
379
|
+
}
|
|
380
|
+
],
|
|
381
|
+
"impact": "Any authenticated user can change their role to admin.",
|
|
382
|
+
"severity": "critical",
|
|
383
|
+
"confidence": "high",
|
|
384
|
+
"cwe": [
|
|
385
|
+
"CWE-915",
|
|
386
|
+
"CWE-269"
|
|
387
|
+
],
|
|
388
|
+
"recommendation": "Restrict binding to non\u2011privileged fields or set privileged fields server\u2011side.",
|
|
389
|
+
"status": "unverified"
|
|
390
|
+
},
|
|
391
|
+
{
|
|
392
|
+
"finding_id": "MASS-M-0011-1",
|
|
393
|
+
"category": "mass_assignment",
|
|
394
|
+
"subtype": "whole_object_binding",
|
|
395
|
+
"title": "Unrestricted binding of all POST fields to User in PHP plain",
|
|
396
|
+
"candidate_id": "M-0011",
|
|
397
|
+
"location": {
|
|
398
|
+
"file": "php-plain/profile.php",
|
|
399
|
+
"start_line": 1
|
|
400
|
+
},
|
|
401
|
+
"evidence": [
|
|
402
|
+
{
|
|
403
|
+
"file": "php-plain/profile.php",
|
|
404
|
+
"line": 6,
|
|
405
|
+
"why": "foreach ($_POST as $field => $value) { $user->$field = $value; } (binds all fields)"
|
|
406
|
+
},
|
|
407
|
+
{
|
|
408
|
+
"file": "php-plain/profile.php",
|
|
409
|
+
"line": 10,
|
|
410
|
+
"why": "$user->role = $_POST['role']; (privileged field)"
|
|
411
|
+
},
|
|
412
|
+
{
|
|
413
|
+
"file": "php-plain/profile.php",
|
|
414
|
+
"line": 11,
|
|
415
|
+
"why": "save_user($user); (writes role to DB)"
|
|
416
|
+
}
|
|
417
|
+
],
|
|
418
|
+
"impact": "role field can be set by the caller.",
|
|
419
|
+
"severity": "critical",
|
|
420
|
+
"confidence": "high",
|
|
421
|
+
"cwe": [
|
|
422
|
+
"CWE-915"
|
|
423
|
+
],
|
|
424
|
+
"recommendation": "Restrict binding to allowed fields or set privileged fields server\u2011side.",
|
|
425
|
+
"status": "unverified"
|
|
426
|
+
},
|
|
427
|
+
{
|
|
428
|
+
"finding_id": "MASS-M-0012-1",
|
|
429
|
+
"category": "mass_assignment",
|
|
430
|
+
"subtype": "privileged_field_writable",
|
|
431
|
+
"title": "Privilege escalation via role field in PHP plain",
|
|
432
|
+
"candidate_id": "M-0012",
|
|
433
|
+
"location": {
|
|
434
|
+
"file": "php-plain/profile.php",
|
|
435
|
+
"start_line": 1
|
|
436
|
+
},
|
|
437
|
+
"evidence": [
|
|
438
|
+
{
|
|
439
|
+
"file": "php-plain/profile.php",
|
|
440
|
+
"line": 10,
|
|
441
|
+
"why": "$user->role = $_POST['role']; (privileged field)"
|
|
442
|
+
},
|
|
443
|
+
{
|
|
444
|
+
"file": "php-plain/profile.php",
|
|
445
|
+
"line": 11,
|
|
446
|
+
"why": "save_user($user); (writes role to DB)"
|
|
447
|
+
}
|
|
448
|
+
],
|
|
449
|
+
"impact": "role field can be set by the caller.",
|
|
450
|
+
"severity": "critical",
|
|
451
|
+
"confidence": "high",
|
|
452
|
+
"cwe": [
|
|
453
|
+
"CWE-915",
|
|
454
|
+
"CWE-269"
|
|
455
|
+
],
|
|
456
|
+
"recommendation": "Restrict binding to allowed fields or set privileged fields server\u2011side.",
|
|
457
|
+
"status": "unverified"
|
|
458
|
+
}
|
|
459
|
+
],
|
|
460
|
+
"privilege_route_verdicts": [
|
|
461
|
+
{
|
|
462
|
+
"route_id": "R-0003",
|
|
463
|
+
"verdict": "vulnerable"
|
|
464
|
+
},
|
|
465
|
+
{
|
|
466
|
+
"route_id": "R-0007",
|
|
467
|
+
"verdict": "vulnerable"
|
|
468
|
+
},
|
|
469
|
+
{
|
|
470
|
+
"route_id": "R-0009",
|
|
471
|
+
"verdict": "vulnerable"
|
|
472
|
+
},
|
|
473
|
+
{
|
|
474
|
+
"route_id": "R-0023",
|
|
475
|
+
"verdict": "vulnerable"
|
|
476
|
+
},
|
|
477
|
+
{
|
|
478
|
+
"route_id": "R-0030",
|
|
479
|
+
"verdict": "vulnerable"
|
|
480
|
+
},
|
|
481
|
+
{
|
|
482
|
+
"route_id": "R-0032",
|
|
483
|
+
"verdict": "vulnerable"
|
|
484
|
+
},
|
|
485
|
+
{
|
|
486
|
+
"route_id": "R-0057",
|
|
487
|
+
"verdict": "vulnerable"
|
|
488
|
+
},
|
|
489
|
+
{
|
|
490
|
+
"route_id": "R-0058",
|
|
491
|
+
"verdict": "vulnerable"
|
|
492
|
+
},
|
|
493
|
+
{
|
|
494
|
+
"route_id": "R-0066",
|
|
495
|
+
"verdict": "vulnerable"
|
|
496
|
+
},
|
|
497
|
+
{
|
|
498
|
+
"route_id": "R-0067",
|
|
499
|
+
"verdict": "vulnerable"
|
|
500
|
+
},
|
|
501
|
+
{
|
|
502
|
+
"route_id": "R-0059",
|
|
503
|
+
"verdict": "vulnerable"
|
|
504
|
+
},
|
|
505
|
+
{
|
|
506
|
+
"route_id": "R-0063",
|
|
507
|
+
"verdict": "vulnerable"
|
|
508
|
+
}
|
|
509
|
+
],
|
|
510
|
+
"candidate_verdicts": [
|
|
511
|
+
{
|
|
512
|
+
"candidate_id": "M-0011",
|
|
513
|
+
"verdict": "vulnerable"
|
|
514
|
+
},
|
|
515
|
+
{
|
|
516
|
+
"candidate_id": "M-0012",
|
|
517
|
+
"verdict": "vulnerable"
|
|
518
|
+
},
|
|
519
|
+
{
|
|
520
|
+
"candidate_id": "M-0001",
|
|
521
|
+
"verdict": "safe"
|
|
522
|
+
},
|
|
523
|
+
{
|
|
524
|
+
"candidate_id": "M-0002",
|
|
525
|
+
"verdict": "safe"
|
|
526
|
+
},
|
|
527
|
+
{
|
|
528
|
+
"candidate_id": "M-0003",
|
|
529
|
+
"verdict": "safe"
|
|
530
|
+
},
|
|
531
|
+
{
|
|
532
|
+
"candidate_id": "M-0004",
|
|
533
|
+
"verdict": "safe"
|
|
534
|
+
},
|
|
535
|
+
{
|
|
536
|
+
"candidate_id": "M-0005",
|
|
537
|
+
"verdict": "safe"
|
|
538
|
+
}
|
|
539
|
+
]
|
|
540
|
+
}
|