hullproof 0.0.0-stage → 0.5.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +222 -0
- package/NOTICE +32 -0
- package/README.md +313 -2
- package/checks/db.firebase-rules-not-open.json +24 -0
- package/checks/db.rls-every-table.json +25 -0
- package/checks/log.no-credential-in-logs.json +30 -0
- package/checks/secrets.no-env-file-committed.json +31 -0
- package/checks/secrets.no-secret-in-public-env.json +37 -0
- package/checks/storage.firebase-rules-not-open.json +22 -0
- package/checks/supply.no-untrusted-event-in-run.json +23 -0
- package/checks/web.cors-no-reflected-origin.json +31 -0
- package/detectors/ai.json +25 -0
- package/detectors/auth.json +27 -0
- package/detectors/ci.json +19 -0
- package/detectors/containers.json +8 -0
- package/detectors/data_stores.json +38 -0
- package/detectors/frameworks.json +94 -0
- package/detectors/hosting.json +44 -0
- package/detectors/iac.json +43 -0
- package/detectors/languages.json +48 -0
- package/detectors/mobile.json +22 -0
- package/detectors/package_managers.json +39 -0
- package/detectors/payments.json +19 -0
- package/detectors/runtimes.json +17 -0
- package/dist/checks/code/admin-role.js +46 -0
- package/dist/checks/code/owner-filter.js +91 -0
- package/dist/checks/code/shared.js +84 -0
- package/dist/checks/code/webhook-verify.js +77 -0
- package/dist/checks/context.js +64 -0
- package/dist/checks/map/config-checks.js +74 -0
- package/dist/checks/map/entry-checks.js +97 -0
- package/dist/checks/map/shared.js +44 -0
- package/dist/checks/ops.js +307 -0
- package/dist/checks/pro-map.js +1 -0
- package/dist/checks/run.js +92 -0
- package/dist/checks/types.js +1 -0
- package/dist/ci/comment.js +44 -0
- package/dist/ci/sarif-check.js +157 -0
- package/dist/ci/sarif.js +61 -0
- package/dist/cli.js +358 -0
- package/dist/commands/ci.js +115 -0
- package/dist/commands/git.js +58 -0
- package/dist/commands/hooks.js +30 -0
- package/dist/commands/hunt-pro.js +1 -0
- package/dist/commands/hunt.js +86 -0
- package/dist/commands/map.js +33 -0
- package/dist/commands/mcp.js +17 -0
- package/dist/commands/pack.js +48 -0
- package/dist/commands/prove-pro.js +1 -0
- package/dist/commands/prove.js +173 -0
- package/dist/commands/report-gate.js +92 -0
- package/dist/commands/scan.js +158 -0
- package/dist/confirm/agreement.js +18 -0
- package/dist/confirm/chain.js +84 -0
- package/dist/confirm/confirm.js +112 -0
- package/dist/confirm/honesty.js +75 -0
- package/dist/confirm/lead.js +92 -0
- package/dist/confirm/merge.js +88 -0
- package/dist/confirm/query.js +145 -0
- package/dist/confirm/rule.js +86 -0
- package/dist/confirm/store.js +42 -0
- package/dist/confirm/summary.js +6 -0
- package/dist/confirm/synthesis.js +28 -0
- package/dist/discover/detectors.js +50 -0
- package/dist/discover/discover.js +270 -0
- package/dist/discover/extract.js +282 -0
- package/dist/discover/git.js +40 -0
- package/dist/discover/kit-files.js +47 -0
- package/dist/discover/walk.js +110 -0
- package/dist/env.js +57 -0
- package/dist/gate/gate.js +173 -0
- package/dist/hooks/install.js +153 -0
- package/dist/hooks/run.js +112 -0
- package/dist/map/analyze.js +201 -0
- package/dist/map/build.js +253 -0
- package/dist/map/candidates.js +49 -0
- package/dist/map/cblocks.js +77 -0
- package/dist/map/config.js +291 -0
- package/dist/map/dotnet.js +242 -0
- package/dist/map/entry.js +78 -0
- package/dist/map/expo.js +190 -0
- package/dist/map/go.js +292 -0
- package/dist/map/js-express.js +143 -0
- package/dist/map/js-misc.js +295 -0
- package/dist/map/js-next.js +292 -0
- package/dist/map/laravel.js +389 -0
- package/dist/map/lex-more.js +305 -0
- package/dist/map/lex.js +425 -0
- package/dist/map/light-index.js +191 -0
- package/dist/map/light-profiles.js +324 -0
- package/dist/map/light.js +574 -0
- package/dist/map/local-vocab.js +27 -0
- package/dist/map/mobile.js +326 -0
- package/dist/map/py-django.js +281 -0
- package/dist/map/py.js +391 -0
- package/dist/map/rails.js +391 -0
- package/dist/map/repo.js +178 -0
- package/dist/map/rust.js +312 -0
- package/dist/map/spring.js +207 -0
- package/dist/map/taint.js +96 -0
- package/dist/map/touches.js +355 -0
- package/dist/map/vocab.js +88 -0
- package/dist/mapping/controls.js +34 -0
- package/dist/mapping/dependency-policy.js +44 -0
- package/dist/mapping/map.js +44 -0
- package/dist/mapping/maps/gitleaks.json +12 -0
- package/dist/mapping/maps/osv-scanner.json +7 -0
- package/dist/mapping/maps/trivy.json +13 -0
- package/dist/mcp/confine.js +59 -0
- package/dist/mcp/protocol.js +140 -0
- package/dist/mcp/schema.js +43 -0
- package/dist/mcp/server.js +37 -0
- package/dist/mcp/tools.js +238 -0
- package/dist/packs/coverage.js +79 -0
- package/dist/packs/manifest.js +36 -0
- package/dist/packs/validate.js +271 -0
- package/dist/prove/container.js +276 -0
- package/dist/prove/exec-main.js +20 -0
- package/dist/prove/executor.js +149 -0
- package/dist/prove/local.js +131 -0
- package/dist/prove/probes.js +65 -0
- package/dist/prove/recipe.js +278 -0
- package/dist/prove/run.js +136 -0
- package/dist/prove/runner.js +1 -0
- package/dist/prove/safety.js +126 -0
- package/dist/prove/spec.js +357 -0
- package/dist/prove/store.js +65 -0
- package/dist/report/build.js +297 -0
- package/dist/report/entry-points.js +75 -0
- package/dist/report/hunt-section.js +71 -0
- package/dist/report/kit.js +41 -0
- package/dist/report/load.js +35 -0
- package/dist/report/messages.js +273 -0
- package/dist/report/prove-section.js +65 -0
- package/dist/report/report.js +156 -0
- package/dist/report/surface.js +21 -0
- package/dist/report/test-code.js +51 -0
- package/dist/report/tiers.js +44 -0
- package/dist/scanners/common.js +162 -0
- package/dist/scanners/gitleaks.js +90 -0
- package/dist/scanners/index.js +113 -0
- package/dist/scanners/osv-scanner.js +77 -0
- package/dist/scanners/run-targets.js +34 -0
- package/dist/scanners/secret-noise.js +89 -0
- package/dist/scanners/semgrep.js +142 -0
- package/dist/scanners/trivy.js +65 -0
- package/dist/scanners/types.js +1 -0
- package/dist/types/check.js +1 -0
- package/dist/types/codemap.js +1 -0
- package/dist/types/findings.js +5 -0
- package/dist/types/hunt.js +1 -0
- package/dist/types/index.js +1 -0
- package/dist/types/prove.js +1 -0
- package/dist/types/results.js +2 -0
- package/dist/types/scan.js +1 -0
- package/dist/types/stack.js +5 -0
- package/dist/util.js +71 -0
- package/dist/version.js +2 -0
- package/package.json +46 -4
- package/packs/android/fixture-result.json +43 -0
- package/packs/android/pack.json +56 -0
- package/packs/dotnet/fixture-result.json +62 -0
- package/packs/dotnet/pack.json +88 -0
- package/packs/expo/answer-key.json +51 -0
- package/packs/expo/fixture-result.json +62 -0
- package/packs/expo/pack.json +79 -0
- package/packs/firebase/answer-key.json +27 -0
- package/packs/firebase/fixture-result.json +43 -0
- package/packs/firebase/pack.json +58 -0
- package/packs/go/answer-key.json +101 -0
- package/packs/go/fixture-result.json +64 -0
- package/packs/go/pack.json +99 -0
- package/packs/ios/fixture-result.json +43 -0
- package/packs/ios/pack.json +55 -0
- package/packs/laravel/answer-key.json +84 -0
- package/packs/laravel/fixture-result.json +60 -0
- package/packs/laravel/pack.json +91 -0
- package/packs/node-ts/answer-key.json +220 -0
- package/packs/node-ts/fixture-result.json +114 -0
- package/packs/node-ts/pack.json +134 -0
- package/packs/python/answer-key.json +195 -0
- package/packs/python/fixture-result.json +119 -0
- package/packs/python/pack.json +121 -0
- package/packs/rails/answer-key.json +84 -0
- package/packs/rails/fixture-result.json +60 -0
- package/packs/rails/pack.json +78 -0
- package/packs/rust/fixture-result.json +43 -0
- package/packs/rust/pack.json +69 -0
- package/packs/spring/fixture-result.json +63 -0
- package/packs/spring/pack.json +103 -0
- package/packs/supabase/answer-key.json +52 -0
- package/packs/supabase/fixture-result.json +58 -0
- package/packs/supabase/pack.json +60 -0
- package/rules/gitleaks.toml +256 -0
- package/rules/semgrep/api-route-no-auth.yaml +31 -0
- package/rules/semgrep/cors-reflect-origin.yaml +48 -0
- package/rules/semgrep/eval-or-new-function.yaml +185 -0
- package/rules/semgrep/log-session-token.yaml +48 -0
- package/rules/semgrep/math-random-tokens.yaml +24 -0
- package/rules/semgrep/next-public-secret-name.yaml +32 -0
- package/rules/semgrep/postgrest-filter-injection.yaml +78 -0
- package/rules/semgrep/raw-sql-concat.yaml +42 -0
- package/rules/semgrep/read-by-id-no-owner.yaml +49 -0
- package/rules/semgrep/server-action-no-auth.yaml +26 -0
- package/rules/semgrep/sql-variants.yaml +99 -0
- package/rules/semgrep/ssrf-unguarded-url.yaml +137 -0
- package/rules/semgrep/subprocess-injection.yaml +163 -0
- package/rules/semgrep/taint-go.yaml +333 -0
- package/rules/semgrep/taint-java.yaml +317 -0
- package/rules/semgrep/taint-javascript.yaml +412 -0
- package/rules/semgrep/taint-php.yaml +361 -0
- package/rules/semgrep/taint-python.yaml +414 -0
- package/rules/semgrep/tool-endpoint-admin-client.yaml +86 -0
- package/rules/semgrep/user-metadata-authz.yaml +22 -0
- package/rules/semgrep/verify-result-unused.yaml +62 -0
- package/rules/semgrep/webhook-parse-before-verify.yaml +29 -0
- package/rules/test-artifact-ids.json +4 -0
- package/rules/tiers.json +427 -0
- package/schemas/check-results.schema.json +55 -0
- package/schemas/check.schema.json +41 -0
- package/schemas/codemap.schema.json +216 -0
- package/schemas/findings.schema.json +1048 -0
- package/schemas/hunt-output.schema.json +46 -0
- package/schemas/hunt-result.schema.json +58 -0
- package/schemas/results.schema.json +17 -0
- package/schemas/scan-hits.schema.json +32 -0
- package/schemas/scan-meta.schema.json +25 -0
- package/schemas/stack.schema.json +93 -0
- package/src/checks/README.md +32 -0
- package/src/checks/code/admin-role.ts +49 -0
- package/src/checks/code/owner-filter.ts +95 -0
- package/src/checks/code/shared.ts +66 -0
- package/src/checks/code/webhook-verify.ts +75 -0
- package/src/checks/context.ts +72 -0
- package/src/checks/map/config-checks.ts +79 -0
- package/src/checks/map/entry-checks.ts +116 -0
- package/src/checks/map/shared.ts +63 -0
- package/src/checks/ops.ts +280 -0
- package/src/checks/pro-map.ts +4 -0
- package/src/checks/run.ts +80 -0
- package/src/checks/types.ts +12 -0
- package/src/ci/comment.ts +52 -0
- package/src/ci/sarif-check.ts +100 -0
- package/src/ci/sarif.ts +72 -0
- package/src/cli.ts +273 -0
- package/src/commands/ci.ts +104 -0
- package/src/commands/git.ts +59 -0
- package/src/commands/hooks.ts +27 -0
- package/src/commands/hunt-pro.ts +4 -0
- package/src/commands/hunt.ts +68 -0
- package/src/commands/map.ts +27 -0
- package/src/commands/mcp.ts +18 -0
- package/src/commands/pack.ts +34 -0
- package/src/commands/prove-pro.ts +4 -0
- package/src/commands/prove.ts +126 -0
- package/src/commands/report-gate.ts +75 -0
- package/src/commands/scan.ts +156 -0
- package/src/confirm/agreement.ts +23 -0
- package/src/confirm/chain.ts +67 -0
- package/src/confirm/confirm.ts +107 -0
- package/src/confirm/honesty.ts +65 -0
- package/src/confirm/lead.ts +76 -0
- package/src/confirm/merge.ts +89 -0
- package/src/confirm/query.ts +126 -0
- package/src/confirm/rule.ts +76 -0
- package/src/confirm/store.ts +42 -0
- package/src/confirm/summary.ts +9 -0
- package/src/confirm/synthesis.ts +33 -0
- package/src/discover/detectors.ts +71 -0
- package/src/discover/discover.ts +253 -0
- package/src/discover/extract.ts +235 -0
- package/src/discover/git.ts +31 -0
- package/src/discover/kit-files.ts +37 -0
- package/src/discover/walk.ts +88 -0
- package/src/env.ts +51 -0
- package/src/gate/gate.ts +169 -0
- package/src/hooks/install.ts +142 -0
- package/src/hooks/run.ts +121 -0
- package/src/map/analyze.ts +219 -0
- package/src/map/build.ts +206 -0
- package/src/map/candidates.ts +47 -0
- package/src/map/cblocks.ts +55 -0
- package/src/map/config.ts +207 -0
- package/src/map/dotnet.ts +205 -0
- package/src/map/entry.ts +80 -0
- package/src/map/expo.ts +171 -0
- package/src/map/go.ts +271 -0
- package/src/map/js-express.ts +135 -0
- package/src/map/js-misc.ts +221 -0
- package/src/map/js-next.ts +282 -0
- package/src/map/laravel.ts +327 -0
- package/src/map/lex-more.ts +152 -0
- package/src/map/lex.ts +274 -0
- package/src/map/light-index.ts +134 -0
- package/src/map/light-profiles.ts +363 -0
- package/src/map/light.ts +484 -0
- package/src/map/local-vocab.ts +30 -0
- package/src/map/mobile.ts +263 -0
- package/src/map/py-django.ts +239 -0
- package/src/map/py.ts +329 -0
- package/src/map/rails.ts +291 -0
- package/src/map/repo.ts +150 -0
- package/src/map/rust.ts +256 -0
- package/src/map/spring.ts +185 -0
- package/src/map/taint.ts +86 -0
- package/src/map/touches.ts +296 -0
- package/src/map/vocab.ts +106 -0
- package/src/mapping/controls.ts +47 -0
- package/src/mapping/dependency-policy.ts +55 -0
- package/src/mapping/map.ts +59 -0
- package/src/mapping/maps/gitleaks.json +12 -0
- package/src/mapping/maps/osv-scanner.json +7 -0
- package/src/mapping/maps/trivy.json +13 -0
- package/src/mcp/confine.ts +44 -0
- package/src/mcp/protocol.ts +144 -0
- package/src/mcp/schema.ts +35 -0
- package/src/mcp/server.ts +32 -0
- package/src/mcp/tools.ts +235 -0
- package/src/packs/coverage.ts +98 -0
- package/src/packs/manifest.ts +97 -0
- package/src/packs/validate.ts +204 -0
- package/src/prove/container.ts +237 -0
- package/src/prove/exec-main.ts +16 -0
- package/src/prove/executor.ts +130 -0
- package/src/prove/local.ts +100 -0
- package/src/prove/probes.ts +68 -0
- package/src/prove/recipe.ts +215 -0
- package/src/prove/run.ts +124 -0
- package/src/prove/runner.ts +28 -0
- package/src/prove/safety.ts +98 -0
- package/src/prove/spec.ts +256 -0
- package/src/prove/store.ts +48 -0
- package/src/report/build.ts +304 -0
- package/src/report/entry-points.ts +78 -0
- package/src/report/hunt-section.ts +67 -0
- package/src/report/kit.ts +59 -0
- package/src/report/load.ts +49 -0
- package/src/report/messages.ts +270 -0
- package/src/report/prove-section.ts +61 -0
- package/src/report/report.ts +160 -0
- package/src/report/surface.ts +32 -0
- package/src/report/test-code.ts +56 -0
- package/src/report/tiers.ts +50 -0
- package/src/scanners/common.ts +149 -0
- package/src/scanners/gitleaks.ts +89 -0
- package/src/scanners/index.ts +103 -0
- package/src/scanners/osv-scanner.ts +90 -0
- package/src/scanners/run-targets.ts +35 -0
- package/src/scanners/secret-noise.ts +80 -0
- package/src/scanners/semgrep.ts +139 -0
- package/src/scanners/trivy.ts +66 -0
- package/src/scanners/types.ts +98 -0
- package/src/types/check.ts +52 -0
- package/src/types/codemap.ts +142 -0
- package/src/types/findings.ts +107 -0
- package/src/types/hunt.ts +97 -0
- package/src/types/index.ts +10 -0
- package/src/types/prove.ts +83 -0
- package/src/types/results.ts +15 -0
- package/src/types/scan.ts +63 -0
- package/src/types/stack.ts +61 -0
- package/src/util.ts +59 -0
- package/src/version.ts +2 -0
|
@@ -0,0 +1,216 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
3
|
+
"$id": "https://hullproof.invalid/engine/codemap.schema.json",
|
|
4
|
+
"title": "Hullproof Engine code map (codemap.json)",
|
|
5
|
+
"description": "Every entry point found by reading the code, with the protections, data touches and outbound calls on each, and the confidence of each fact. Sorted, no timestamp, no absolute path. Design: docs/PHASE-2-DESIGN.md.",
|
|
6
|
+
"type": "object",
|
|
7
|
+
"additionalProperties": false,
|
|
8
|
+
"required": ["schema_version", "engine_version", "commit", "coverage", "entry_points", "gates", "config", "counts"],
|
|
9
|
+
"properties": {
|
|
10
|
+
"schema_version": {"const": "1.0.0"},
|
|
11
|
+
"engine_version": {"type": "string", "minLength": 1},
|
|
12
|
+
"commit": {"type": ["string", "null"], "pattern": "^[0-9a-f]{40}$"},
|
|
13
|
+
"coverage": {"type": "array", "items": {"$ref": "#/$defs/coverage"}},
|
|
14
|
+
"entry_points": {"type": "array", "items": {"$ref": "#/$defs/entry_point"}},
|
|
15
|
+
"gates": {"type": "array", "items": {"$ref": "#/$defs/gate"}},
|
|
16
|
+
"config": {
|
|
17
|
+
"type": "object", "additionalProperties": false, "required": ["supabase", "firebase", "android", "ios", "cargo", "secrets", "local_vocab", "auth_helper_candidates"],
|
|
18
|
+
"properties": {
|
|
19
|
+
"supabase": {"type": ["object", "null"], "additionalProperties": false, "required": ["tables"], "properties": {"tables": {"type": "array", "items": {"$ref": "#/$defs/supabase_table"}}}},
|
|
20
|
+
"firebase": {"type": ["object", "null"], "additionalProperties": false, "required": ["rules"], "properties": {"rules": {"type": "array", "items": {"$ref": "#/$defs/firebase_rule"}}}},
|
|
21
|
+
"android": {"type": ["object", "null"], "additionalProperties": false, "required": ["manifests", "network_security"], "properties": {"manifests": {"type": "array", "items": {"$ref": "#/$defs/android_manifest"}}, "network_security": {"type": "array", "items": {"$ref": "#/$defs/network_security"}}}},
|
|
22
|
+
"ios": {"type": ["object", "null"], "additionalProperties": false, "required": ["plists"], "properties": {"plists": {"type": "array", "items": {"$ref": "#/$defs/ios_plist"}}}},
|
|
23
|
+
"cargo": {"type": ["object", "null"], "additionalProperties": false, "required": ["manifests"], "properties": {"manifests": {"type": "array", "items": {"$ref": "#/$defs/cargo_manifest"}}}},
|
|
24
|
+
"secrets": {"type": "array", "items": {"$ref": "#/$defs/config_secret"}},
|
|
25
|
+
"local_vocab": {"type": "object", "additionalProperties": false, "required": ["auth_helpers", "role_helpers"], "properties": {"auth_helpers": {"type": "array", "items": {"type": "string"}}, "role_helpers": {"type": "array", "items": {"type": "string"}}}},
|
|
26
|
+
"auth_helper_candidates": {"type": "array", "items": {"type": "object", "additionalProperties": false, "required": ["name", "entry_points", "file", "line"], "properties": {"name": {"type": "string", "minLength": 1}, "entry_points": {"type": "integer", "minimum": 1}, "file": {"type": "string"}, "line": {"type": "integer", "minimum": 1}}}}
|
|
27
|
+
}
|
|
28
|
+
},
|
|
29
|
+
"counts": {
|
|
30
|
+
"type": "object", "additionalProperties": false, "required": ["entry_points", "by_kind", "by_framework"],
|
|
31
|
+
"properties": {
|
|
32
|
+
"entry_points": {"type": "integer", "minimum": 0},
|
|
33
|
+
"by_kind": {"type": "object"},
|
|
34
|
+
"by_framework": {"type": "object"}
|
|
35
|
+
}
|
|
36
|
+
}
|
|
37
|
+
},
|
|
38
|
+
"$defs": {
|
|
39
|
+
"confidence": {"enum": ["high", "medium", "low"]},
|
|
40
|
+
"path": {"type": "string", "minLength": 1, "maxLength": 300, "pattern": "^[^/\\\\]"},
|
|
41
|
+
"coverage": {
|
|
42
|
+
"type": "object", "additionalProperties": false, "required": ["language", "files", "extractor", "status", "entry_points", "note"],
|
|
43
|
+
"properties": {
|
|
44
|
+
"language": {"type": "string", "minLength": 1},
|
|
45
|
+
"files": {"type": "integer", "minimum": 0},
|
|
46
|
+
"extractor": {"type": ["string", "null"]},
|
|
47
|
+
"status": {"enum": ["mapped", "partial", "not_mapped"]},
|
|
48
|
+
"entry_points": {"type": "integer", "minimum": 0},
|
|
49
|
+
"note": {"type": "string", "minLength": 1}
|
|
50
|
+
}
|
|
51
|
+
},
|
|
52
|
+
"protection": {
|
|
53
|
+
"type": "object", "additionalProperties": false, "required": ["kind", "scope", "file", "line", "via", "enforced", "confidence"],
|
|
54
|
+
"properties": {
|
|
55
|
+
"kind": {"enum": ["session_read", "role_check", "owner_filter", "signature_verify", "rate_limit", "input_validation", "audit_log"]},
|
|
56
|
+
"scope": {"enum": ["handler", "wrapper", "router", "middleware", "global"]},
|
|
57
|
+
"file": {"$ref": "#/$defs/path"},
|
|
58
|
+
"line": {"type": "integer", "minimum": 1},
|
|
59
|
+
"via": {"type": "string", "minLength": 1},
|
|
60
|
+
"enforced": {"type": ["boolean", "null"]},
|
|
61
|
+
"after_parse": {"type": "boolean"},
|
|
62
|
+
"confidence": {"$ref": "#/$defs/confidence"}
|
|
63
|
+
}
|
|
64
|
+
},
|
|
65
|
+
"read": {
|
|
66
|
+
"type": "object", "additionalProperties": false, "required": ["source", "line"],
|
|
67
|
+
"properties": {"source": {"enum": ["body", "query", "params", "headers", "cookies", "form", "file"]}, "line": {"type": "integer", "minimum": 1}}
|
|
68
|
+
},
|
|
69
|
+
"data": {
|
|
70
|
+
"type": "object", "additionalProperties": false,
|
|
71
|
+
"required": ["store", "op", "target", "line", "by_id", "limit_from_request", "request_derived", "owner_scoped", "raw_sql", "sets", "mass_assign", "confidence"],
|
|
72
|
+
"properties": {
|
|
73
|
+
"store": {"enum": ["sql", "prisma", "drizzle", "mongo", "supabase", "firebase", "redis", "orm", "filesystem", "object_storage"]},
|
|
74
|
+
"op": {"enum": ["read", "write", "delete", "unknown"]},
|
|
75
|
+
"target": {"type": ["string", "null"]},
|
|
76
|
+
"line": {"type": "integer", "minimum": 1},
|
|
77
|
+
"by_id": {"type": "boolean"},
|
|
78
|
+
"limit_from_request": {"type": "boolean"},
|
|
79
|
+
"request_derived": {"type": "boolean"},
|
|
80
|
+
"owner_scoped": {"type": "boolean"},
|
|
81
|
+
"raw_sql": {"type": "boolean"},
|
|
82
|
+
"sets": {"type": "array", "items": {"type": "string"}},
|
|
83
|
+
"mass_assign": {"type": "boolean"},
|
|
84
|
+
"confidence": {"$ref": "#/$defs/confidence"}
|
|
85
|
+
}
|
|
86
|
+
},
|
|
87
|
+
"outbound": {
|
|
88
|
+
"type": "object", "additionalProperties": false, "required": ["kind", "line", "target", "request_derived", "guarded", "confidence"],
|
|
89
|
+
"properties": {
|
|
90
|
+
"kind": {"enum": ["http", "ai_model", "email", "sms", "payment", "process", "redirect", "queue"]},
|
|
91
|
+
"line": {"type": "integer", "minimum": 1},
|
|
92
|
+
"target": {"type": "string", "maxLength": 120},
|
|
93
|
+
"request_derived": {"type": "boolean"},
|
|
94
|
+
"guarded": {"type": "boolean"},
|
|
95
|
+
"confidence": {"$ref": "#/$defs/confidence"}
|
|
96
|
+
}
|
|
97
|
+
},
|
|
98
|
+
"entry_point": {
|
|
99
|
+
"type": "object", "additionalProperties": false,
|
|
100
|
+
"required": ["id", "kind", "framework", "file", "line", "end_line", "method", "path", "name", "handler", "confidence", "test_code", "tags", "protections", "reads", "data", "outbound"],
|
|
101
|
+
"properties": {
|
|
102
|
+
"id": {"type": "string", "minLength": 1},
|
|
103
|
+
"kind": {"enum": ["http_route", "webhook", "server_action", "page", "ai_tool", "job", "graphql_resolver", "rpc", "message_consumer", "websocket", "deep_link", "ipc"]},
|
|
104
|
+
"framework": {"type": "string", "minLength": 1},
|
|
105
|
+
"file": {"$ref": "#/$defs/path"},
|
|
106
|
+
"line": {"type": "integer", "minimum": 1},
|
|
107
|
+
"end_line": {"type": "integer", "minimum": 1},
|
|
108
|
+
"method": {"type": ["string", "null"]},
|
|
109
|
+
"path": {"type": ["string", "null"]},
|
|
110
|
+
"name": {"type": ["string", "null"]},
|
|
111
|
+
"handler": {"type": ["object", "null"], "additionalProperties": false, "required": ["file", "line"], "properties": {"file": {"$ref": "#/$defs/path"}, "line": {"type": "integer", "minimum": 1}}},
|
|
112
|
+
"confidence": {"$ref": "#/$defs/confidence"},
|
|
113
|
+
"test_code": {"type": "boolean"},
|
|
114
|
+
"tags": {"type": "array", "items": {"type": "string"}},
|
|
115
|
+
"protections": {"type": "array", "items": {"$ref": "#/$defs/protection"}},
|
|
116
|
+
"reads": {"type": "array", "items": {"$ref": "#/$defs/read"}},
|
|
117
|
+
"data": {"type": "array", "items": {"$ref": "#/$defs/data"}},
|
|
118
|
+
"outbound": {"type": "array", "items": {"$ref": "#/$defs/outbound"}}
|
|
119
|
+
}
|
|
120
|
+
},
|
|
121
|
+
"gate": {
|
|
122
|
+
"type": "object", "additionalProperties": false, "required": ["id", "kind", "framework", "file", "line", "paths", "methods", "protections", "confidence"],
|
|
123
|
+
"properties": {
|
|
124
|
+
"id": {"type": "string", "minLength": 1},
|
|
125
|
+
"kind": {"enum": ["middleware", "guard", "router_dependency", "global_pipe", "mount"]},
|
|
126
|
+
"framework": {"type": "string", "minLength": 1},
|
|
127
|
+
"file": {"$ref": "#/$defs/path"},
|
|
128
|
+
"line": {"type": "integer", "minimum": 1},
|
|
129
|
+
"paths": {"type": "array", "minItems": 1, "items": {"type": "string"}},
|
|
130
|
+
"methods": {"type": "array", "items": {"type": "string"}},
|
|
131
|
+
"protections": {"type": "array", "items": {"$ref": "#/$defs/protection"}},
|
|
132
|
+
"confidence": {"$ref": "#/$defs/confidence"}
|
|
133
|
+
}
|
|
134
|
+
},
|
|
135
|
+
"supabase_table": {
|
|
136
|
+
"type": "object", "additionalProperties": false, "required": ["name", "file", "line", "rls_enabled", "columns", "policies", "grants"],
|
|
137
|
+
"properties": {
|
|
138
|
+
"name": {"type": "string", "minLength": 1},
|
|
139
|
+
"file": {"$ref": "#/$defs/path"},
|
|
140
|
+
"line": {"type": "integer", "minimum": 1},
|
|
141
|
+
"rls_enabled": {"type": ["boolean", "null"]},
|
|
142
|
+
"columns": {"type": "array", "items": {"type": "string"}},
|
|
143
|
+
"policies": {
|
|
144
|
+
"type": "array",
|
|
145
|
+
"items": {
|
|
146
|
+
"type": "object", "additionalProperties": false, "required": ["name", "op", "roles", "using", "check", "line", "permissive"],
|
|
147
|
+
"properties": {
|
|
148
|
+
"name": {"type": "string"}, "op": {"type": "string"}, "roles": {"type": "array", "items": {"type": "string"}},
|
|
149
|
+
"using": {"type": ["string", "null"]}, "check": {"type": ["string", "null"]}, "line": {"type": "integer", "minimum": 1}, "permissive": {"type": "boolean"}
|
|
150
|
+
}
|
|
151
|
+
}
|
|
152
|
+
},
|
|
153
|
+
"grants": {
|
|
154
|
+
"type": "array",
|
|
155
|
+
"items": {
|
|
156
|
+
"type": "object", "additionalProperties": false, "required": ["role", "privileges", "columns", "line"],
|
|
157
|
+
"properties": {"role": {"type": "string"}, "privileges": {"type": "array", "items": {"type": "string"}}, "columns": {"type": ["array", "null"], "items": {"type": "string"}}, "line": {"type": "integer", "minimum": 1}}
|
|
158
|
+
}
|
|
159
|
+
}
|
|
160
|
+
}
|
|
161
|
+
},
|
|
162
|
+
"firebase_rule": {
|
|
163
|
+
"type": "object", "additionalProperties": false, "required": ["service", "file", "line", "path", "ops", "condition", "uses_auth", "owner_bound", "always_true", "owner_wildcard"],
|
|
164
|
+
"properties": {
|
|
165
|
+
"service": {"enum": ["firestore", "storage", "realtime"]},
|
|
166
|
+
"file": {"$ref": "#/$defs/path"},
|
|
167
|
+
"line": {"type": "integer", "minimum": 1},
|
|
168
|
+
"path": {"type": "string"},
|
|
169
|
+
"ops": {"type": "array", "items": {"type": "string"}},
|
|
170
|
+
"condition": {"type": "string", "maxLength": 200},
|
|
171
|
+
"uses_auth": {"type": "boolean"},
|
|
172
|
+
"owner_bound": {"type": "boolean"},
|
|
173
|
+
"always_true": {"type": "boolean"},
|
|
174
|
+
"owner_wildcard": {"type": "boolean"}
|
|
175
|
+
}
|
|
176
|
+
},
|
|
177
|
+
"config_secret": {
|
|
178
|
+
"type": "object", "additionalProperties": false, "required": ["file", "line", "key", "where"],
|
|
179
|
+
"properties": {"file": {"$ref": "#/$defs/path"}, "line": {"type": "integer", "minimum": 1}, "key": {"type": "string"}, "where": {"enum": ["android manifest", "android strings", "ios plist"]}}
|
|
180
|
+
},
|
|
181
|
+
"android_manifest": {
|
|
182
|
+
"type": "object", "additionalProperties": false, "required": ["file", "package", "line", "debuggable", "allow_backup", "uses_cleartext_traffic", "network_security_config", "target_sdk", "permissions", "components"],
|
|
183
|
+
"properties": {
|
|
184
|
+
"file": {"$ref": "#/$defs/path"}, "package": {"type": ["string", "null"]}, "line": {"type": "integer", "minimum": 1},
|
|
185
|
+
"debuggable": {"type": ["boolean", "null"]}, "allow_backup": {"type": ["boolean", "null"]}, "uses_cleartext_traffic": {"type": ["boolean", "null"]},
|
|
186
|
+
"network_security_config": {"type": ["string", "null"]}, "target_sdk": {"type": ["integer", "null"]}, "permissions": {"type": "array", "items": {"type": "string"}},
|
|
187
|
+
"components": {"type": "array", "items": {
|
|
188
|
+
"type": "object", "additionalProperties": false, "required": ["kind", "name", "line", "exported", "exported_explicit", "permission", "launcher", "filters"],
|
|
189
|
+
"properties": {
|
|
190
|
+
"kind": {"enum": ["activity", "service", "receiver", "provider"]}, "name": {"type": "string"}, "line": {"type": "integer", "minimum": 1},
|
|
191
|
+
"exported": {"type": "boolean"}, "exported_explicit": {"type": "boolean"}, "permission": {"type": ["string", "null"]}, "launcher": {"type": "boolean"},
|
|
192
|
+
"filters": {"type": "array", "items": {"type": "object", "additionalProperties": false, "required": ["actions", "categories", "schemes", "hosts", "paths"], "properties": {
|
|
193
|
+
"actions": {"type": "array", "items": {"type": "string"}}, "categories": {"type": "array", "items": {"type": "string"}}, "schemes": {"type": "array", "items": {"type": "string"}},
|
|
194
|
+
"hosts": {"type": "array", "items": {"type": "string"}}, "paths": {"type": "array", "items": {"type": "string"}}}}}
|
|
195
|
+
}
|
|
196
|
+
}}
|
|
197
|
+
}
|
|
198
|
+
},
|
|
199
|
+
"network_security": {
|
|
200
|
+
"type": "object", "additionalProperties": false, "required": ["file", "line", "cleartext_base", "cleartext_domains", "trusts_user_certs", "pinned_domains"],
|
|
201
|
+
"properties": {"file": {"$ref": "#/$defs/path"}, "line": {"type": "integer", "minimum": 1}, "cleartext_base": {"type": ["boolean", "null"]}, "cleartext_domains": {"type": "array", "items": {"type": "string"}}, "trusts_user_certs": {"type": "boolean"}, "pinned_domains": {"type": "integer", "minimum": 0}}
|
|
202
|
+
},
|
|
203
|
+
"ios_plist": {
|
|
204
|
+
"type": "object", "additionalProperties": false, "required": ["file", "ats_arbitrary_loads", "ats_line", "url_schemes", "associated_domains", "usage_descriptions"],
|
|
205
|
+
"properties": {"file": {"$ref": "#/$defs/path"}, "ats_arbitrary_loads": {"type": ["boolean", "null"]}, "ats_line": {"type": ["integer", "null"]}, "url_schemes": {"type": "array", "items": {"type": "string"}}, "associated_domains": {"type": "array", "items": {"type": "string"}}, "usage_descriptions": {"type": "array", "items": {"type": "string"}}}
|
|
206
|
+
},
|
|
207
|
+
"cargo_manifest": {
|
|
208
|
+
"type": "object", "additionalProperties": false, "required": ["file", "line", "name", "edition", "dependencies", "release_debug", "release_overflow_checks", "unsafe_code_lint", "has_lock", "binary"],
|
|
209
|
+
"properties": {
|
|
210
|
+
"file": {"$ref": "#/$defs/path"}, "line": {"type": "integer", "minimum": 1}, "name": {"type": ["string", "null"]}, "edition": {"type": ["string", "null"]},
|
|
211
|
+
"dependencies": {"type": "array", "items": {"type": "object", "additionalProperties": false, "required": ["name", "source", "version", "line"], "properties": {"name": {"type": "string"}, "source": {"enum": ["registry", "git", "path"]}, "version": {"type": ["string", "null"]}, "line": {"type": "integer", "minimum": 1}}}},
|
|
212
|
+
"release_debug": {"type": ["boolean", "null"]}, "release_overflow_checks": {"type": ["boolean", "null"]}, "unsafe_code_lint": {"type": ["string", "null"]}, "has_lock": {"type": "boolean"}, "binary": {"type": "boolean"}
|
|
213
|
+
}
|
|
214
|
+
}
|
|
215
|
+
}
|
|
216
|
+
}
|