@intentius/chant 0.13.0 → 0.15.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/dist/audit/catalog.d.ts +45 -5
- package/dist/audit/catalog.d.ts.map +1 -1
- package/dist/audit/fetch.d.ts.map +1 -1
- package/dist/audit/proof.d.ts +3 -0
- package/dist/audit/proof.d.ts.map +1 -1
- package/dist/audit/report-model.d.ts +4 -1
- package/dist/audit/report-model.d.ts.map +1 -1
- package/dist/audit/report.d.ts +3 -0
- package/dist/audit/report.d.ts.map +1 -1
- package/dist/audit/rules-doc.d.ts +8 -2
- package/dist/audit/rules-doc.d.ts.map +1 -1
- package/dist/cli/commands/audit.d.ts.map +1 -1
- package/dist/cli/commands/doctor.d.ts.map +1 -1
- package/dist/cli/commands/lexicon-rolling-upgrade.d.ts +37 -0
- package/dist/cli/commands/lexicon-rolling-upgrade.d.ts.map +1 -0
- package/dist/cli/commands/lexicon-surface-diff.d.ts +48 -0
- package/dist/cli/commands/lexicon-surface-diff.d.ts.map +1 -0
- package/dist/cli/commands/lint.d.ts.map +1 -1
- package/dist/cli/commands/pinned-upgrade.d.ts +41 -0
- package/dist/cli/commands/pinned-upgrade.d.ts.map +1 -0
- package/dist/cli/handlers/build.d.ts.map +1 -1
- package/dist/cli/handlers/components.d.ts +39 -0
- package/dist/cli/handlers/components.d.ts.map +1 -0
- package/dist/cli/handlers/dev.d.ts +3 -0
- package/dist/cli/handlers/dev.d.ts.map +1 -1
- package/dist/cli/handlers/graph.d.ts +4 -2
- package/dist/cli/handlers/graph.d.ts.map +1 -1
- package/dist/cli/handlers/misc.d.ts.map +1 -1
- package/dist/cli/handlers/run.d.ts +49 -0
- package/dist/cli/handlers/run.d.ts.map +1 -1
- package/dist/cli/main.d.ts.map +1 -1
- package/dist/cli/registry.d.ts +35 -0
- package/dist/cli/registry.d.ts.map +1 -1
- package/dist/codegen/fetch.d.ts +22 -0
- package/dist/codegen/fetch.d.ts.map +1 -1
- package/dist/codegen/lexicon-regen.d.ts +110 -0
- package/dist/codegen/lexicon-regen.d.ts.map +1 -0
- package/dist/codegen/pinned-upgrade.d.ts +153 -0
- package/dist/codegen/pinned-upgrade.d.ts.map +1 -0
- package/dist/codegen/rolling-upgrade.d.ts +138 -0
- package/dist/codegen/rolling-upgrade.d.ts.map +1 -0
- package/dist/codegen/surface-snapshot.d.ts +173 -0
- package/dist/codegen/surface-snapshot.d.ts.map +1 -0
- package/dist/codegen/version-bump.d.ts +21 -0
- package/dist/codegen/version-bump.d.ts.map +1 -0
- package/dist/components/auto-release.d.ts +93 -0
- package/dist/components/auto-release.d.ts.map +1 -0
- package/dist/components/builders.d.ts +37 -0
- package/dist/components/builders.d.ts.map +1 -0
- package/dist/components/capability-plugin-loader.d.ts +111 -0
- package/dist/components/capability-plugin-loader.d.ts.map +1 -0
- package/dist/components/capability-plugin-schema.d.ts +24 -0
- package/dist/components/capability-plugin-schema.d.ts.map +1 -0
- package/dist/components/capability-plugin.d.ts +85 -0
- package/dist/components/capability-plugin.d.ts.map +1 -0
- package/dist/components/capability.d.ts +89 -0
- package/dist/components/capability.d.ts.map +1 -0
- package/dist/components/cli-support.d.ts +204 -0
- package/dist/components/cli-support.d.ts.map +1 -0
- package/dist/components/component.d.ts +179 -0
- package/dist/components/component.d.ts.map +1 -0
- package/dist/components/config-defaults.d.ts +41 -0
- package/dist/components/config-defaults.d.ts.map +1 -0
- package/dist/components/discover.d.ts +60 -0
- package/dist/components/discover.d.ts.map +1 -0
- package/dist/components/driver-output.d.ts +20 -0
- package/dist/components/driver-output.d.ts.map +1 -0
- package/dist/components/driver.d.ts +209 -0
- package/dist/components/driver.d.ts.map +1 -0
- package/dist/components/index.d.ts +22 -0
- package/dist/components/index.d.ts.map +1 -0
- package/dist/components/manifest-persistence.d.ts +79 -0
- package/dist/components/manifest-persistence.d.ts.map +1 -0
- package/dist/components/pilots/alb-ecs.pilot.d.ts +27 -0
- package/dist/components/pilots/alb-ecs.pilot.d.ts.map +1 -0
- package/dist/components/pilots/dynamodb.pilot.d.ts +22 -0
- package/dist/components/pilots/dynamodb.pilot.d.ts.map +1 -0
- package/dist/components/pilots/jar-emr.pilot.d.ts +37 -0
- package/dist/components/pilots/jar-emr.pilot.d.ts.map +1 -0
- package/dist/components/pilots/lambda.pilot.d.ts +35 -0
- package/dist/components/pilots/lambda.pilot.d.ts.map +1 -0
- package/dist/components/pilots/neo4j-fanout.pilot.d.ts +17 -0
- package/dist/components/pilots/neo4j-fanout.pilot.d.ts.map +1 -0
- package/dist/components/pilots/project.d.ts +13 -0
- package/dist/components/pilots/project.d.ts.map +1 -0
- package/dist/components/presets/ecs-fargate.d.ts +59 -0
- package/dist/components/presets/ecs-fargate.d.ts.map +1 -0
- package/dist/components/presets/index.d.ts +29 -0
- package/dist/components/presets/index.d.ts.map +1 -0
- package/dist/components/presets/lambda.d.ts +35 -0
- package/dist/components/presets/lambda.d.ts.map +1 -0
- package/dist/components/presets/single-host-compose.d.ts +43 -0
- package/dist/components/presets/single-host-compose.d.ts.map +1 -0
- package/dist/components/registry.d.ts +29 -0
- package/dist/components/registry.d.ts.map +1 -0
- package/dist/components/starter-plugin.d.ts +51 -0
- package/dist/components/starter-plugin.d.ts.map +1 -0
- package/dist/components/temporal-codegen-loader.d.ts +27 -0
- package/dist/components/temporal-codegen-loader.d.ts.map +1 -0
- package/dist/components/verbs/__tests__/mock-cloud-executor.d.ts +35 -0
- package/dist/components/verbs/__tests__/mock-cloud-executor.d.ts.map +1 -0
- package/dist/components/verbs/__tests__/mock-process-runner.d.ts +45 -0
- package/dist/components/verbs/__tests__/mock-process-runner.d.ts.map +1 -0
- package/dist/components/verbs/__tests__/mock-sbom-generator.d.ts +33 -0
- package/dist/components/verbs/__tests__/mock-sbom-generator.d.ts.map +1 -0
- package/dist/components/verbs/bom-writer.d.ts +155 -0
- package/dist/components/verbs/bom-writer.d.ts.map +1 -0
- package/dist/components/verbs/build-archive.d.ts +205 -0
- package/dist/components/verbs/build-archive.d.ts.map +1 -0
- package/dist/components/verbs/build.d.ts +150 -0
- package/dist/components/verbs/build.d.ts.map +1 -0
- package/dist/components/verbs/cloud-executor.d.ts +88 -0
- package/dist/components/verbs/cloud-executor.d.ts.map +1 -0
- package/dist/components/verbs/component-bom.d.ts +103 -0
- package/dist/components/verbs/component-bom.d.ts.map +1 -0
- package/dist/components/verbs/index.d.ts +49 -0
- package/dist/components/verbs/index.d.ts.map +1 -0
- package/dist/components/verbs/license-policy.d.ts +56 -0
- package/dist/components/verbs/license-policy.d.ts.map +1 -0
- package/dist/components/verbs/lockfile-sbom-generator.d.ts +81 -0
- package/dist/components/verbs/lockfile-sbom-generator.d.ts.map +1 -0
- package/dist/components/verbs/process-runner.d.ts +64 -0
- package/dist/components/verbs/process-runner.d.ts.map +1 -0
- package/dist/components/verbs/reproducibility.d.ts +80 -0
- package/dist/components/verbs/reproducibility.d.ts.map +1 -0
- package/dist/components/verbs/sbom-generator.d.ts +157 -0
- package/dist/components/verbs/sbom-generator.d.ts.map +1 -0
- package/dist/components/verbs/sbom.d.ts +79 -0
- package/dist/components/verbs/sbom.d.ts.map +1 -0
- package/dist/components/verbs/shell.d.ts +35 -0
- package/dist/components/verbs/shell.d.ts.map +1 -0
- package/dist/components/verbs/sign.d.ts +222 -0
- package/dist/components/verbs/sign.d.ts.map +1 -0
- package/dist/components/verbs/stub.d.ts +18 -0
- package/dist/components/verbs/stub.d.ts.map +1 -0
- package/dist/components/verbs/tool-sbom-generator.d.ts +51 -0
- package/dist/components/verbs/tool-sbom-generator.d.ts.map +1 -0
- package/dist/components/verbs/verify.d.ts +106 -0
- package/dist/components/verbs/verify.d.ts.map +1 -0
- package/dist/components/verbs/vex.d.ts +65 -0
- package/dist/components/verbs/vex.d.ts.map +1 -0
- package/dist/components/verbs/vuln-gate.d.ts +91 -0
- package/dist/components/verbs/vuln-gate.d.ts.map +1 -0
- package/dist/components/verbs/vuln-scan.d.ts +116 -0
- package/dist/components/verbs/vuln-scan.d.ts.map +1 -0
- package/dist/components/verbs/wait-verify.d.ts +85 -0
- package/dist/components/verbs/wait-verify.d.ts.map +1 -0
- package/dist/config.d.ts +205 -0
- package/dist/config.d.ts.map +1 -1
- package/dist/index.d.ts +4 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/lexicon.d.ts +78 -0
- package/dist/lexicon.d.ts.map +1 -1
- package/dist/lifecycle/build-ledger-store.d.ts +121 -0
- package/dist/lifecycle/build-ledger-store.d.ts.map +1 -0
- package/dist/lifecycle/build-ledger.d.ts +225 -0
- package/dist/lifecycle/build-ledger.d.ts.map +1 -0
- package/dist/lifecycle/git.d.ts +84 -0
- package/dist/lifecycle/git.d.ts.map +1 -1
- package/dist/lifecycle/index.d.ts +5 -0
- package/dist/lifecycle/index.d.ts.map +1 -1
- package/dist/lifecycle/oras-referrer-lookup.d.ts +41 -0
- package/dist/lifecycle/oras-referrer-lookup.d.ts.map +1 -0
- package/dist/lifecycle/release-ledger.d.ts +122 -0
- package/dist/lifecycle/release-ledger.d.ts.map +1 -0
- package/dist/lifecycle/status.d.ts +150 -0
- package/dist/lifecycle/status.d.ts.map +1 -0
- package/dist/lint/component-checks.d.ts +95 -0
- package/dist/lint/component-checks.d.ts.map +1 -0
- package/dist/lint/engine.d.ts +23 -0
- package/dist/lint/engine.d.ts.map +1 -1
- package/dist/lint/presets/strict.json +8 -1
- package/dist/lint/rules/__fixtures__/comp/comp000-discovery-error/broken-a.component.d.ts +4 -0
- package/dist/lint/rules/__fixtures__/comp/comp000-discovery-error/broken-a.component.d.ts.map +1 -0
- package/dist/lint/rules/__fixtures__/comp/comp000-discovery-error/broken-b.component.d.ts +4 -0
- package/dist/lint/rules/__fixtures__/comp/comp000-discovery-error/broken-b.component.d.ts.map +1 -0
- package/dist/lint/rules/__fixtures__/comp/comp001/fail/orphan-lib.component.d.ts +4 -0
- package/dist/lint/rules/__fixtures__/comp/comp001/fail/orphan-lib.component.d.ts.map +1 -0
- package/dist/lint/rules/__fixtures__/comp/comp001/pass/emr-job.component.d.ts +4 -0
- package/dist/lint/rules/__fixtures__/comp/comp001/pass/emr-job.component.d.ts.map +1 -0
- package/dist/lint/rules/__fixtures__/comp/comp001/pass/jar-lib.component.d.ts +4 -0
- package/dist/lint/rules/__fixtures__/comp/comp001/pass/jar-lib.component.d.ts.map +1 -0
- package/dist/lint/rules/__fixtures__/comp/comp002/fail/search-service.component.d.ts +10 -0
- package/dist/lint/rules/__fixtures__/comp/comp002/fail/search-service.component.d.ts.map +1 -0
- package/dist/lint/rules/__fixtures__/comp/comp002/pass/jar-lib.component.d.ts +3 -0
- package/dist/lint/rules/__fixtures__/comp/comp002/pass/jar-lib.component.d.ts.map +1 -0
- package/dist/lint/rules/__fixtures__/comp/comp002/pass/search-service.component.d.ts +4 -0
- package/dist/lint/rules/__fixtures__/comp/comp002/pass/search-service.component.d.ts.map +1 -0
- package/dist/lint/rules/__fixtures__/comp/comp003/fail/migrator.component.d.ts +4 -0
- package/dist/lint/rules/__fixtures__/comp/comp003/fail/migrator.component.d.ts.map +1 -0
- package/dist/lint/rules/__fixtures__/comp/comp003/pass/migrator.component.d.ts +4 -0
- package/dist/lint/rules/__fixtures__/comp/comp003/pass/migrator.component.d.ts.map +1 -0
- package/dist/lint/rules/__fixtures__/comp/comp003/pass/orders-table.component.d.ts +4 -0
- package/dist/lint/rules/__fixtures__/comp/comp003/pass/orders-table.component.d.ts.map +1 -0
- package/dist/lint/rules/__fixtures__/comp/comp004/fail/neo4j-cluster.component.d.ts +4 -0
- package/dist/lint/rules/__fixtures__/comp/comp004/fail/neo4j-cluster.component.d.ts.map +1 -0
- package/dist/lint/rules/__fixtures__/comp/comp004/pass/neo4j-cluster.component.d.ts +4 -0
- package/dist/lint/rules/__fixtures__/comp/comp004/pass/neo4j-cluster.component.d.ts.map +1 -0
- package/dist/lint/rules/__fixtures__/comp/comp004/pass/orders-table.component.d.ts +4 -0
- package/dist/lint/rules/__fixtures__/comp/comp004/pass/orders-table.component.d.ts.map +1 -0
- package/dist/lint/rules/__fixtures__/comp/comp005/fail/search-service.component.d.ts +4 -0
- package/dist/lint/rules/__fixtures__/comp/comp005/fail/search-service.component.d.ts.map +1 -0
- package/dist/lint/rules/__fixtures__/comp/comp005/pass/search-service.component.d.ts +4 -0
- package/dist/lint/rules/__fixtures__/comp/comp005/pass/search-service.component.d.ts.map +1 -0
- package/dist/lint/rules/__fixtures__/comp/comp006/fail/legacy-tool.component.d.ts +4 -0
- package/dist/lint/rules/__fixtures__/comp/comp006/fail/legacy-tool.component.d.ts.map +1 -0
- package/dist/lint/rules/__fixtures__/comp/comp006/pass/legacy-tool.component.d.ts +4 -0
- package/dist/lint/rules/__fixtures__/comp/comp006/pass/legacy-tool.component.d.ts.map +1 -0
- package/dist/lint/rules/__fixtures__/comp/comp007/fail/inventory-table.component.d.ts +4 -0
- package/dist/lint/rules/__fixtures__/comp/comp007/fail/inventory-table.component.d.ts.map +1 -0
- package/dist/lint/rules/__fixtures__/comp/comp007/fail/orders-table.component.d.ts +4 -0
- package/dist/lint/rules/__fixtures__/comp/comp007/fail/orders-table.component.d.ts.map +1 -0
- package/dist/lint/rules/__fixtures__/comp/comp007/pass/orders-table.component.d.ts +3 -0
- package/dist/lint/rules/__fixtures__/comp/comp007/pass/orders-table.component.d.ts.map +1 -0
- package/dist/lint/rules/__fixtures__/comp/comp007/pass/search-service.component.d.ts +4 -0
- package/dist/lint/rules/__fixtures__/comp/comp007/pass/search-service.component.d.ts.map +1 -0
- package/dist/lint/rules/comp/comp001-publishes-never-applies.d.ts +20 -0
- package/dist/lint/rules/comp/comp001-publishes-never-applies.d.ts.map +1 -0
- package/dist/lint/rules/comp/comp002-dangling-wiring-ref.d.ts +28 -0
- package/dist/lint/rules/comp/comp002-dangling-wiring-ref.d.ts.map +1 -0
- package/dist/lint/rules/comp/comp003-mutating-no-rollback.d.ts +39 -0
- package/dist/lint/rules/comp/comp003-mutating-no-rollback.d.ts.map +1 -0
- package/dist/lint/rules/comp/comp004-gate-needs-temporal.d.ts +37 -0
- package/dist/lint/rules/comp/comp004-gate-needs-temporal.d.ts.map +1 -0
- package/dist/lint/rules/comp/comp005-capability-kind-is-noun.d.ts +43 -0
- package/dist/lint/rules/comp/comp005-capability-kind-is-noun.d.ts.map +1 -0
- package/dist/lint/rules/comp/comp006-shell-needs-reason.d.ts +22 -0
- package/dist/lint/rules/comp/comp006-shell-needs-reason.d.ts.map +1 -0
- package/dist/lint/rules/comp/comp007-composition-sprawl.d.ts +33 -0
- package/dist/lint/rules/comp/comp007-composition-sprawl.d.ts.map +1 -0
- package/dist/lint/rules/comp/index.d.ts +18 -0
- package/dist/lint/rules/comp/index.d.ts.map +1 -0
- package/dist/lint/rules/comp/support.d.ts +71 -0
- package/dist/lint/rules/comp/support.d.ts.map +1 -0
- package/dist/lsp/lexicon-providers.d.ts.map +1 -1
- package/dist/op/activity-registry.d.ts +11 -6
- package/dist/op/activity-registry.d.ts.map +1 -1
- package/dist/op/activity-runtime.d.ts +24 -0
- package/dist/op/activity-runtime.d.ts.map +1 -0
- package/dist/op/builders.d.ts +56 -0
- package/dist/op/builders.d.ts.map +1 -1
- package/dist/op/index.d.ts +2 -1
- package/dist/op/index.d.ts.map +1 -1
- package/dist/ownership.d.ts +20 -14
- package/dist/ownership.d.ts.map +1 -1
- package/package.json +14 -1
- package/src/audit/catalog.test.ts +74 -22
- package/src/audit/catalog.ts +74 -471
- package/src/audit/fetch.test.ts +112 -8
- package/src/audit/fetch.ts +53 -8
- package/src/audit/proof.ts +4 -2
- package/src/audit/report-html.test.ts +14 -7
- package/src/audit/report-model.ts +20 -9
- package/src/audit/report.test.ts +36 -13
- package/src/audit/report.ts +2 -0
- package/src/audit/rules-doc.test.ts +8 -6
- package/src/audit/rules-doc.ts +13 -5
- package/src/cli/commands/audit.ts +23 -18
- package/src/cli/commands/component-lint.test.ts +158 -0
- package/src/cli/commands/doctor.test.ts +116 -2
- package/src/cli/commands/doctor.ts +46 -0
- package/src/cli/commands/lexicon-rolling-upgrade.ts +198 -0
- package/src/cli/commands/lexicon-surface-diff.test.ts +104 -0
- package/src/cli/commands/lexicon-surface-diff.ts +185 -0
- package/src/cli/commands/lint.ts +142 -1
- package/src/cli/commands/pinned-upgrade.ts +204 -0
- package/src/cli/handlers/build.ts +58 -1
- package/src/cli/handlers/components.test.ts +504 -0
- package/src/cli/handlers/components.ts +404 -0
- package/src/cli/handlers/dev.ts +60 -1
- package/src/cli/handlers/graph.ts +47 -2
- package/src/cli/handlers/misc.ts +45 -1
- package/src/cli/handlers/run.test.ts +967 -3
- package/src/cli/handlers/run.ts +618 -11
- package/src/cli/main.test.ts +66 -0
- package/src/cli/main.ts +105 -2
- package/src/cli/registry.ts +35 -0
- package/src/codegen/fetch.test.ts +84 -3
- package/src/codegen/fetch.ts +76 -2
- package/src/codegen/lexicon-regen.test.ts +298 -0
- package/src/codegen/lexicon-regen.ts +545 -0
- package/src/codegen/pinned-upgrade.test.ts +399 -0
- package/src/codegen/pinned-upgrade.ts +423 -0
- package/src/codegen/rolling-upgrade.test.ts +333 -0
- package/src/codegen/rolling-upgrade.ts +320 -0
- package/src/codegen/surface-snapshot.test.ts +461 -0
- package/src/codegen/surface-snapshot.ts +546 -0
- package/src/codegen/version-bump.test.ts +47 -0
- package/src/codegen/version-bump.ts +39 -0
- package/src/components/README.md +130 -0
- package/src/components/SPRAWL-VALIDATION.md +181 -0
- package/src/components/__fixtures__/alb-ecs-service.json +51 -0
- package/src/components/__fixtures__/dynamodb-infra.json +32 -0
- package/src/components/__fixtures__/emr-job-consumer.json +26 -0
- package/src/components/__fixtures__/jar-lib-producer.json +16 -0
- package/src/components/__fixtures__/lambda-image-processor.json +28 -0
- package/src/components/__fixtures__/neo4j-fanout.json +34 -0
- package/src/components/__fixtures__/single-host-compose.json +29 -0
- package/src/components/auto-release.test.ts +217 -0
- package/src/components/auto-release.ts +216 -0
- package/src/components/builders.test.ts +45 -0
- package/src/components/builders.ts +71 -0
- package/src/components/capability-plugin-loader.ts +218 -0
- package/src/components/capability-plugin-schema.ts +56 -0
- package/src/components/capability-plugin.test.ts +235 -0
- package/src/components/capability-plugin.ts +108 -0
- package/src/components/capability.ts +117 -0
- package/src/components/cli-support.test.ts +579 -0
- package/src/components/cli-support.ts +481 -0
- package/src/components/component-schema.test.ts +265 -0
- package/src/components/component.schema.json +235 -0
- package/src/components/component.test.ts +251 -0
- package/src/components/component.ts +255 -0
- package/src/components/config-defaults.test.ts +263 -0
- package/src/components/config-defaults.ts +145 -0
- package/src/components/discover.test.ts +352 -0
- package/src/components/discover.ts +167 -0
- package/src/components/driver-output.ts +71 -0
- package/src/components/driver.test.ts +638 -0
- package/src/components/driver.ts +690 -0
- package/src/components/index.ts +113 -0
- package/src/components/manifest-persistence.test.ts +152 -0
- package/src/components/manifest-persistence.ts +164 -0
- package/src/components/pilots/README.md +33 -0
- package/src/components/pilots/alb-ecs.pilot.ts +63 -0
- package/src/components/pilots/dynamodb.pilot.ts +59 -0
- package/src/components/pilots/jar-emr.pilot.ts +69 -0
- package/src/components/pilots/lambda.pilot.ts +55 -0
- package/src/components/pilots/neo4j-fanout.pilot.ts +92 -0
- package/src/components/pilots/pilots-lint-clean.test.ts +78 -0
- package/src/components/pilots/pilots.test.ts +126 -0
- package/src/components/pilots/project.ts +13 -0
- package/src/components/presets/comp007-reduction.test.ts +122 -0
- package/src/components/presets/ecs-fargate.test.ts +84 -0
- package/src/components/presets/ecs-fargate.ts +103 -0
- package/src/components/presets/index.ts +32 -0
- package/src/components/presets/lambda.test.ts +35 -0
- package/src/components/presets/lambda.ts +53 -0
- package/src/components/presets/single-host-compose.test.ts +65 -0
- package/src/components/presets/single-host-compose.ts +64 -0
- package/src/components/registry.test.ts +112 -0
- package/src/components/registry.ts +37 -0
- package/src/components/starter-plugin.ts +105 -0
- package/src/components/temporal-codegen-loader.ts +41 -0
- package/src/components/verbs/__fixtures__/package-lock.json +45 -0
- package/src/components/verbs/__fixtures__/pom.xml +37 -0
- package/src/components/verbs/__fixtures__/schemas/cyclonedx-1.5.schema.json +3800 -0
- package/src/components/verbs/__fixtures__/schemas/cyclonedx-spdx-license.schema.json +621 -0
- package/src/components/verbs/__fixtures__/schemas/jsf-0.82.schema.json +240 -0
- package/src/components/verbs/__fixtures__/schemas/spdx-2.3.schema.json +740 -0
- package/src/components/verbs/__tests__/mock-cloud-executor.ts +102 -0
- package/src/components/verbs/__tests__/mock-process-runner.ts +79 -0
- package/src/components/verbs/__tests__/mock-sbom-generator.ts +85 -0
- package/src/components/verbs/bom-writer.test.ts +331 -0
- package/src/components/verbs/bom-writer.ts +386 -0
- package/src/components/verbs/build-archive.test.ts +251 -0
- package/src/components/verbs/build-archive.ts +296 -0
- package/src/components/verbs/build.test.ts +222 -0
- package/src/components/verbs/build.ts +252 -0
- package/src/components/verbs/cloud-executor.ts +181 -0
- package/src/components/verbs/component-bom.test.ts +219 -0
- package/src/components/verbs/component-bom.ts +189 -0
- package/src/components/verbs/index.ts +49 -0
- package/src/components/verbs/license-policy.ts +115 -0
- package/src/components/verbs/lockfile-sbom-generator.test.ts +195 -0
- package/src/components/verbs/lockfile-sbom-generator.ts +236 -0
- package/src/components/verbs/process-runner.test.ts +79 -0
- package/src/components/verbs/process-runner.ts +113 -0
- package/src/components/verbs/reproducibility.test.ts +24 -0
- package/src/components/verbs/reproducibility.ts +100 -0
- package/src/components/verbs/sbom-generator.test.ts +96 -0
- package/src/components/verbs/sbom-generator.ts +209 -0
- package/src/components/verbs/sbom.test.ts +184 -0
- package/src/components/verbs/sbom.ts +152 -0
- package/src/components/verbs/shell.test.ts +36 -0
- package/src/components/verbs/shell.ts +51 -0
- package/src/components/verbs/sign.test.ts +210 -0
- package/src/components/verbs/sign.ts +350 -0
- package/src/components/verbs/stub.ts +34 -0
- package/src/components/verbs/tool-sbom-generator.test.ts +194 -0
- package/src/components/verbs/tool-sbom-generator.ts +192 -0
- package/src/components/verbs/verify.test.ts +159 -0
- package/src/components/verbs/verify.ts +179 -0
- package/src/components/verbs/vex.ts +182 -0
- package/src/components/verbs/vuln-gate.test.ts +201 -0
- package/src/components/verbs/vuln-gate.ts +170 -0
- package/src/components/verbs/vuln-scan.test.ts +145 -0
- package/src/components/verbs/vuln-scan.ts +266 -0
- package/src/components/verbs/wait-verify.test.ts +111 -0
- package/src/components/verbs/wait-verify.ts +171 -0
- package/src/config.test.ts +74 -1
- package/src/config.ts +219 -0
- package/src/index.ts +32 -0
- package/src/lexicon.ts +88 -0
- package/src/lifecycle/build-ledger-store.test.ts +217 -0
- package/src/lifecycle/build-ledger-store.ts +165 -0
- package/src/lifecycle/build-ledger.test.ts +349 -0
- package/src/lifecycle/build-ledger.ts +305 -0
- package/src/lifecycle/git.test.ts +118 -0
- package/src/lifecycle/git.ts +149 -14
- package/src/lifecycle/index.ts +5 -0
- package/src/lifecycle/oras-referrer-lookup.test.ts +116 -0
- package/src/lifecycle/oras-referrer-lookup.ts +110 -0
- package/src/lifecycle/release-ledger.test.ts +209 -0
- package/src/lifecycle/release-ledger.ts +185 -0
- package/src/lifecycle/status.test.ts +330 -0
- package/src/lifecycle/status.ts +278 -0
- package/src/lint/component-checks.ts +148 -0
- package/src/lint/config.test.ts +21 -0
- package/src/lint/engine.ts +11 -2
- package/src/lint/presets/relaxed.json +8 -1
- package/src/lint/presets/strict.json +8 -1
- package/src/lint/rules/__fixtures__/comp/comp000-discovery-error/broken-a.component.ts +9 -0
- package/src/lint/rules/__fixtures__/comp/comp000-discovery-error/broken-b.component.ts +9 -0
- package/src/lint/rules/__fixtures__/comp/comp001/fail/orphan-lib.component.ts +11 -0
- package/src/lint/rules/__fixtures__/comp/comp001/pass/emr-job.component.ts +13 -0
- package/src/lint/rules/__fixtures__/comp/comp001/pass/jar-lib.component.ts +11 -0
- package/src/lint/rules/__fixtures__/comp/comp002/fail/search-service.component.ts +27 -0
- package/src/lint/rules/__fixtures__/comp/comp002/pass/jar-lib.component.ts +10 -0
- package/src/lint/rules/__fixtures__/comp/comp002/pass/search-service.component.ts +23 -0
- package/src/lint/rules/__fixtures__/comp/comp003/fail/migrator.component.ts +10 -0
- package/src/lint/rules/__fixtures__/comp/comp003/pass/migrator.component.ts +19 -0
- package/src/lint/rules/__fixtures__/comp/comp003/pass/orders-table.component.ts +10 -0
- package/src/lint/rules/__fixtures__/comp/comp004/fail/neo4j-cluster.component.ts +20 -0
- package/src/lint/rules/__fixtures__/comp/comp004/pass/neo4j-cluster.component.ts +23 -0
- package/src/lint/rules/__fixtures__/comp/comp004/pass/orders-table.component.ts +10 -0
- package/src/lint/rules/__fixtures__/comp/comp005/fail/search-service.component.ts +14 -0
- package/src/lint/rules/__fixtures__/comp/comp005/pass/search-service.component.ts +18 -0
- package/src/lint/rules/__fixtures__/comp/comp006/fail/legacy-tool.component.ts +10 -0
- package/src/lint/rules/__fixtures__/comp/comp006/pass/legacy-tool.component.ts +14 -0
- package/src/lint/rules/__fixtures__/comp/comp007/fail/inventory-table.component.ts +13 -0
- package/src/lint/rules/__fixtures__/comp/comp007/fail/orders-table.component.ts +13 -0
- package/src/lint/rules/__fixtures__/comp/comp007/pass/orders-table.component.ts +12 -0
- package/src/lint/rules/__fixtures__/comp/comp007/pass/search-service.component.ts +18 -0
- package/src/lint/rules/comp/comp.test.ts +378 -0
- package/src/lint/rules/comp/comp001-publishes-never-applies.ts +78 -0
- package/src/lint/rules/comp/comp002-dangling-wiring-ref.ts +94 -0
- package/src/lint/rules/comp/comp003-mutating-no-rollback.ts +115 -0
- package/src/lint/rules/comp/comp004-gate-needs-temporal.ts +66 -0
- package/src/lint/rules/comp/comp005-capability-kind-is-noun.ts +113 -0
- package/src/lint/rules/comp/comp006-shell-needs-reason.ts +55 -0
- package/src/lint/rules/comp/comp007-composition-sprawl.ts +71 -0
- package/src/lint/rules/comp/index.ts +37 -0
- package/src/lint/rules/comp/support.ts +173 -0
- package/src/lsp/lexicon-providers.test.ts +55 -0
- package/src/lsp/lexicon-providers.ts +13 -3
- package/src/op/activity-registry.test.ts +38 -0
- package/src/op/activity-registry.ts +31 -12
- package/src/op/activity-runtime.ts +73 -0
- package/src/op/builders.ts +92 -0
- package/src/op/index.ts +3 -1
- package/src/ownership.test.ts +24 -26
- package/src/ownership.ts +26 -38
package/src/audit/catalog.ts
CHANGED
|
@@ -9,10 +9,12 @@
|
|
|
9
9
|
* diffed) vs `guidance` (needs human/LLM judgment — emit remediation text
|
|
10
10
|
* only; never auto-applied; never run by the hosted service).
|
|
11
11
|
*
|
|
12
|
-
*
|
|
13
|
-
*
|
|
14
|
-
*
|
|
15
|
-
*
|
|
12
|
+
* Each provider's rule metadata lives in its own lexicon's `auditCatalog()`
|
|
13
|
+
* (#687); this module owns the shared machinery — the `RuleMeta` shape, the
|
|
14
|
+
* `auditRule()` constructor lexicons build entries with, the shared authority
|
|
15
|
+
* citations, and `resolveAuditCatalog()` which merges the lexicons' catalogs
|
|
16
|
+
* over the small static core map (the cross-cutting COR/EXT ids). A drift-guard
|
|
17
|
+
* test asserts the aggregate stays in sync with the lexicons' post-synth checks.
|
|
16
18
|
*/
|
|
17
19
|
|
|
18
20
|
export type Tier = "merge-worthy" | "report-only";
|
|
@@ -54,62 +56,46 @@ export interface RuleMeta {
|
|
|
54
56
|
}
|
|
55
57
|
|
|
56
58
|
// ── Authority references ─────────────────────────────────────────────
|
|
57
|
-
const SCORECARD_TOKEN: Authority = {
|
|
59
|
+
export const SCORECARD_TOKEN: Authority = {
|
|
58
60
|
name: "OSSF Scorecard — Token-Permissions",
|
|
59
61
|
url: "https://github.com/ossf/scorecard/blob/main/docs/checks.md#token-permissions",
|
|
60
62
|
};
|
|
61
|
-
const GH_TOKEN: Authority = {
|
|
63
|
+
export const GH_TOKEN: Authority = {
|
|
62
64
|
name: "GitHub — Automatic token authentication",
|
|
63
65
|
url: "https://docs.github.com/en/actions/security-for-github-actions/security-guides/automatic-token-authentication",
|
|
64
66
|
};
|
|
65
|
-
const SCORECARD_PINNED: Authority = {
|
|
67
|
+
export const SCORECARD_PINNED: Authority = {
|
|
66
68
|
name: "OSSF Scorecard — Pinned-Dependencies",
|
|
67
69
|
url: "https://github.com/ossf/scorecard/blob/main/docs/checks.md#pinned-dependencies",
|
|
68
70
|
};
|
|
69
|
-
const GH_THIRD_PARTY: Authority = {
|
|
71
|
+
export const GH_THIRD_PARTY: Authority = {
|
|
70
72
|
name: "GitHub — Using third-party actions",
|
|
71
73
|
url: "https://docs.github.com/en/actions/security-for-github-actions/security-guides/security-hardening-for-github-actions#using-third-party-actions",
|
|
72
74
|
};
|
|
73
|
-
const GH_INJECTION: Authority = {
|
|
75
|
+
export const GH_INJECTION: Authority = {
|
|
74
76
|
name: "GitHub — Understanding the risk of script injections",
|
|
75
77
|
url: "https://docs.github.com/en/actions/security-for-github-actions/security-guides/security-hardening-for-github-actions#understanding-the-risk-of-script-injections",
|
|
76
78
|
};
|
|
77
|
-
const GH_PWN: Authority = {
|
|
79
|
+
export const GH_PWN: Authority = {
|
|
78
80
|
name: "GitHub Security Lab — Preventing pwn requests",
|
|
79
81
|
url: "https://securitylab.github.com/resources/github-actions-preventing-pwn-requests/",
|
|
80
82
|
};
|
|
81
|
-
const GH_SECRETS: Authority = {
|
|
83
|
+
export const GH_SECRETS: Authority = {
|
|
82
84
|
name: "GitHub — Using secrets in GitHub Actions",
|
|
83
85
|
url: "https://docs.github.com/en/actions/security-for-github-actions/security-guides/using-secrets-in-github-actions",
|
|
84
86
|
};
|
|
85
|
-
const GH_OIDC: Authority = {
|
|
87
|
+
export const GH_OIDC: Authority = {
|
|
86
88
|
name: "GitHub — Security hardening with OpenID Connect",
|
|
87
89
|
url: "https://docs.github.com/en/actions/concepts/security/openid-connect",
|
|
88
90
|
};
|
|
89
|
-
const K8S_PSS: Authority = {
|
|
91
|
+
export const K8S_PSS: Authority = {
|
|
90
92
|
name: "Kubernetes — Pod Security Standards",
|
|
91
93
|
url: "https://kubernetes.io/docs/concepts/security/pod-security-standards/",
|
|
92
94
|
};
|
|
93
|
-
const K8S_SECRETS: Authority = {
|
|
95
|
+
export const K8S_SECRETS: Authority = {
|
|
94
96
|
name: "Kubernetes — Good practices for Secrets",
|
|
95
97
|
url: "https://kubernetes.io/docs/concepts/security/secrets-good-practices/",
|
|
96
98
|
};
|
|
97
|
-
const DOCKER_SEC: Authority = {
|
|
98
|
-
name: "Docker — Security best practices",
|
|
99
|
-
url: "https://docs.docker.com/develop/security-best-practices/",
|
|
100
|
-
};
|
|
101
|
-
const AWS_SEC: Authority = {
|
|
102
|
-
name: "AWS — Security Pillar (Well-Architected)",
|
|
103
|
-
url: "https://docs.aws.amazon.com/wellarchitected/latest/security-pillar/welcome.html",
|
|
104
|
-
};
|
|
105
|
-
const AZ_SEC: Authority = {
|
|
106
|
-
name: "Microsoft Cloud Security Benchmark",
|
|
107
|
-
url: "https://learn.microsoft.com/en-us/security/benchmark/azure/",
|
|
108
|
-
};
|
|
109
|
-
const GCP_SEC: Authority = {
|
|
110
|
-
name: "Google Cloud — Security best practices",
|
|
111
|
-
url: "https://cloud.google.com/security/best-practices",
|
|
112
|
-
};
|
|
113
99
|
|
|
114
100
|
function meta(
|
|
115
101
|
id: string,
|
|
@@ -139,456 +125,73 @@ const G = "guidance" as const;
|
|
|
139
125
|
* best-practice. A drift test asserts this covers every catalogued rule.
|
|
140
126
|
*/
|
|
141
127
|
export const RULE_CATEGORY: Record<string, Category> = {
|
|
142
|
-
ARGO002: "correctness",
|
|
143
|
-
ARGO003: "correctness",
|
|
144
|
-
ARGO005: "best-practice",
|
|
145
|
-
AZR010: "best-practice",
|
|
146
|
-
AZR011: "correctness",
|
|
147
|
-
AZR012: "best-practice",
|
|
148
|
-
AZR013: "correctness",
|
|
149
|
-
AZR014: "security",
|
|
150
|
-
AZR015: "security",
|
|
151
|
-
AZR016: "best-practice",
|
|
152
|
-
AZR017: "best-practice",
|
|
153
|
-
AZR018: "best-practice",
|
|
154
|
-
AZR019: "security",
|
|
155
|
-
AZR020: "best-practice",
|
|
156
|
-
AZR021: "security",
|
|
157
|
-
AZR022: "security",
|
|
158
|
-
AZR023: "best-practice",
|
|
159
|
-
AZR024: "best-practice",
|
|
160
|
-
AZR025: "best-practice",
|
|
161
|
-
AZR026: "best-practice",
|
|
162
|
-
AZR027: "security",
|
|
163
|
-
AZR028: "best-practice",
|
|
164
|
-
AZR029: "security",
|
|
165
128
|
COR020: "correctness",
|
|
166
|
-
DKRD001: "best-practice",
|
|
167
|
-
DKRD002: "best-practice",
|
|
168
|
-
DKRD003: "security",
|
|
169
|
-
DKRD010: "best-practice",
|
|
170
|
-
DKRD011: "best-practice",
|
|
171
|
-
DKRD012: "security",
|
|
172
129
|
EXT001: "correctness",
|
|
173
|
-
GHA006: "correctness",
|
|
174
|
-
GHA009: "correctness",
|
|
175
|
-
GHA011: "correctness",
|
|
176
|
-
GHA013: "security",
|
|
177
|
-
GHA017: "security",
|
|
178
|
-
GHA018: "security",
|
|
179
|
-
GHA019: "correctness",
|
|
180
|
-
GHA021: "security",
|
|
181
|
-
GHA022: "best-practice",
|
|
182
|
-
GHA023: "best-practice",
|
|
183
|
-
GHA024: "best-practice",
|
|
184
|
-
GHA025: "security",
|
|
185
|
-
GHA026: "best-practice",
|
|
186
|
-
GHA027: "best-practice",
|
|
187
|
-
GHA028: "correctness",
|
|
188
|
-
GHA029: "security",
|
|
189
|
-
GHA030: "security",
|
|
190
|
-
GHA031: "security",
|
|
191
|
-
GHA032: "security",
|
|
192
|
-
GHA033: "security",
|
|
193
|
-
GHA034: "security",
|
|
194
|
-
GHA035: "security",
|
|
195
|
-
GHA036: "security",
|
|
196
|
-
GHA037: "security",
|
|
197
|
-
GHA038: "security",
|
|
198
|
-
GHA039: "security",
|
|
199
|
-
GHA040: "security",
|
|
200
|
-
GHA041: "security",
|
|
201
|
-
GHA042: "security",
|
|
202
|
-
GHA043: "security",
|
|
203
|
-
GHA044: "security",
|
|
204
|
-
GHA045: "security",
|
|
205
|
-
GHA046: "correctness",
|
|
206
|
-
GHA047: "correctness",
|
|
207
|
-
GHA048: "correctness",
|
|
208
|
-
GHA049: "security",
|
|
209
|
-
GHA050: "security",
|
|
210
|
-
GHA051: "best-practice",
|
|
211
|
-
GHA052: "security",
|
|
212
|
-
GHA053: "security",
|
|
213
|
-
GHA054: "security",
|
|
214
|
-
GHA055: "best-practice",
|
|
215
|
-
GHA056: "best-practice",
|
|
216
|
-
GHA057: "security",
|
|
217
|
-
GHA058: "best-practice",
|
|
218
|
-
WAW010: "best-practice",
|
|
219
|
-
WAW011: "best-practice",
|
|
220
|
-
WAW013: "correctness",
|
|
221
|
-
WAW014: "best-practice",
|
|
222
|
-
WAW015: "correctness",
|
|
223
|
-
WAW016: "best-practice",
|
|
224
|
-
WAW017: "best-practice",
|
|
225
|
-
WAW018: "security",
|
|
226
|
-
WAW019: "security",
|
|
227
|
-
WAW020: "security",
|
|
228
|
-
WAW021: "security",
|
|
229
|
-
WAW022: "best-practice",
|
|
230
|
-
WAW023: "best-practice",
|
|
231
|
-
WAW024: "best-practice",
|
|
232
|
-
WAW025: "security",
|
|
233
|
-
WAW026: "security",
|
|
234
|
-
WAW027: "best-practice",
|
|
235
|
-
WAW028: "security",
|
|
236
|
-
WAW029: "correctness",
|
|
237
|
-
WAW030: "best-practice",
|
|
238
|
-
WAW031: "best-practice",
|
|
239
|
-
WAW032: "security",
|
|
240
|
-
WAW033: "correctness",
|
|
241
|
-
WAW034: "best-practice",
|
|
242
|
-
WAW035: "best-practice",
|
|
243
|
-
WAW036: "correctness",
|
|
244
|
-
WAW037: "correctness",
|
|
245
|
-
WFJ010: "correctness",
|
|
246
|
-
WFJ011: "correctness",
|
|
247
|
-
WGC101: "security",
|
|
248
|
-
WGC102: "security",
|
|
249
|
-
WGC103: "best-practice",
|
|
250
|
-
WGC104: "security",
|
|
251
|
-
WGC105: "security",
|
|
252
|
-
WGC106: "best-practice",
|
|
253
|
-
WGC107: "best-practice",
|
|
254
|
-
WGC108: "best-practice",
|
|
255
|
-
WGC109: "security",
|
|
256
|
-
WGC110: "security",
|
|
257
|
-
WGC111: "correctness",
|
|
258
|
-
WGC112: "correctness",
|
|
259
|
-
WGC113: "best-practice",
|
|
260
|
-
WGC201: "best-practice",
|
|
261
|
-
WGC202: "security",
|
|
262
|
-
WGC203: "security",
|
|
263
|
-
WGC204: "best-practice",
|
|
264
|
-
WGC301: "best-practice",
|
|
265
|
-
WGC302: "best-practice",
|
|
266
|
-
WGC303: "best-practice",
|
|
267
|
-
WGC401: "correctness",
|
|
268
|
-
WGC402: "correctness",
|
|
269
|
-
WGC403: "correctness",
|
|
270
|
-
WGL010: "correctness",
|
|
271
|
-
WGL011: "correctness",
|
|
272
|
-
WGL012: "best-practice",
|
|
273
|
-
WGL013: "correctness",
|
|
274
|
-
WGL014: "correctness",
|
|
275
|
-
WGL015: "correctness",
|
|
276
|
-
WGL016: "security",
|
|
277
|
-
WGL017: "security",
|
|
278
|
-
WGL018: "best-practice",
|
|
279
|
-
WGL019: "best-practice",
|
|
280
|
-
WGL020: "correctness",
|
|
281
|
-
WGL021: "best-practice",
|
|
282
|
-
WGL022: "best-practice",
|
|
283
|
-
WGL023: "best-practice",
|
|
284
|
-
WGL024: "best-practice",
|
|
285
|
-
WGL025: "best-practice",
|
|
286
|
-
WGL026: "security",
|
|
287
|
-
WGL027: "correctness",
|
|
288
|
-
WGL028: "best-practice",
|
|
289
|
-
WGL029: "security",
|
|
290
|
-
WGL030: "security",
|
|
291
|
-
WGL031: "security",
|
|
292
|
-
WGL032: "security",
|
|
293
|
-
WGL033: "security",
|
|
294
|
-
WGL034: "security",
|
|
295
|
-
WGL035: "security",
|
|
296
|
-
WGL036: "security",
|
|
297
|
-
WGL037: "security",
|
|
298
|
-
WGL038: "security",
|
|
299
|
-
WGL039: "security",
|
|
300
|
-
WGL040: "security",
|
|
301
|
-
WGL041: "correctness",
|
|
302
|
-
WGL042: "best-practice",
|
|
303
|
-
WGL043: "security",
|
|
304
|
-
WGL044: "security",
|
|
305
|
-
WGL045: "security",
|
|
306
|
-
WGL046: "security",
|
|
307
|
-
WGL047: "security",
|
|
308
|
-
WGL048: "best-practice",
|
|
309
|
-
WHM005: "best-practice",
|
|
310
|
-
WHM101: "correctness",
|
|
311
|
-
WHM102: "best-practice",
|
|
312
|
-
WHM103: "correctness",
|
|
313
|
-
WHM104: "best-practice",
|
|
314
|
-
WHM105: "best-practice",
|
|
315
|
-
WHM201: "best-practice",
|
|
316
|
-
WHM202: "best-practice",
|
|
317
|
-
WHM203: "best-practice",
|
|
318
|
-
WHM204: "best-practice",
|
|
319
|
-
WHM301: "best-practice",
|
|
320
|
-
WHM302: "best-practice",
|
|
321
|
-
WHM401: "security",
|
|
322
|
-
WHM402: "security",
|
|
323
|
-
WHM403: "security",
|
|
324
|
-
WHM404: "security",
|
|
325
|
-
WHM405: "best-practice",
|
|
326
|
-
WHM406: "best-practice",
|
|
327
|
-
WHM407: "security",
|
|
328
|
-
WHM501: "best-practice",
|
|
329
|
-
WHM502: "correctness",
|
|
330
|
-
WK8005: "security",
|
|
331
|
-
WK8006: "best-practice",
|
|
332
|
-
WK8041: "security",
|
|
333
|
-
WK8042: "security",
|
|
334
|
-
WK8101: "correctness",
|
|
335
|
-
WK8102: "best-practice",
|
|
336
|
-
WK8103: "correctness",
|
|
337
|
-
WK8104: "best-practice",
|
|
338
|
-
WK8105: "best-practice",
|
|
339
|
-
WK8201: "best-practice",
|
|
340
|
-
WK8202: "security",
|
|
341
|
-
WK8203: "security",
|
|
342
|
-
WK8204: "security",
|
|
343
|
-
WK8205: "security",
|
|
344
|
-
WK8207: "security",
|
|
345
|
-
WK8208: "security",
|
|
346
|
-
WK8209: "security",
|
|
347
|
-
WK8301: "best-practice",
|
|
348
|
-
WK8302: "best-practice",
|
|
349
|
-
WK8303: "best-practice",
|
|
350
|
-
WK8304: "best-practice",
|
|
351
|
-
WK8305: "correctness",
|
|
352
|
-
WK8306: "correctness",
|
|
353
|
-
WK8401: "correctness",
|
|
354
|
-
WK8402: "best-practice",
|
|
355
|
-
WK8403: "best-practice",
|
|
356
130
|
};
|
|
357
131
|
|
|
358
|
-
/**
|
|
132
|
+
/**
|
|
133
|
+
* Core's static portion of the audit catalog — now only the cross-cutting
|
|
134
|
+
* CloudFormation ids (COR/EXT) that aren't owned by a single lexicon. Every
|
|
135
|
+
* per-provider block moved to its lexicon's `auditCatalog()` (#687): WAW→aws,
|
|
136
|
+
* WGC→gcp, AZR→azure, DKRD→docker, WK8/ARGO→k8s, WHM→helm, GHA→github,
|
|
137
|
+
* WGL→gitlab, WFJ→forgejo. `resolveAuditCatalog` merges those over this map.
|
|
138
|
+
*/
|
|
359
139
|
export const RULE_CATALOG: Record<string, RuleMeta> = {
|
|
360
|
-
// ── GitHub Actions (GHA) ───────────────────────────────────────────
|
|
361
|
-
GHA006: meta("GHA006", R, G, "Duplicate workflow name", "Give each workflow a unique `name:`."),
|
|
362
|
-
GHA009: meta("GHA009", M, G, "Empty matrix dimension", "Remove the empty matrix axis or give it values; an empty axis produces zero jobs."),
|
|
363
|
-
GHA011: meta("GHA011", M, G, "needs references a non-existent job", "Fix the `needs:` target to name a real job."),
|
|
364
|
-
GHA013: meta("GHA013", M, G, "Missing job permissions on a sensitive trigger", "Add an explicit least-privilege `permissions:` block to jobs under `pull_request_target`/`workflow_dispatch`.", [SCORECARD_TOKEN, GH_TOKEN]),
|
|
365
|
-
GHA017: meta("GHA017", M, D, "No explicit permissions block", "Add a top-level `permissions: { contents: read }` and widen only where a job needs it.", [SCORECARD_TOKEN, GH_TOKEN]),
|
|
366
|
-
GHA018: meta("GHA018", M, G, "pull_request_target checks out untrusted code", "Don't check out / run PR head code under `pull_request_target`; split into a privileged + unprivileged workflow.", [GH_PWN]),
|
|
367
|
-
GHA019: meta("GHA019", M, G, "Circular needs chain", "Break the cycle in the job dependency graph."),
|
|
368
|
-
GHA021: meta("GHA021", M, D, "actions/checkout not pinned to a SHA", "Pin `actions/checkout` to a full 40-char commit SHA.", [SCORECARD_PINNED, GH_THIRD_PARTY]),
|
|
369
|
-
GHA022: meta("GHA022", R, G, "Job without timeout-minutes", "Add `timeout-minutes:` to bound runaway jobs."),
|
|
370
|
-
GHA023: meta("GHA023", R, G, "Deprecated ::set-output", "Replace `::set-output` with `$GITHUB_OUTPUT`."),
|
|
371
|
-
GHA024: meta("GHA024", R, G, "Missing concurrency block", "Add a `concurrency:` group to deploy workflows."),
|
|
372
|
-
GHA025: meta("GHA025", M, G, "Unrestricted pull_request_target", "Gate `pull_request_target` jobs and avoid running untrusted code with elevated scope.", [GH_PWN]),
|
|
373
|
-
GHA026: meta("GHA026", R, G, "Secret used without environment protection", "Move secret-consuming jobs behind a protected `environment:`."),
|
|
374
|
-
GHA027: meta("GHA027", R, G, "Cleanup step without if: always()", "Add `if: always()` to cleanup steps."),
|
|
375
|
-
GHA028: meta("GHA028", M, G, "Workflow with no triggers", "Add an `on:` trigger; the workflow never runs without one."),
|
|
376
|
-
GHA029: meta("GHA029", M, D, "Action not pinned to a commit SHA", "Pin the action to a full commit SHA instead of a tag/branch.", [SCORECARD_PINNED, GH_THIRD_PARTY]),
|
|
377
|
-
GHA030: meta("GHA030", M, D, "Container image not pinned to a digest", "Pin the image to an immutable `@sha256:` digest.", [SCORECARD_PINNED]),
|
|
378
|
-
GHA031: meta("GHA031", M, G, "Possible action impersonation", "Verify the action owner/slug; it resembles a well-known action.", [SCORECARD_PINNED]),
|
|
379
|
-
GHA032: meta("GHA032", M, G, "Archived/abandoned or vulnerable action", "Replace the archived action or one with a disclosed security issue."),
|
|
380
|
-
GHA033: meta("GHA033", M, D, "Blanket write-all permissions", "Replace `write-all` with the specific scopes the jobs need (default `contents: read`).", [SCORECARD_TOKEN, GH_TOKEN]),
|
|
381
|
-
GHA034: meta("GHA034", M, G, "Write permissions granted workflow-wide", "Move write scopes to the single job that needs them; keep the workflow least-privilege.", [SCORECARD_TOKEN, GH_TOKEN]),
|
|
382
|
-
GHA035: meta("GHA035", M, G, "Elevated token on an untrusted-code trigger", "Drop the elevated `permissions:` on triggers that can run untrusted code.", [GH_PWN, SCORECARD_TOKEN]),
|
|
383
|
-
GHA036: meta("GHA036", M, G, "Untrusted input interpolated into run:", "Pass untrusted `${{ }}` values via an `env:` var and reference `\"$VAR\"`, never inline in the script.", [GH_INJECTION]),
|
|
384
|
-
GHA037: meta("GHA037", M, G, "Untrusted input written to GITHUB_ENV/GITHUB_PATH", "Don't write untrusted input to `$GITHUB_ENV`/`$GITHUB_PATH`; sanitize or avoid.", [GH_INJECTION]),
|
|
385
|
-
GHA038: meta("GHA038", M, G, "workflow_run checks out untrusted code in a privileged context", "Avoid checking out untrusted code under `workflow_run`; treat it as privileged.", [GH_PWN]),
|
|
386
|
-
GHA039: meta("GHA039", M, G, "Auth gate on a spoofable author field", "Gate on a non-spoofable identity, not a commit-author field.", [GH_PWN]),
|
|
387
|
-
GHA040: meta("GHA040", M, G, "Self-hosted runner on an untrusted-code trigger", "Don't run untrusted-code triggers on self-hosted runners.", [GH_PWN]),
|
|
388
|
-
GHA041: meta("GHA041", M, G, "Blanket secrets: inherit", "Pass only the specific secrets the reusable workflow needs.", [GH_SECRETS]),
|
|
389
|
-
GHA042: meta("GHA042", M, G, "Entire secrets context passed", "Pass named secrets instead of the whole `secrets` context.", [GH_SECRETS]),
|
|
390
|
-
GHA043: meta("GHA043", M, G, "Secret consumed without an environment gate", "Put secret-consuming jobs behind a protected environment.", [GH_SECRETS]),
|
|
391
|
-
GHA044: meta("GHA044", M, G, "Hardcoded registry/container credential", "Remove the hardcoded credential, move it to a secret, and rotate it (responsible disclosure first).", [GH_SECRETS]),
|
|
392
|
-
GHA045: meta("GHA045", M, G, "Secret interpolated into run:", "Reference secrets via `env:`, not inline in the shell command.", [GH_INJECTION, GH_SECRETS]),
|
|
393
|
-
GHA046: meta("GHA046", M, G, "Constant/unsound guard condition", "Fix the always-true/false `if:` — it may neutralize a security gate."),
|
|
394
|
-
GHA047: meta("GHA047", M, G, "Ineffective contains() guard (reversed args)", "Swap the `contains()` arguments so the guard actually filters."),
|
|
395
|
-
GHA048: meta("GHA048", M, G, "Obfuscated guard condition", "Simplify the indirect `if:` so its effect is reviewable."),
|
|
396
|
-
GHA049: meta("GHA049", M, G, "Persisted checkout credentials reachable by an artifact", "Use `persist-credentials: false` or exclude `.git` from uploaded artifacts.", [GH_SECRETS]),
|
|
397
|
-
GHA050: meta("GHA050", M, G, "Cache populated in a privileged context", "Don't populate caches from untrusted code paths (poisoning risk).", [GH_PWN]),
|
|
398
|
-
GHA051: meta("GHA051", R, G, "Long-lived token instead of OIDC", "Migrate publish/release to OIDC short-lived credentials."),
|
|
399
|
-
GHA052: meta("GHA052", M, G, "Software piped to a shell without verification", "Verify a checksum/signature before executing fetched scripts.", [SCORECARD_PINNED]),
|
|
400
|
-
GHA053: meta("GHA053", M, G, "Re-enables unsafe set-env/add-path", "Remove `ACTIONS_ALLOW_UNSECURE_COMMANDS`; use `$GITHUB_ENV`/`$GITHUB_PATH`.", [GH_INJECTION]),
|
|
401
|
-
GHA054: meta("GHA054", M, G, "Feature with a known security footgun", "Replace the flagged feature with the safe alternative."),
|
|
402
|
-
GHA055: meta("GHA055", R, G, "Runtime install of a tool already on the runner", "Drop the redundant install to save time."),
|
|
403
|
-
GHA056: meta("GHA056", R, G, "Workflow without a name", "Add a `name:` to the workflow."),
|
|
404
|
-
GHA057: meta("GHA057", M, G, "Dependency update can execute untrusted code", "Disable the option that lets dependency updates run external code.", [GH_PWN]),
|
|
405
|
-
GHA058: meta("GHA058", R, G, "Dependency update has no cooldown window", "Add a cooldown so new releases aren't merged instantly."),
|
|
406
|
-
|
|
407
|
-
// ── GitLab CI (WGL) ────────────────────────────────────────────────
|
|
408
|
-
WGL010: meta("WGL010", M, G, "Job references an undefined stage", "Add the stage to `stages:` or fix the job's `stage:`."),
|
|
409
|
-
WGL011: meta("WGL011", M, G, "Job rules always evaluate to never", "Fix the `rules:` so the job can run; it is currently unreachable."),
|
|
410
|
-
WGL012: meta("WGL012", R, G, "Deprecated property", "Replace the deprecated GitLab CI property."),
|
|
411
|
-
WGL013: meta("WGL013", M, G, "Invalid needs target", "Fix the dangling/self `needs:` reference."),
|
|
412
|
-
WGL014: meta("WGL014", M, G, "Invalid extends target", "Point `extends:` at a template that exists in the pipeline."),
|
|
413
|
-
WGL015: meta("WGL015", M, G, "Circular needs chain", "Break the cycle in the job dependency graph."),
|
|
414
|
-
WGL016: meta("WGL016", M, G, "Hardcoded secret in variables", "Move the secret out of `variables:` into a masked/protected CI variable and rotate it.", [GH_SECRETS]),
|
|
415
|
-
WGL017: meta("WGL017", M, G, "Insecure (non-HTTPS) registry", "Use an HTTPS registry endpoint."),
|
|
416
|
-
WGL018: meta("WGL018", R, G, "Missing job timeout", "Add a `timeout:` to bound long-running jobs."),
|
|
417
|
-
WGL019: meta("WGL019", R, G, "Missing retry on deploy job", "Add a `retry:` strategy to deploy jobs."),
|
|
418
|
-
WGL020: meta("WGL020", M, G, "Duplicate job names", "Rename so each job resolves to a unique name."),
|
|
419
|
-
WGL021: meta("WGL021", R, G, "Unused global variable", "Remove the unused global `variables:` entry."),
|
|
420
|
-
WGL022: meta("WGL022", R, G, "Missing artifacts expiry", "Add `expire_in:` to artifacts to avoid disk bloat."),
|
|
421
|
-
WGL023: meta("WGL023", R, G, "Overly broad rules (when: always)", "Add real conditions to the job's `rules:`."),
|
|
422
|
-
WGL024: meta("WGL024", R, G, "Manual job without allow_failure", "Add `allow_failure: true` so a manual job doesn't block the pipeline."),
|
|
423
|
-
WGL025: meta("WGL025", R, G, "Cache without a key", "Add a `cache.key` to avoid cross-job cache collisions."),
|
|
424
|
-
WGL026: meta("WGL026", M, G, "Privileged DinD service without TLS", "Set `DOCKER_TLS_CERTDIR` for privileged Docker-in-Docker services."),
|
|
425
|
-
WGL027: meta("WGL027", M, G, "Empty script", "Give the job a non-empty `script:`; it currently does nothing."),
|
|
426
|
-
WGL028: meta("WGL028", R, G, "Redundant needs", "Drop `needs:` already implied by stage ordering."),
|
|
427
|
-
WGL029: meta("WGL029", M, G, "include/component resolved by a moving ref", "Pin `include:project`/component to a tag or commit SHA, not a branch.", [SCORECARD_PINNED]),
|
|
428
|
-
WGL030: meta("WGL030", M, G, "Insecure or mutable include:remote", "Use HTTPS and pin the remote include to an immutable ref.", [SCORECARD_PINNED]),
|
|
429
|
-
WGL031: meta("WGL031", M, D, "Container image not pinned to a digest", "Pin the image to an immutable `@sha256:` digest.", [SCORECARD_PINNED]),
|
|
430
|
-
WGL032: meta("WGL032", M, G, "Possible include/component impersonation", "Verify the include source; it resembles a well-known project.", [SCORECARD_PINNED]),
|
|
431
|
-
WGL033: meta("WGL033", M, G, "OIDC id_token without a scoped audience", "Set a specific `aud:` on the OIDC id_token.", [GH_OIDC]),
|
|
432
|
-
WGL034: meta("WGL034", M, G, "OIDC id_token mintable from a merge-request pipeline", "Restrict OIDC token minting to protected pipelines.", [GH_OIDC, GH_PWN]),
|
|
433
|
-
WGL035: meta("WGL035", M, G, "Untrusted CI variable interpolated into a script", "Pass untrusted variables via the environment and quote them; don't inline.", [GH_INJECTION]),
|
|
434
|
-
WGL036: meta("WGL036", M, G, "Privileged service reachable from merge-request pipelines", "Block privileged/DinD services on merge-request pipelines.", [GH_PWN]),
|
|
435
|
-
WGL037: meta("WGL037", M, G, "Security gate on an untrusted ref regex", "Don't gate security decisions on a regex over an untrusted ref variable.", [GH_PWN]),
|
|
436
|
-
WGL038: meta("WGL038", M, G, "Secret reachable from a merge-request pipeline", "Scope secret-like variables to protected branches/pipelines.", [GH_SECRETS, GH_PWN]),
|
|
437
|
-
WGL039: meta("WGL039", M, G, "Secret printed to job logs", "Stop echoing the secret-like variable; mask it.", [GH_SECRETS]),
|
|
438
|
-
WGL040: meta("WGL040", M, G, "Hardcoded credential in a registry login", "Move the credential to a masked CI variable and rotate it.", [GH_SECRETS]),
|
|
439
|
-
WGL041: meta("WGL041", M, G, "Tautological rules:if condition", "Fix the always-true `rules:if`; it may neutralize a gate."),
|
|
440
|
-
WGL042: meta("WGL042", R, G, "Unreachable rules after an unconditional match", "Remove the dead `rules:` entries after the catch-all."),
|
|
441
|
-
WGL043: meta("WGL043", M, G, "Match-anything regex gate in rules:if", "Tighten the regex; a match-anything gate is no gate.", [GH_PWN]),
|
|
442
|
-
WGL044: meta("WGL044", M, G, "Public artifacts expose build output", "Mark sensitive artifacts non-public (`public: false`)."),
|
|
443
|
-
WGL045: meta("WGL045", M, G, "Artifact path may capture a credential file", "Narrow the artifact path so it can't capture credential files.", [GH_SECRETS]),
|
|
444
|
-
WGL046: meta("WGL046", M, G, "Cache populated in a merge-request pipeline", "Don't populate caches from merge-request pipelines (poisoning risk).", [GH_PWN]),
|
|
445
|
-
WGL047: meta("WGL047", M, G, "Software piped to a shell without verification", "Verify a checksum/signature before executing fetched scripts.", [SCORECARD_PINNED]),
|
|
446
|
-
WGL048: meta("WGL048", R, G, "Pipeline without workflow:name", "Add a `workflow:name` for clearer pipeline naming."),
|
|
447
|
-
|
|
448
|
-
// ── Forgejo (WFJ) ──────────────────────────────────────────────────
|
|
449
|
-
WFJ010: meta("WFJ010", M, G, "Unresolved action reference on Forgejo", "Use an action reference Forgejo can resolve (full URL or a mirrored action)."),
|
|
450
|
-
WFJ011: meta("WFJ011", M, G, "GitHub-hosted runner label with no Forgejo equivalent", "Use a runner label your Forgejo instance provides."),
|
|
451
|
-
|
|
452
|
-
// ── Kubernetes (WK8 / ARGO) ────────────────────────────────────────
|
|
453
|
-
ARGO002: meta("ARGO002", M, G, "Argo Application references an undeclared AppProject", "Declare the named AppProject or reference an existing project."),
|
|
454
|
-
ARGO003: meta("ARGO003", M, G, "Argo Application targets an unregistered cluster", "Point spec.destination at a registered cluster or the in-cluster target."),
|
|
455
|
-
ARGO005: meta("ARGO005", R, G, "Argo source.path may not resolve", "Ensure the source path exists under the build root."),
|
|
456
|
-
WK8005: meta("WK8005", M, G, "Hardcoded secret in env var", "Use a secretKeyRef instead of a literal value, and rotate the secret.", [K8S_SECRETS]),
|
|
457
|
-
WK8006: meta("WK8006", M, G, "Image uses :latest or no tag", "Pin the image to an explicit version tag (ideally a digest).", [SCORECARD_PINNED]),
|
|
458
|
-
WK8041: meta("WK8041", M, G, "Hardcoded API key in env var", "Move the key to a Secret and rotate it.", [K8S_SECRETS]),
|
|
459
|
-
WK8042: meta("WK8042", M, G, "Private key stored in a ConfigMap", "Store private keys in a Secret, not a ConfigMap.", [K8S_SECRETS]),
|
|
460
|
-
WK8101: meta("WK8101", M, G, "Deployment selector does not match template labels", "Align spec.selector with the pod template labels."),
|
|
461
|
-
WK8102: meta("WK8102", R, G, "Resource missing metadata labels", "Add metadata labels for filtering and tooling."),
|
|
462
|
-
WK8103: meta("WK8103", M, G, "Container missing name", "Add the required container `name`."),
|
|
463
|
-
WK8104: meta("WK8104", R, G, "Container ports not named", "Name ports for clearer Service/NetworkPolicy config."),
|
|
464
|
-
WK8105: meta("WK8105", R, G, "imagePullPolicy not explicit", "Set imagePullPolicy explicitly to avoid surprising defaults."),
|
|
465
|
-
WK8201: meta("WK8201", R, G, "Container missing resource limits", "Set CPU and memory limits."),
|
|
466
|
-
WK8202: meta("WK8202", M, G, "Privileged container", "Remove privileged: true; grant only the specific capabilities needed.", [K8S_PSS]),
|
|
467
|
-
WK8203: meta("WK8203", M, G, "Root filesystem is writable", "Set readOnlyRootFilesystem: true.", [K8S_PSS]),
|
|
468
|
-
WK8204: meta("WK8204", M, G, "Container may run as root", "Set runAsNonRoot: true (and a non-zero runAsUser).", [K8S_PSS]),
|
|
469
|
-
WK8205: meta("WK8205", M, G, "Capabilities not dropped", "drop: [ALL] and add back only what is required.", [K8S_PSS]),
|
|
470
|
-
WK8207: meta("WK8207", M, G, "Pod uses host network", "Remove hostNetwork; it bypasses network isolation.", [K8S_PSS]),
|
|
471
|
-
WK8208: meta("WK8208", M, G, "Pod shares host PID namespace", "Remove hostPID.", [K8S_PSS]),
|
|
472
|
-
WK8209: meta("WK8209", M, G, "Pod shares host IPC namespace", "Remove hostIPC.", [K8S_PSS]),
|
|
473
|
-
WK8301: meta("WK8301", R, G, "Container missing probes", "Add liveness and readiness probes."),
|
|
474
|
-
WK8302: meta("WK8302", R, G, "Deployment has a single replica", "Use replicas >= 2 for availability."),
|
|
475
|
-
WK8303: meta("WK8303", R, G, "No PodDisruptionBudget for an HA Deployment", "Add a PDB to protect availability during disruptions."),
|
|
476
|
-
WK8304: meta("WK8304", R, G, "SSL redirect without a certificate", "Provide a certificate and HTTPS listen-ports for the ssl-redirect annotation."),
|
|
477
|
-
WK8305: meta("WK8305", M, G, "Ingress backend port does not match the Service", "Point the Ingress backend at a declared Service port."),
|
|
478
|
-
WK8306: meta("WK8306", M, G, "Container command starts with a flag", "The first command element should be a binary, not a flag."),
|
|
479
|
-
WK8401: meta("WK8401", M, G, "shmSize exceeds the container memory limit", "Lower shmSize or raise the memory limit so the pod can schedule."),
|
|
480
|
-
WK8402: meta("WK8402", R, G, "RayCluster missing spec.rayVersion", "Set spec.rayVersion so KubeRay picks the right autoscaler image."),
|
|
481
|
-
WK8403: meta("WK8403", R, G, "rayVersion does not match the head image tag", "Align spec.rayVersion with the Ray version in the head container image."),
|
|
482
|
-
|
|
483
|
-
// ── Docker (DKRD) ──────────────────────────────────────────────────
|
|
484
|
-
DKRD001: meta("DKRD001", M, G, "Service uses :latest or untagged image", "Pin the image to an explicit version tag (ideally a digest).", [SCORECARD_PINNED]),
|
|
485
|
-
DKRD002: meta("DKRD002", R, G, "Named volume declared but unused", "Remove the unused volume or mount it in a service."),
|
|
486
|
-
DKRD003: meta("DKRD003", M, G, "Service exposes SSH (port 22)", "Don't expose SSH from a container; use exec/ephemeral access instead.", [DOCKER_SEC]),
|
|
487
|
-
DKRD010: meta("DKRD010", R, G, "apt-get install without --no-install-recommends", "Add --no-install-recommends to keep images small."),
|
|
488
|
-
DKRD011: meta("DKRD011", R, G, "ADD used where COPY would do", "Prefer COPY unless fetching a URL or extracting an archive."),
|
|
489
|
-
DKRD012: meta("DKRD012", M, G, "No USER instruction — container runs as root", "Add a non-root USER instruction.", [DOCKER_SEC]),
|
|
490
|
-
|
|
491
|
-
// ── AWS CloudFormation (WAW / COR / EXT) ───────────────────────────
|
|
492
140
|
COR020: meta("COR020", M, G, "Circular resource dependency", "Break the dependency cycle between resources."),
|
|
493
141
|
EXT001: meta("EXT001", M, G, "Extension constraint violation", "Fix the cross-property constraint flagged by the cfn-lint extension schema."),
|
|
494
|
-
|
|
495
|
-
WAW011: meta("WAW011", R, G, "Deprecated Lambda runtime", "Upgrade to a supported Lambda runtime."),
|
|
496
|
-
WAW013: meta("WAW013", M, G, "Child stack exports nothing", "Add stackOutput() exports the parent can reference."),
|
|
497
|
-
WAW014: meta("WAW014", R, G, "Nested stack outputs never referenced", "Reference the outputs or split into a separate build."),
|
|
498
|
-
WAW015: meta("WAW015", M, G, "Circular dependency between nested stacks", "Break the cycle between nested stacks."),
|
|
499
|
-
WAW016: meta("WAW016", R, G, "Deprecated property", "Replace the deprecated CloudFormation property."),
|
|
500
|
-
WAW017: meta("WAW017", R, G, "Missing tags on a taggable resource", "Add tags for cost allocation and compliance."),
|
|
501
|
-
WAW018: meta("WAW018", M, G, "S3 bucket missing public access block", "Add a PublicAccessBlockConfiguration blocking all public access.", [AWS_SEC]),
|
|
502
|
-
WAW019: meta("WAW019", M, G, "Security group allows unrestricted ingress on a sensitive port", "Restrict the CIDR on SSH/RDP/database ports to known sources.", [AWS_SEC]),
|
|
503
|
-
WAW020: meta("WAW020", M, G, "IAM policy uses a wildcard Action", "Scope the policy to specific actions (least privilege).", [AWS_SEC]),
|
|
504
|
-
WAW021: meta("WAW021", M, G, "RDS storage not encrypted", "Enable StorageEncrypted for encryption at rest.", [AWS_SEC]),
|
|
505
|
-
WAW022: meta("WAW022", R, G, "Lambda has no VpcConfig", "Consider a VpcConfig for network isolation if the function needs VPC resources."),
|
|
506
|
-
WAW023: meta("WAW023", R, G, "CloudFront has no WAF web ACL", "Consider attaching a WAF web ACL."),
|
|
507
|
-
WAW024: meta("WAW024", R, G, "ALB access logging disabled", "Enable access logging for audit trails."),
|
|
508
|
-
WAW025: meta("WAW025", M, G, "SNS topic not encrypted", "Set KmsMasterKeyId for encryption at rest.", [AWS_SEC]),
|
|
509
|
-
WAW026: meta("WAW026", M, G, "SQS queue not encrypted", "Enable SqsManagedSseEnabled or set KmsMasterKeyId.", [AWS_SEC]),
|
|
510
|
-
WAW027: meta("WAW027", R, G, "DynamoDB point-in-time recovery disabled", "Enable PITR for recovery."),
|
|
511
|
-
WAW028: meta("WAW028", M, G, "EBS volume not encrypted", "Enable encryption at rest.", [AWS_SEC]),
|
|
512
|
-
WAW029: meta("WAW029", M, G, "Invalid DependsOn target", "Fix the dangling/self DependsOn reference."),
|
|
513
|
-
WAW030: meta("WAW030", R, G, "Missing DependsOn for a known ordering pattern", "Add the DependsOn the pattern requires."),
|
|
514
|
-
WAW031: meta("WAW031", R, G, "EKS Addon missing ServiceAccountRoleArn", "Set ServiceAccountRoleArn (IRSA) for addons that need it."),
|
|
515
|
-
WAW032: meta("WAW032", M, G, "EFS transit encryption disabled on Fargate", "Enable transit encryption for the EFS volume.", [AWS_SEC]),
|
|
516
|
-
WAW033: meta("WAW033", M, G, "Solr heap exceeds Fargate task memory", "Lower SOLR_HEAP or raise task memory."),
|
|
517
|
-
WAW034: meta("WAW034", R, G, "Fargate Solr task under-provisioned", "Allocate >= 2048MB for the Solr task."),
|
|
518
|
-
WAW035: meta("WAW035", R, G, "Solr container missing nofile ulimit", "Set a nofile ulimit >= 65535."),
|
|
519
|
-
WAW036: meta("WAW036", M, G, "Non-ASCII characters in resource properties", "Remove non-ASCII characters rejected at changeset time."),
|
|
520
|
-
WAW037: meta("WAW037", M, G, "Null values in resource properties", "Fix the invalid AttrRef producing null property values."),
|
|
521
|
-
|
|
522
|
-
// ── Azure ARM (AZR) ────────────────────────────────────────────────
|
|
523
|
-
AZR010: meta("AZR010", R, G, "Redundant dependsOn", "Remove dependsOn already implied by reference()/resourceId()."),
|
|
524
|
-
AZR011: meta("AZR011", M, G, "Missing or invalid apiVersion", "Set a valid YYYY-MM-DD apiVersion on every resource."),
|
|
525
|
-
AZR012: meta("AZR012", R, G, "Deprecated API version", "Move to a current apiVersion."),
|
|
526
|
-
AZR013: meta("AZR013", M, G, "Resource missing location", "Add the required location property."),
|
|
527
|
-
AZR014: meta("AZR014", M, G, "Storage account allows public blob access", "Set allowBlobPublicAccess to false.", [AZ_SEC]),
|
|
528
|
-
AZR015: meta("AZR015", M, G, "Storage account missing encryption", "Enable encryption services for data at rest.", [AZ_SEC]),
|
|
529
|
-
AZR016: meta("AZR016", R, G, "Key Vault soft-delete not enabled", "Enable soft-delete."),
|
|
530
|
-
AZR017: meta("AZR017", R, G, "Key Vault purge protection not enabled", "Enable purge protection."),
|
|
531
|
-
AZR018: meta("AZR018", R, G, "SQL Server missing auditing", "Enable auditing for compliance and threat detection."),
|
|
532
|
-
AZR019: meta("AZR019", M, G, "SQL database missing TDE", "Enable Transparent Data Encryption.", [AZ_SEC]),
|
|
533
|
-
AZR020: meta("AZR020", R, G, "App Service missing managed identity", "Enable a system- or user-assigned identity."),
|
|
534
|
-
AZR021: meta("AZR021", M, G, "App Service not HTTPS-only", "Set httpsOnly to true.", [AZ_SEC]),
|
|
535
|
-
AZR022: meta("AZR022", M, G, "App Service min TLS below 1.2", "Set minTlsVersion to 1.2+.", [AZ_SEC]),
|
|
536
|
-
AZR023: meta("AZR023", R, G, "VM not using a managed disk", "Use a managed disk."),
|
|
537
|
-
AZR024: meta("AZR024", R, G, "VM missing boot diagnostics", "Enable boot diagnostics."),
|
|
538
|
-
AZR025: meta("AZR025", R, G, "AKS cluster missing RBAC", "Enable Kubernetes RBAC."),
|
|
539
|
-
AZR026: meta("AZR026", R, G, "AKS cluster missing network policy", "Configure a networkPolicy."),
|
|
540
|
-
AZR027: meta("AZR027", M, G, "Container Registry admin user enabled", "Disable the admin user; use Azure AD / service principals.", [AZ_SEC]),
|
|
541
|
-
AZR028: meta("AZR028", R, G, "Network interface missing NSG", "Associate an NSG to control traffic."),
|
|
542
|
-
AZR029: meta("AZR029", M, G, "Managed disk missing encryption", "Enable encryption for data at rest.", [AZ_SEC]),
|
|
142
|
+
};
|
|
543
143
|
|
|
544
|
-
|
|
545
|
-
|
|
546
|
-
|
|
547
|
-
|
|
548
|
-
|
|
549
|
-
|
|
550
|
-
|
|
551
|
-
|
|
552
|
-
|
|
553
|
-
|
|
554
|
-
|
|
555
|
-
|
|
556
|
-
|
|
557
|
-
|
|
558
|
-
|
|
559
|
-
|
|
560
|
-
|
|
561
|
-
|
|
562
|
-
|
|
563
|
-
WGC302: meta("WGC302", R, G, "No Service (enabled APIs) found", "Declare the GCP APIs you depend on."),
|
|
564
|
-
WGC303: meta("WGC303", R, G, "No VPC Service Controls perimeter", "Consider an AccessContextManager ServicePerimeter."),
|
|
565
|
-
WGC401: meta("WGC401", M, G, "Unknown field in resource spec", "Remove the unknown spec field."),
|
|
566
|
-
WGC402: meta("WGC402", M, G, "Missing required spec field", "Add the required spec field."),
|
|
567
|
-
WGC403: meta("WGC403", M, G, "Spec field has wrong type/structure", "Fix the field's type/structure."),
|
|
144
|
+
/**
|
|
145
|
+
* Build one catalog entry — the lexicon-facing constructor for
|
|
146
|
+
* `LexiconPlugin.auditCatalog()` (#687), so a lexicon can declare its own rules'
|
|
147
|
+
* metadata next to the rules. Unlike the internal `meta()` it takes `category`
|
|
148
|
+
* explicitly (a lexicon owns its rules' categories) rather than reading core's
|
|
149
|
+
* curated `RULE_CATEGORY` map: an authority citation still forces `security`,
|
|
150
|
+
* otherwise the passed `category` (default `best-practice`) applies.
|
|
151
|
+
*/
|
|
152
|
+
export function auditRule(
|
|
153
|
+
id: string,
|
|
154
|
+
tier: Tier,
|
|
155
|
+
fixKind: FixKind,
|
|
156
|
+
title: string,
|
|
157
|
+
remediation: string,
|
|
158
|
+
opts?: { authority?: Authority[]; category?: Category },
|
|
159
|
+
): RuleMeta {
|
|
160
|
+
const category: Category = opts?.authority && opts.authority.length > 0 ? "security" : (opts?.category ?? "best-practice");
|
|
161
|
+
return { id, tier, fixKind, category, title, remediation, authority: opts?.authority, yamlBased: true };
|
|
162
|
+
}
|
|
568
163
|
|
|
569
|
-
|
|
570
|
-
|
|
571
|
-
|
|
572
|
-
|
|
573
|
-
|
|
574
|
-
|
|
575
|
-
|
|
576
|
-
|
|
577
|
-
|
|
578
|
-
|
|
579
|
-
|
|
580
|
-
|
|
581
|
-
|
|
582
|
-
|
|
583
|
-
|
|
584
|
-
|
|
585
|
-
|
|
586
|
-
|
|
587
|
-
|
|
588
|
-
|
|
589
|
-
|
|
590
|
-
|
|
591
|
-
}
|
|
164
|
+
/**
|
|
165
|
+
* Resolve the effective audit catalog for a set of lexicons: core's static
|
|
166
|
+
* `RULE_CATALOG` with each active lexicon's contributed `auditCatalog()` merged
|
|
167
|
+
* on top (a lexicon's own entry wins for its ids). This is the aggregation seam
|
|
168
|
+
* (#687, epic #350) that lets per-provider metadata move out of core into the
|
|
169
|
+
* lexicon that owns the rules, while the auditor — which already loads those
|
|
170
|
+
* lexicons to run the rules — reads one merged catalog. Tolerant: a lexicon
|
|
171
|
+
* that can't be loaded or contributes no catalog is skipped.
|
|
172
|
+
*/
|
|
173
|
+
export async function resolveAuditCatalog(lexicons: string[]): Promise<Record<string, RuleMeta>> {
|
|
174
|
+
const catalog: Record<string, RuleMeta> = { ...RULE_CATALOG };
|
|
175
|
+
// Forgejo workflows are GitHub-dialect: `audit/core.ts` runs github's checks
|
|
176
|
+
// against them, so their GHA* findings need github's catalog too (#687).
|
|
177
|
+
const needed =
|
|
178
|
+
lexicons.includes("forgejo") && !lexicons.includes("github") ? [...lexicons, "github"] : lexicons;
|
|
179
|
+
if (needed.length === 0) return catalog;
|
|
180
|
+
// Lazy import so importing this module doesn't pull in the plugin/config graph
|
|
181
|
+
// (matches ./core.ts's `load` — see #408).
|
|
182
|
+
const { loadPlugins } = await import("../cli/plugins");
|
|
183
|
+
let plugins: Array<{ auditCatalog?(): Record<string, RuleMeta> }>;
|
|
184
|
+
try {
|
|
185
|
+
plugins = await loadPlugins(needed);
|
|
186
|
+
} catch {
|
|
187
|
+
return catalog; // a lexicon package isn't installed — fall back to the static core catalog.
|
|
188
|
+
}
|
|
189
|
+
for (const plugin of plugins) {
|
|
190
|
+
const contributed = plugin?.auditCatalog?.();
|
|
191
|
+
if (contributed) Object.assign(catalog, contributed);
|
|
192
|
+
}
|
|
193
|
+
return catalog;
|
|
194
|
+
}
|
|
592
195
|
|
|
593
196
|
/** Look up catalog metadata for a check id, if known. */
|
|
594
197
|
export function ruleMeta(id: string): RuleMeta | undefined {
|