@intentius/chant 0.6.0 → 0.8.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/attrref.d.ts +35 -0
- package/dist/attrref.d.ts.map +1 -0
- package/dist/audit/catalog.d.ts +65 -0
- package/dist/audit/catalog.d.ts.map +1 -0
- package/dist/audit/core.d.ts +76 -0
- package/dist/audit/core.d.ts.map +1 -0
- package/dist/audit/discover.d.ts +76 -0
- package/dist/audit/discover.d.ts.map +1 -0
- package/dist/audit/fetch.d.ts +90 -0
- package/dist/audit/fetch.d.ts.map +1 -0
- package/dist/audit/proof.d.ts +53 -0
- package/dist/audit/proof.d.ts.map +1 -0
- package/dist/audit/report-html.d.ts +32 -0
- package/dist/audit/report-html.d.ts.map +1 -0
- package/dist/audit/report-model.d.ts +119 -0
- package/dist/audit/report-model.d.ts.map +1 -0
- package/dist/audit/report.d.ts +31 -0
- package/dist/audit/report.d.ts.map +1 -0
- package/dist/audit/rules-doc.d.ts +11 -0
- package/dist/audit/rules-doc.d.ts.map +1 -0
- package/dist/build.d.ts +120 -0
- package/dist/build.d.ts.map +1 -0
- package/dist/builder.d.ts +56 -0
- package/dist/builder.d.ts.map +1 -0
- package/dist/child-project.d.ts +34 -0
- package/dist/child-project.d.ts.map +1 -0
- package/dist/cli/commands/audit.d.ts +60 -0
- package/dist/cli/commands/audit.d.ts.map +1 -0
- package/dist/cli/commands/build.d.ts +70 -0
- package/dist/cli/commands/build.d.ts.map +1 -0
- package/dist/cli/commands/check-lexicon.d.ts +19 -0
- package/dist/cli/commands/check-lexicon.d.ts.map +1 -0
- package/dist/cli/commands/describe.d.ts +39 -0
- package/dist/cli/commands/describe.d.ts.map +1 -0
- package/dist/cli/commands/diff.d.ts +32 -0
- package/dist/cli/commands/diff.d.ts.map +1 -0
- package/dist/cli/commands/doctor.d.ts +11 -0
- package/dist/cli/commands/doctor.d.ts.map +1 -0
- package/dist/cli/commands/import.d.ts +68 -0
- package/dist/cli/commands/import.d.ts.map +1 -0
- package/dist/cli/commands/init-lexicon/templates/codegen.d.ts +9 -0
- package/dist/cli/commands/init-lexicon/templates/codegen.d.ts.map +1 -0
- package/dist/cli/commands/init-lexicon/templates/docs.d.ts +9 -0
- package/dist/cli/commands/init-lexicon/templates/docs.d.ts.map +1 -0
- package/dist/cli/commands/init-lexicon/templates/examples.d.ts +8 -0
- package/dist/cli/commands/init-lexicon/templates/examples.d.ts.map +1 -0
- package/dist/cli/commands/init-lexicon/templates/lint.d.ts +8 -0
- package/dist/cli/commands/init-lexicon/templates/lint.d.ts.map +1 -0
- package/dist/cli/commands/init-lexicon/templates/lsp.d.ts +6 -0
- package/dist/cli/commands/init-lexicon/templates/lsp.d.ts.map +1 -0
- package/dist/cli/commands/init-lexicon/templates/plugin.d.ts +12 -0
- package/dist/cli/commands/init-lexicon/templates/plugin.d.ts.map +1 -0
- package/dist/cli/commands/init-lexicon/templates/project.d.ts +19 -0
- package/dist/cli/commands/init-lexicon/templates/project.d.ts.map +1 -0
- package/dist/cli/commands/init-lexicon/templates/spec.d.ts +6 -0
- package/dist/cli/commands/init-lexicon/templates/spec.d.ts.map +1 -0
- package/dist/cli/commands/init-lexicon/templates/tests.d.ts +12 -0
- package/dist/cli/commands/init-lexicon/templates/tests.d.ts.map +1 -0
- package/dist/cli/commands/init-lexicon.d.ts +37 -0
- package/dist/cli/commands/init-lexicon.d.ts.map +1 -0
- package/dist/cli/commands/init.d.ts +48 -0
- package/dist/cli/commands/init.d.ts.map +1 -0
- package/dist/cli/commands/licenses.d.ts +23 -0
- package/dist/cli/commands/licenses.d.ts.map +1 -0
- package/dist/cli/commands/lint.d.ts +52 -0
- package/dist/cli/commands/lint.d.ts.map +1 -0
- package/dist/cli/commands/list.d.ts +38 -0
- package/dist/cli/commands/list.d.ts.map +1 -0
- package/dist/cli/commands/migrate.d.ts +51 -0
- package/dist/cli/commands/migrate.d.ts.map +1 -0
- package/dist/cli/commands/onboard.d.ts +19 -0
- package/dist/cli/commands/onboard.d.ts.map +1 -0
- package/dist/cli/commands/update.d.ts +29 -0
- package/dist/cli/commands/update.d.ts.map +1 -0
- package/dist/cli/commands/vendor.d.ts +84 -0
- package/dist/cli/commands/vendor.d.ts.map +1 -0
- package/dist/cli/conflict-check.d.ts +18 -0
- package/dist/cli/conflict-check.d.ts.map +1 -0
- package/dist/cli/debug.d.ts +5 -0
- package/dist/cli/debug.d.ts.map +1 -0
- package/dist/cli/format.d.ts +36 -0
- package/dist/cli/format.d.ts.map +1 -0
- package/dist/cli/handlers/build.d.ts +3 -0
- package/dist/cli/handlers/build.d.ts.map +1 -0
- package/dist/cli/handlers/dev.d.ts +7 -0
- package/dist/cli/handlers/dev.d.ts.map +1 -0
- package/dist/cli/handlers/graph.d.ts +8 -0
- package/dist/cli/handlers/graph.d.ts.map +1 -0
- package/dist/cli/handlers/init.d.ts +4 -0
- package/dist/cli/handlers/init.d.ts.map +1 -0
- package/dist/cli/handlers/lifecycle.d.ts +39 -0
- package/dist/cli/handlers/lifecycle.d.ts.map +1 -0
- package/dist/cli/handlers/lint.d.ts +3 -0
- package/dist/cli/handlers/lint.d.ts.map +1 -0
- package/dist/cli/handlers/migrate.d.ts +3 -0
- package/dist/cli/handlers/migrate.d.ts.map +1 -0
- package/dist/cli/handlers/misc.d.ts +8 -0
- package/dist/cli/handlers/misc.d.ts.map +1 -0
- package/dist/cli/handlers/run-client.d.ts +107 -0
- package/dist/cli/handlers/run-client.d.ts.map +1 -0
- package/dist/cli/handlers/run-report.d.ts +5 -0
- package/dist/cli/handlers/run-report.d.ts.map +1 -0
- package/dist/cli/handlers/run.d.ts +27 -0
- package/dist/cli/handlers/run.d.ts.map +1 -0
- package/dist/cli/handlers/serve.d.ts +5 -0
- package/dist/cli/handlers/serve.d.ts.map +1 -0
- package/dist/cli/handlers/vendor.d.ts +9 -0
- package/dist/cli/handlers/vendor.d.ts.map +1 -0
- package/dist/cli/index.d.ts +4 -0
- package/dist/cli/index.d.ts.map +1 -0
- package/dist/cli/lsp/capabilities.d.ts +21 -0
- package/dist/cli/lsp/capabilities.d.ts.map +1 -0
- package/dist/cli/lsp/diagnostics.d.ts +30 -0
- package/dist/cli/lsp/diagnostics.d.ts.map +1 -0
- package/dist/cli/lsp/server.d.ts +106 -0
- package/dist/cli/lsp/server.d.ts.map +1 -0
- package/dist/cli/main.d.ts +7 -0
- package/dist/cli/main.d.ts.map +1 -0
- package/dist/cli/mcp/lifecycle-tools.d.ts +15 -0
- package/dist/cli/mcp/lifecycle-tools.d.ts.map +1 -0
- package/dist/cli/mcp/op-tools.d.ts +7 -0
- package/dist/cli/mcp/op-tools.d.ts.map +1 -0
- package/dist/cli/mcp/resource-handlers.d.ts +28 -0
- package/dist/cli/mcp/resource-handlers.d.ts.map +1 -0
- package/dist/cli/mcp/resources/context.d.ts +6 -0
- package/dist/cli/mcp/resources/context.d.ts.map +1 -0
- package/dist/cli/mcp/server.d.ts +44 -0
- package/dist/cli/mcp/server.d.ts.map +1 -0
- package/dist/cli/mcp/tools/build.d.ts +31 -0
- package/dist/cli/mcp/tools/build.d.ts.map +1 -0
- package/dist/cli/mcp/tools/explain.d.ts +27 -0
- package/dist/cli/mcp/tools/explain.d.ts.map +1 -0
- package/dist/cli/mcp/tools/import.d.ts +26 -0
- package/dist/cli/mcp/tools/import.d.ts.map +1 -0
- package/dist/cli/mcp/tools/lint.d.ts +26 -0
- package/dist/cli/mcp/tools/lint.d.ts.map +1 -0
- package/dist/cli/mcp/tools/scaffold.d.ts +31 -0
- package/dist/cli/mcp/tools/scaffold.d.ts.map +1 -0
- package/dist/cli/mcp/tools/search.d.ts +31 -0
- package/dist/cli/mcp/tools/search.d.ts.map +1 -0
- package/dist/cli/mcp/types.d.ts +42 -0
- package/dist/cli/mcp/types.d.ts.map +1 -0
- package/dist/cli/plugins.d.ts +21 -0
- package/dist/cli/plugins.d.ts.map +1 -0
- package/dist/cli/registry.d.ts +100 -0
- package/dist/cli/registry.d.ts.map +1 -0
- package/dist/cli/reporters/stylish.d.ts +26 -0
- package/dist/cli/reporters/stylish.d.ts.map +1 -0
- package/dist/cli/watch.d.ts +29 -0
- package/dist/cli/watch.d.ts.map +1 -0
- package/dist/codegen/bound-property-types.d.ts +38 -0
- package/dist/codegen/bound-property-types.d.ts.map +1 -0
- package/dist/codegen/coverage.d.ts +57 -0
- package/dist/codegen/coverage.d.ts.map +1 -0
- package/dist/codegen/docs-file-markers.d.ts +16 -0
- package/dist/codegen/docs-file-markers.d.ts.map +1 -0
- package/dist/codegen/docs-rule-scanning.d.ts +14 -0
- package/dist/codegen/docs-rule-scanning.d.ts.map +1 -0
- package/dist/codegen/docs-rules.d.ts +17 -0
- package/dist/codegen/docs-rules.d.ts.map +1 -0
- package/dist/codegen/docs-sections.d.ts +11 -0
- package/dist/codegen/docs-sections.d.ts.map +1 -0
- package/dist/codegen/docs-sidebar.d.ts +6 -0
- package/dist/codegen/docs-sidebar.d.ts.map +1 -0
- package/dist/codegen/docs-types.d.ts +84 -0
- package/dist/codegen/docs-types.d.ts.map +1 -0
- package/dist/codegen/docs.d.ts +28 -0
- package/dist/codegen/docs.d.ts.map +1 -0
- package/dist/codegen/fetch.d.ts +76 -0
- package/dist/codegen/fetch.d.ts.map +1 -0
- package/dist/codegen/generate-post-synth-barrel.d.ts +32 -0
- package/dist/codegen/generate-post-synth-barrel.d.ts.map +1 -0
- package/dist/codegen/generate-registry.d.ts +40 -0
- package/dist/codegen/generate-registry.d.ts.map +1 -0
- package/dist/codegen/generate-runtime-index.d.ts +40 -0
- package/dist/codegen/generate-runtime-index.d.ts.map +1 -0
- package/dist/codegen/generate-typescript.d.ts +48 -0
- package/dist/codegen/generate-typescript.d.ts.map +1 -0
- package/dist/codegen/generate.d.ts +92 -0
- package/dist/codegen/generate.d.ts.map +1 -0
- package/dist/codegen/json-patch.d.ts +12 -0
- package/dist/codegen/json-patch.d.ts.map +1 -0
- package/dist/codegen/json-schema.d.ts +82 -0
- package/dist/codegen/json-schema.d.ts.map +1 -0
- package/dist/codegen/naming.d.ts +64 -0
- package/dist/codegen/naming.d.ts.map +1 -0
- package/dist/codegen/package.d.ts +64 -0
- package/dist/codegen/package.d.ts.map +1 -0
- package/dist/codegen/topo-sort.d.ts +13 -0
- package/dist/codegen/topo-sort.d.ts.map +1 -0
- package/dist/codegen/typecheck.d.ts +10 -0
- package/dist/codegen/typecheck.d.ts.map +1 -0
- package/dist/codegen/validate.d.ts +45 -0
- package/dist/codegen/validate.d.ts.map +1 -0
- package/dist/composite.d.ts +116 -0
- package/dist/composite.d.ts.map +1 -0
- package/dist/config.d.ts +78 -0
- package/dist/config.d.ts.map +1 -0
- package/dist/declarable.d.ts +34 -0
- package/dist/declarable.d.ts.map +1 -0
- package/dist/detectLexicon.d.ts +10 -0
- package/dist/detectLexicon.d.ts.map +1 -0
- package/dist/discovery/cache.d.ts +36 -0
- package/dist/discovery/cache.d.ts.map +1 -0
- package/dist/discovery/collect.d.ts +17 -0
- package/dist/discovery/collect.d.ts.map +1 -0
- package/dist/discovery/cycles.d.ts +23 -0
- package/dist/discovery/cycles.d.ts.map +1 -0
- package/dist/discovery/files.d.ts +7 -0
- package/dist/discovery/files.d.ts.map +1 -0
- package/dist/discovery/graph.d.ts +8 -0
- package/dist/discovery/graph.d.ts.map +1 -0
- package/dist/discovery/import.d.ts +9 -0
- package/dist/discovery/import.d.ts.map +1 -0
- package/dist/discovery/index.d.ts +25 -0
- package/dist/discovery/index.d.ts.map +1 -0
- package/dist/discovery/resolve.d.ts +10 -0
- package/dist/discovery/resolve.d.ts.map +1 -0
- package/dist/errors.d.ts +49 -0
- package/dist/errors.d.ts.map +1 -0
- package/dist/import/base-parser.d.ts +19 -0
- package/dist/import/base-parser.d.ts.map +1 -0
- package/dist/import/generator.d.ts +20 -0
- package/dist/import/generator.d.ts.map +1 -0
- package/dist/import/ir-utils.d.ts +25 -0
- package/dist/import/ir-utils.d.ts.map +1 -0
- package/dist/import/parser.d.ts +39 -0
- package/dist/import/parser.d.ts.map +1 -0
- package/dist/index.d.ts +66 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/intrinsic-interpolation.d.ts +24 -0
- package/dist/intrinsic-interpolation.d.ts.map +1 -0
- package/dist/intrinsic.d.ts +24 -0
- package/dist/intrinsic.d.ts.map +1 -0
- package/dist/lexicon-integrity.d.ts +25 -0
- package/dist/lexicon-integrity.d.ts.map +1 -0
- package/dist/lexicon-manifest.d.ts +9 -0
- package/dist/lexicon-manifest.d.ts.map +1 -0
- package/dist/lexicon-output.d.ts +66 -0
- package/dist/lexicon-output.d.ts.map +1 -0
- package/dist/lexicon-plugin-helpers.d.ts +59 -0
- package/dist/lexicon-plugin-helpers.d.ts.map +1 -0
- package/dist/lexicon-schema.d.ts +82 -0
- package/dist/lexicon-schema.d.ts.map +1 -0
- package/dist/lexicon.d.ts +383 -0
- package/dist/lexicon.d.ts.map +1 -0
- package/dist/lifecycle/affected.d.ts +57 -0
- package/dist/lifecycle/affected.d.ts.map +1 -0
- package/dist/lifecycle/change-set.d.ts +90 -0
- package/dist/lifecycle/change-set.d.ts.map +1 -0
- package/dist/lifecycle/digest.d.ts +21 -0
- package/dist/lifecycle/digest.d.ts.map +1 -0
- package/dist/lifecycle/git.d.ts +72 -0
- package/dist/lifecycle/git.d.ts.map +1 -0
- package/dist/lifecycle/index.d.ts +8 -0
- package/dist/lifecycle/index.d.ts.map +1 -0
- package/dist/lifecycle/live-diff.d.ts +67 -0
- package/dist/lifecycle/live-diff.d.ts.map +1 -0
- package/dist/lifecycle/snapshot.d.ts +20 -0
- package/dist/lifecycle/snapshot.d.ts.map +1 -0
- package/dist/lifecycle/types.d.ts +61 -0
- package/dist/lifecycle/types.d.ts.map +1 -0
- package/dist/lint/config.d.ts +100 -0
- package/dist/lint/config.d.ts.map +1 -0
- package/dist/lint/declarative.d.ts +56 -0
- package/dist/lint/declarative.d.ts.map +1 -0
- package/dist/lint/discover.d.ts +35 -0
- package/dist/lint/discover.d.ts.map +1 -0
- package/dist/lint/engine.d.ts +21 -0
- package/dist/lint/engine.d.ts.map +1 -0
- package/dist/lint/named-checks.d.ts +19 -0
- package/dist/lint/named-checks.d.ts.map +1 -0
- package/dist/lint/parser.d.ts +9 -0
- package/dist/lint/parser.d.ts.map +1 -0
- package/dist/lint/policy.d.ts +22 -0
- package/dist/lint/policy.d.ts.map +1 -0
- package/dist/lint/post-synth.d.ts +69 -0
- package/dist/lint/post-synth.d.ts.map +1 -0
- package/dist/lint/presets/strict.json +19 -0
- package/dist/lint/rule-loader.d.ts +16 -0
- package/dist/lint/rule-loader.d.ts.map +1 -0
- package/dist/lint/rule-registry.d.ts +37 -0
- package/dist/lint/rule-registry.d.ts.map +1 -0
- package/dist/lint/rule.d.ts +82 -0
- package/dist/lint/rule.d.ts.map +1 -0
- package/dist/lint/rules/composite-scope.d.ts +18 -0
- package/dist/lint/rules/composite-scope.d.ts.map +1 -0
- package/dist/lint/rules/cor017-composite-name-match.d.ts +3 -0
- package/dist/lint/rules/cor017-composite-name-match.d.ts.map +1 -0
- package/dist/lint/rules/cor018-composite-prefer-lexicon-type.d.ts +3 -0
- package/dist/lint/rules/cor018-composite-prefer-lexicon-type.d.ts.map +1 -0
- package/dist/lint/rules/declarable-naming-convention.d.ts +3 -0
- package/dist/lint/rules/declarable-naming-convention.d.ts.map +1 -0
- package/dist/lint/rules/evl001-non-literal-expression.d.ts +3 -0
- package/dist/lint/rules/evl001-non-literal-expression.d.ts.map +1 -0
- package/dist/lint/rules/evl002-control-flow-resource.d.ts +3 -0
- package/dist/lint/rules/evl002-control-flow-resource.d.ts.map +1 -0
- package/dist/lint/rules/evl003-dynamic-property-access.d.ts +3 -0
- package/dist/lint/rules/evl003-dynamic-property-access.d.ts.map +1 -0
- package/dist/lint/rules/evl004-spread-non-const.d.ts +3 -0
- package/dist/lint/rules/evl004-spread-non-const.d.ts.map +1 -0
- package/dist/lint/rules/evl005-resource-block-body.d.ts +3 -0
- package/dist/lint/rules/evl005-resource-block-body.d.ts.map +1 -0
- package/dist/lint/rules/evl007-invalid-siblings.d.ts +3 -0
- package/dist/lint/rules/evl007-invalid-siblings.d.ts.map +1 -0
- package/dist/lint/rules/evl009-composite-no-constant.d.ts +3 -0
- package/dist/lint/rules/evl009-composite-no-constant.d.ts.map +1 -0
- package/dist/lint/rules/evl010-composite-no-transform.d.ts +3 -0
- package/dist/lint/rules/evl010-composite-no-transform.d.ts.map +1 -0
- package/dist/lint/rules/export-required.d.ts +3 -0
- package/dist/lint/rules/export-required.d.ts.map +1 -0
- package/dist/lint/rules/file-declarable-limit.d.ts +3 -0
- package/dist/lint/rules/file-declarable-limit.d.ts.map +1 -0
- package/dist/lint/rules/flat-declarations.d.ts +3 -0
- package/dist/lint/rules/flat-declarations.d.ts.map +1 -0
- package/dist/lint/rules/index.d.ts +31 -0
- package/dist/lint/rules/index.d.ts.map +1 -0
- package/dist/lint/rules/no-cyclic-declarable-ref.d.ts +3 -0
- package/dist/lint/rules/no-cyclic-declarable-ref.d.ts.map +1 -0
- package/dist/lint/rules/no-redundant-type-import.d.ts +10 -0
- package/dist/lint/rules/no-redundant-type-import.d.ts.map +1 -0
- package/dist/lint/rules/no-redundant-value-cast.d.ts +3 -0
- package/dist/lint/rules/no-redundant-value-cast.d.ts.map +1 -0
- package/dist/lint/rules/no-string-ref.d.ts +3 -0
- package/dist/lint/rules/no-string-ref.d.ts.map +1 -0
- package/dist/lint/rules/no-unused-declarable-import.d.ts +3 -0
- package/dist/lint/rules/no-unused-declarable-import.d.ts.map +1 -0
- package/dist/lint/rules/no-unused-declarable.d.ts +3 -0
- package/dist/lint/rules/no-unused-declarable.d.ts.map +1 -0
- package/dist/lint/rules/single-concern-file.d.ts +3 -0
- package/dist/lint/rules/single-concern-file.d.ts.map +1 -0
- package/dist/lint/selectors.d.ts +21 -0
- package/dist/lint/selectors.d.ts.map +1 -0
- package/dist/lsp/lexicon-providers.d.ts +61 -0
- package/dist/lsp/lexicon-providers.d.ts.map +1 -0
- package/dist/lsp/types.d.ts +64 -0
- package/dist/lsp/types.d.ts.map +1 -0
- package/dist/mcp/types.d.ts +21 -0
- package/dist/mcp/types.d.ts.map +1 -0
- package/dist/op/activity-registry.d.ts +57 -0
- package/dist/op/activity-registry.d.ts.map +1 -0
- package/dist/op/builders.d.ts +69 -0
- package/dist/op/builders.d.ts.map +1 -0
- package/dist/op/discover.d.ts +16 -0
- package/dist/op/discover.d.ts.map +1 -0
- package/dist/op/index.d.ts +11 -0
- package/dist/op/index.d.ts.map +1 -0
- package/dist/op/local-executor.d.ts +54 -0
- package/dist/op/local-executor.d.ts.map +1 -0
- package/dist/op/local-output.d.ts +16 -0
- package/dist/op/local-output.d.ts.map +1 -0
- package/dist/op/resource.d.ts +7 -0
- package/dist/op/resource.d.ts.map +1 -0
- package/dist/op/types.d.ts +71 -0
- package/dist/op/types.d.ts.map +1 -0
- package/dist/ownership.d.ts +75 -0
- package/dist/ownership.d.ts.map +1 -0
- package/dist/project-validation.d.ts +28 -0
- package/dist/project-validation.d.ts.map +1 -0
- package/dist/provenance.d.ts +26 -0
- package/dist/provenance.d.ts.map +1 -0
- package/dist/pseudo-parameter.d.ts +32 -0
- package/dist/pseudo-parameter.d.ts.map +1 -0
- package/dist/resource-attributes.d.ts +17 -0
- package/dist/resource-attributes.d.ts.map +1 -0
- package/dist/runtime-adapter.d.ts +41 -0
- package/dist/runtime-adapter.d.ts.map +1 -0
- package/dist/runtime.d.ts +23 -0
- package/dist/runtime.d.ts.map +1 -0
- package/dist/serializer-walker.d.ts +21 -0
- package/dist/serializer-walker.d.ts.map +1 -0
- package/dist/serializer.d.ts +64 -0
- package/dist/serializer.d.ts.map +1 -0
- package/dist/sort.d.ts +8 -0
- package/dist/sort.d.ts.map +1 -0
- package/dist/stack-output.d.ts +52 -0
- package/dist/stack-output.d.ts.map +1 -0
- package/dist/toml-emit.d.ts +22 -0
- package/dist/toml-emit.d.ts.map +1 -0
- package/dist/toml-parse.d.ts +14 -0
- package/dist/toml-parse.d.ts.map +1 -0
- package/dist/toml-utils.d.ts +20 -0
- package/dist/toml-utils.d.ts.map +1 -0
- package/dist/toml.d.ts +9 -0
- package/dist/toml.d.ts.map +1 -0
- package/dist/types.d.ts +47 -0
- package/dist/types.d.ts.map +1 -0
- package/dist/utils.d.ts +30 -0
- package/dist/utils.d.ts.map +1 -0
- package/dist/validation.d.ts +42 -0
- package/dist/validation.d.ts.map +1 -0
- package/dist/yaml.d.ts +42 -0
- package/dist/yaml.d.ts.map +1 -0
- package/package.json +31 -6
- package/src/audit/bundle-decoupling.test.ts +56 -0
- package/src/audit/catalog.test.ts +17 -2
- package/src/audit/catalog.ts +357 -4
- package/src/audit/core.test.ts +15 -0
- package/src/audit/core.ts +0 -0
- package/src/audit/detect-bundle.test.ts +35 -0
- package/src/audit/discover.test.ts +72 -0
- package/src/audit/discover.ts +329 -0
- package/src/audit/edge-init-safety.test.ts +43 -0
- package/src/audit/fetch.test.ts +86 -55
- package/src/audit/fetch.ts +118 -87
- package/src/audit/remote-discovery.test.ts +80 -0
- package/src/audit/report-html.ts +14 -6
- package/src/audit/report-model.ts +13 -1
- package/src/audit/report.test.ts +3 -1
- package/src/audit/report.ts +13 -5
- package/src/audit/rules-doc.ts +4 -0
- package/src/cli/commands/__fixtures__/audit-aws/stack.yaml +11 -0
- package/src/cli/commands/__fixtures__/audit-aws/template.json +7 -0
- package/src/cli/commands/__fixtures__/audit-azure/azuredeploy.json +13 -0
- package/src/cli/commands/__fixtures__/audit-gcp/bucket.yaml +6 -0
- package/src/cli/commands/__fixtures__/audit-gcp/firewall.yaml +9 -0
- package/src/cli/commands/__fixtures__/audit-helm/mychart/Chart.yaml +3 -0
- package/src/cli/commands/__fixtures__/audit-helm/mychart/templates/deployment.yaml +12 -0
- package/src/cli/commands/__fixtures__/audit-helm/mychart/values.yaml +1 -0
- package/src/cli/commands/__fixtures__/audit-mixed/.github/workflows/ci.yml +5 -0
- package/src/cli/commands/__fixtures__/audit-mixed/Dockerfile +2 -0
- package/src/cli/commands/__fixtures__/audit-mixed/cfn/template.json +1 -0
- package/src/cli/commands/__fixtures__/audit-mixed/k8s/deploy.yaml +12 -0
- package/src/cli/commands/audit.test.ts +80 -14
- package/src/cli/commands/audit.ts +28 -126
- package/src/codegen/bound-property-types.test.ts +57 -0
- package/src/codegen/bound-property-types.ts +110 -0
- package/src/codegen/generate-post-synth-barrel.test.ts +37 -0
- package/src/codegen/generate-post-synth-barrel.ts +75 -0
- package/src/codegen/post-synth-barrel-guards.test.ts +63 -0
- package/src/codegen/validate.ts +13 -1
- package/src/lint/discover.ts +1 -1
- package/src/meta/peer-deps.test.ts +29 -0
package/src/audit/catalog.ts
CHANGED
|
@@ -9,9 +9,10 @@
|
|
|
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
|
-
* The catalog covers exactly the post-synth checks run by the audit
|
|
13
|
-
*
|
|
14
|
-
* sync with the lexicons
|
|
12
|
+
* The catalog covers exactly the post-synth checks run by the audit across all
|
|
13
|
+
* lexicons (CI: GHA/WGL/WFJ; IaC and manifests: WK8/WAW/AZR/WGC/WHM/DKRD/ARGO).
|
|
14
|
+
* A drift-guard test asserts it stays in sync with the lexicons, and that every
|
|
15
|
+
* entry has a `category`.
|
|
15
16
|
*/
|
|
16
17
|
|
|
17
18
|
export type Tier = "merge-worthy" | "report-only";
|
|
@@ -19,6 +20,15 @@ export type Tier = "merge-worthy" | "report-only";
|
|
|
19
20
|
/** deterministic = safe auto-fix/diff; guidance = report text only (needs judgment). */
|
|
20
21
|
export type FixKind = "deterministic" | "guidance";
|
|
21
22
|
|
|
23
|
+
/**
|
|
24
|
+
* What kind of finding this is — orthogonal to `tier` (fix confidence). Lets the
|
|
25
|
+
* report say "N security, M best-practice, K correctness" instead of branding
|
|
26
|
+
* everything "security." `security` = exposure/vuln/supply-chain; `correctness`
|
|
27
|
+
* = a structural bug (broken reference, invalid schema, never-runs); everything
|
|
28
|
+
* else is `best-practice` (hygiene/style/deprecation/reliability).
|
|
29
|
+
*/
|
|
30
|
+
export type Category = "security" | "correctness" | "best-practice";
|
|
31
|
+
|
|
22
32
|
export interface Authority {
|
|
23
33
|
name: string;
|
|
24
34
|
url: string;
|
|
@@ -28,6 +38,8 @@ export interface RuleMeta {
|
|
|
28
38
|
id: string;
|
|
29
39
|
tier: Tier;
|
|
30
40
|
fixKind: FixKind;
|
|
41
|
+
/** What kind of finding this is (security / correctness / best-practice). */
|
|
42
|
+
category: Category;
|
|
31
43
|
title: string;
|
|
32
44
|
/** External backing so a finding isn't just chant's opinion. */
|
|
33
45
|
authority?: Authority[];
|
|
@@ -86,6 +98,18 @@ const DOCKER_SEC: Authority = {
|
|
|
86
98
|
name: "Docker — Security best practices",
|
|
87
99
|
url: "https://docs.docker.com/develop/security-best-practices/",
|
|
88
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
|
+
};
|
|
89
113
|
|
|
90
114
|
function meta(
|
|
91
115
|
id: string,
|
|
@@ -95,7 +119,12 @@ function meta(
|
|
|
95
119
|
remediation: string,
|
|
96
120
|
authority?: Authority[],
|
|
97
121
|
): RuleMeta {
|
|
98
|
-
|
|
122
|
+
// An authority citation is the strongest security signal, so it wins. Otherwise
|
|
123
|
+
// the curated RULE_CATEGORY map (defined below, before RULE_CATALOG runs)
|
|
124
|
+
// decides correctness vs best-practice vs security-without-authority; the drift
|
|
125
|
+
// test guarantees every id is mapped, so the fallback is only a type belt.
|
|
126
|
+
const category: Category = authority && authority.length > 0 ? "security" : RULE_CATEGORY[id] ?? "best-practice";
|
|
127
|
+
return { id, tier, fixKind, category, title, remediation, authority, yamlBased: true };
|
|
99
128
|
}
|
|
100
129
|
|
|
101
130
|
const M = "merge-worthy" as const;
|
|
@@ -103,6 +132,229 @@ const R = "report-only" as const;
|
|
|
103
132
|
const D = "deterministic" as const;
|
|
104
133
|
const G = "guidance" as const;
|
|
105
134
|
|
|
135
|
+
/**
|
|
136
|
+
* Finding category per rule (#415). Curated: security rules are those that
|
|
137
|
+
* cite an authority or guard an exposure; correctness rules flag structural
|
|
138
|
+
* bugs (broken references, invalid schema, never-runs); the rest are
|
|
139
|
+
* best-practice. A drift test asserts this covers every catalogued rule.
|
|
140
|
+
*/
|
|
141
|
+
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
|
+
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
|
+
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
|
+
};
|
|
357
|
+
|
|
106
358
|
/** Every audited post-synth check, keyed by id. */
|
|
107
359
|
export const RULE_CATALOG: Record<string, RuleMeta> = {
|
|
108
360
|
// ── GitHub Actions (GHA) ───────────────────────────────────────────
|
|
@@ -235,6 +487,107 @@ export const RULE_CATALOG: Record<string, RuleMeta> = {
|
|
|
235
487
|
DKRD010: meta("DKRD010", R, G, "apt-get install without --no-install-recommends", "Add --no-install-recommends to keep images small."),
|
|
236
488
|
DKRD011: meta("DKRD011", R, G, "ADD used where COPY would do", "Prefer COPY unless fetching a URL or extracting an archive."),
|
|
237
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
|
+
COR020: meta("COR020", M, G, "Circular resource dependency", "Break the dependency cycle between resources."),
|
|
493
|
+
EXT001: meta("EXT001", M, G, "Extension constraint violation", "Fix the cross-property constraint flagged by the cfn-lint extension schema."),
|
|
494
|
+
WAW010: meta("WAW010", R, G, "Redundant DependsOn", "Remove DependsOn already implied by a Ref/GetAtt."),
|
|
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]),
|
|
543
|
+
|
|
544
|
+
// ── GCP Config Connector (WGC) ─────────────────────────────────────
|
|
545
|
+
WGC101: meta("WGC101", M, G, "Storage/SQL without encryption configuration", "Configure encryption (e.g. a CMEK key) for data at rest.", [GCP_SEC]),
|
|
546
|
+
WGC102: meta("WGC102", M, G, "Public IAM member (allUsers/allAuthenticatedUsers)", "Remove allUsers/allAuthenticatedUsers bindings.", [GCP_SEC]),
|
|
547
|
+
WGC103: meta("WGC103", R, G, "Missing project-id annotation", "Add the cnrm.cloud.google.com/project-id annotation."),
|
|
548
|
+
WGC104: meta("WGC104", M, G, "Bucket without uniform bucket-level access", "Enable uniformBucketLevelAccess.", [GCP_SEC]),
|
|
549
|
+
WGC105: meta("WGC105", M, G, "Cloud SQL open to 0.0.0.0/0", "Restrict authorizedNetworks to known sources.", [GCP_SEC]),
|
|
550
|
+
WGC106: meta("WGC106", R, G, "Missing deletion-policy annotation", "Add the cnrm.cloud.google.com/deletion-policy annotation."),
|
|
551
|
+
WGC107: meta("WGC107", R, G, "Bucket versioning disabled", "Enable object versioning."),
|
|
552
|
+
WGC108: meta("WGC108", R, G, "Cloud SQL backups disabled", "Enable backup configuration."),
|
|
553
|
+
WGC109: meta("WGC109", M, G, "Firewall open to 0.0.0.0/0", "Restrict sourceRanges to known sources.", [GCP_SEC]),
|
|
554
|
+
WGC110: meta("WGC110", M, G, "KMS key without rotation", "Set a rotationPeriod on the CryptoKey.", [GCP_SEC]),
|
|
555
|
+
WGC111: meta("WGC111", M, G, "Reference to an undefined resource", "Point the reference at a resource in the output."),
|
|
556
|
+
WGC112: meta("WGC112", M, G, "Missing or invalid apiVersion", "Set a valid cnrm.cloud.google.com apiVersion."),
|
|
557
|
+
WGC113: meta("WGC113", R, G, "Alpha API version", "Move to a beta/GA API version."),
|
|
558
|
+
WGC201: meta("WGC201", R, G, "Missing managed-by label", "Add the app.kubernetes.io/managed-by label."),
|
|
559
|
+
WGC202: meta("WGC202", M, G, "Cluster without Workload Identity", "Enable Workload Identity on the ContainerCluster.", [GCP_SEC]),
|
|
560
|
+
WGC203: meta("WGC203", M, G, "Node pool uses broad cloud-platform scope", "Use narrowly-scoped OAuth scopes instead of cloud-platform.", [GCP_SEC]),
|
|
561
|
+
WGC204: meta("WGC204", R, G, "Compute instance without Shielded VM", "Enable Shielded VM configuration."),
|
|
562
|
+
WGC301: meta("WGC301", R, G, "No IAMAuditConfig found", "Configure audit logging via IAMAuditConfig."),
|
|
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."),
|
|
568
|
+
|
|
569
|
+
// ── Helm (WHM) ─────────────────────────────────────────────────────
|
|
570
|
+
WHM005: meta("WHM005", R, G, "Sub-chart wrapper with no templates", "Deploy the upstream chart directly instead of an empty wrapper."),
|
|
571
|
+
WHM101: meta("WHM101", M, G, "Chart.yaml missing required fields", "Set apiVersion (v2), name, and version in Chart.yaml."),
|
|
572
|
+
WHM102: meta("WHM102", R, G, "Missing values.schema.json", "Add a values.schema.json to validate values."),
|
|
573
|
+
WHM103: meta("WHM103", M, G, "Invalid Go template syntax", "Fix the unbalanced template braces."),
|
|
574
|
+
WHM104: meta("WHM104", R, G, "Missing NOTES.txt", "Add templates/NOTES.txt for application charts."),
|
|
575
|
+
WHM105: meta("WHM105", R, G, "Missing _helpers.tpl", "Add templates/_helpers.tpl."),
|
|
576
|
+
WHM201: meta("WHM201", R, G, "Missing standard Helm labels", "Add the recommended app.kubernetes.io labels."),
|
|
577
|
+
WHM202: meta("WHM202", R, G, "Hook weights undefined", "Define hook weights when multiple hooks exist."),
|
|
578
|
+
WHM203: meta("WHM203", R, G, "Undocumented values", "Document values via schema or comments."),
|
|
579
|
+
WHM204: meta("WHM204", R, G, "Dependencies pinned, not ranged", "Use semver ranges for chart dependencies."),
|
|
580
|
+
WHM301: meta("WHM301", R, G, "No Helm test", "Add at least one Helm test for application charts."),
|
|
581
|
+
WHM302: meta("WHM302", R, G, "Container resources not set", "Set limits/requests via values or defaults."),
|
|
582
|
+
WHM401: meta("WHM401", M, G, "Container image uses :latest or no tag", "Pin the image to an explicit version tag.", [SCORECARD_PINNED]),
|
|
583
|
+
WHM402: meta("WHM402", M, G, "Container may run as root", "Set runAsNonRoot in the security context.", [K8S_PSS]),
|
|
584
|
+
WHM403: meta("WHM403", M, G, "Root filesystem writable", "Set readOnlyRootFilesystem.", [K8S_PSS]),
|
|
585
|
+
WHM404: meta("WHM404", M, G, "Privileged container", "Remove privileged mode.", [K8S_PSS]),
|
|
586
|
+
WHM405: meta("WHM405", R, G, "Resource specs missing cpu/memory", "Set cpu and memory in limits/requests."),
|
|
587
|
+
WHM406: meta("WHM406", R, G, "CRDs in crds/ are never upgraded", "Manage CRD upgrades outside Helm or via a separate chart."),
|
|
588
|
+
WHM407: meta("WHM407", M, G, "Inline Secret data", "Use ExternalSecret/SealedSecret instead of inline Secret data.", [K8S_SECRETS]),
|
|
589
|
+
WHM501: meta("WHM501", R, G, "Unused values key", "Remove values defined but never referenced."),
|
|
590
|
+
WHM502: meta("WHM502", M, G, "Deprecated/invalid Kubernetes API version", "Update to a supported apiVersion."),
|
|
238
591
|
};
|
|
239
592
|
|
|
240
593
|
/** Look up catalog metadata for a check id, if known. */
|
package/src/audit/core.test.ts
CHANGED
|
@@ -128,6 +128,21 @@ describe("auditFiles", () => {
|
|
|
128
128
|
expect(findings.map((f) => f.file).sort()).toEqual(["a.yml", "b.yml"]);
|
|
129
129
|
});
|
|
130
130
|
|
|
131
|
+
test("accepts a lexicon name outside the built-in set (open AuditLexicon)", async () => {
|
|
132
|
+
const fake: PostSynthCheck = {
|
|
133
|
+
id: "CUSTOM001",
|
|
134
|
+
description: "fake",
|
|
135
|
+
check: () => [{ checkId: "CUSTOM001", severity: "error", message: "hit" }],
|
|
136
|
+
};
|
|
137
|
+
// "terraform" isn't in the built-in union — the open type must still accept it,
|
|
138
|
+
// and the injected provider resolves its checks.
|
|
139
|
+
const findings = await auditFiles([{ path: "main.tf.json", content: "{}", lexicon: "terraform" }], {
|
|
140
|
+
checksProvider: async (lexicon) => (lexicon === "terraform" ? [fake] : []),
|
|
141
|
+
});
|
|
142
|
+
expect(findings.map((f) => f.checkId)).toEqual(["CUSTOM001"]);
|
|
143
|
+
expect(findings[0].lexicon).toBe("terraform");
|
|
144
|
+
});
|
|
145
|
+
|
|
131
146
|
test("resolves a cross-file relationship (ARGO002 sees the AppProject in another file)", async () => {
|
|
132
147
|
// The Application alone → ARGO002 fires (project not declared here).
|
|
133
148
|
const alone = await auditFiles([{ path: "app.yaml", content: ARGO_APP, lexicon: "k8s" }]);
|
package/src/audit/core.ts
CHANGED
|
Binary file
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import { describe, test, expect } from "vitest";
|
|
2
|
+
import { build } from "esbuild";
|
|
3
|
+
import { fileURLToPath } from "url";
|
|
4
|
+
|
|
5
|
+
/**
|
|
6
|
+
* #426: the per-lexicon `detect` modules must be importable on the edge — i.e.
|
|
7
|
+
* bundling them pulls in NO `typescript` (the compiler that `plugin.ts` drags via
|
|
8
|
+
* declarative rules) and NOT `plugin.ts` itself. This is what lets the hosted
|
|
9
|
+
* service content-detect all lexicons on Workers.
|
|
10
|
+
*/
|
|
11
|
+
const repoRoot = fileURLToPath(new URL("../../../../", import.meta.url));
|
|
12
|
+
const LEXICONS = ["k8s", "docker", "aws", "azure", "gcp", "helm"];
|
|
13
|
+
|
|
14
|
+
describe("detectTemplate modules are edge-bundle clean", () => {
|
|
15
|
+
test("importing every lexicon's /detect pulls in no typescript or plugin.ts", async () => {
|
|
16
|
+
const contents =
|
|
17
|
+
LEXICONS.map((l, i) => `import { detectTemplate as d${i} } from "@intentius/chant-lexicon-${l}/detect";`).join("\n") +
|
|
18
|
+
`\nexport const detectors = [${LEXICONS.map((_, i) => `d${i}`).join(", ")}];\n`;
|
|
19
|
+
|
|
20
|
+
const result = await build({
|
|
21
|
+
stdin: { contents, resolveDir: repoRoot, loader: "ts" },
|
|
22
|
+
bundle: true,
|
|
23
|
+
format: "esm",
|
|
24
|
+
platform: "node",
|
|
25
|
+
metafile: true,
|
|
26
|
+
write: false,
|
|
27
|
+
outfile: "out.js",
|
|
28
|
+
logLevel: "silent",
|
|
29
|
+
});
|
|
30
|
+
|
|
31
|
+
const inputs = Object.keys(result.metafile.inputs);
|
|
32
|
+
expect(inputs.some((p) => p.includes("node_modules/typescript"))).toBe(false);
|
|
33
|
+
expect(inputs.some((p) => p.endsWith("/plugin.ts"))).toBe(false);
|
|
34
|
+
}, 30_000);
|
|
35
|
+
});
|
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
import { describe, test, expect } from "vitest";
|
|
2
|
+
import { fileURLToPath } from "url";
|
|
3
|
+
import { discoverByDetection, loadAuditPlugins } from "./discover";
|
|
4
|
+
import type { AuditInput } from "./core";
|
|
5
|
+
|
|
6
|
+
const fixture = (name: string) => fileURLToPath(new URL(`../cli/commands/__fixtures__/${name}`, import.meta.url));
|
|
7
|
+
|
|
8
|
+
/** Compare on (lexicon, path) pairs — content normalization differs in spelling, not target. */
|
|
9
|
+
const targets = (inputs: AuditInput[]) => inputs.map((i) => `${i.lexicon}:${i.path}`).sort();
|
|
10
|
+
|
|
11
|
+
describe("discoverByDetection (unified, detectTemplate-driven)", () => {
|
|
12
|
+
test("detects Kubernetes manifests", async () => {
|
|
13
|
+
const plugins = await loadAuditPlugins();
|
|
14
|
+
expect(targets(discoverByDetection(fixture("audit-k8s"), plugins))).toEqual(["k8s:manifests/deploy.yaml"]);
|
|
15
|
+
});
|
|
16
|
+
|
|
17
|
+
test("detects Docker artifacts (nested Dockerfile by name + compose by content)", async () => {
|
|
18
|
+
const plugins = await loadAuditPlugins();
|
|
19
|
+
expect(targets(discoverByDetection(fixture("audit-docker"), plugins))).toEqual([
|
|
20
|
+
"docker:app/Dockerfile",
|
|
21
|
+
"docker:docker-compose.yml",
|
|
22
|
+
]);
|
|
23
|
+
});
|
|
24
|
+
|
|
25
|
+
test("detects CloudFormation (JSON + YAML), normalizing to JSON", async () => {
|
|
26
|
+
const plugins = await loadAuditPlugins();
|
|
27
|
+
const found = discoverByDetection(fixture("audit-aws"), plugins);
|
|
28
|
+
expect(targets(found)).toEqual(["aws:stack.yaml", "aws:template.json"]);
|
|
29
|
+
// YAML template is normalized to a JSON string the aws checks can JSON.parse.
|
|
30
|
+
expect(() => JSON.parse(found.find((f) => f.path === "stack.yaml")!.content)).not.toThrow();
|
|
31
|
+
});
|
|
32
|
+
|
|
33
|
+
test("detects Azure ARM templates", async () => {
|
|
34
|
+
const plugins = await loadAuditPlugins();
|
|
35
|
+
expect(targets(discoverByDetection(fixture("audit-azure"), plugins))).toEqual(["azure:azuredeploy.json"]);
|
|
36
|
+
});
|
|
37
|
+
|
|
38
|
+
test("gcp wins over k8s for Config Connector resources (no double-audit)", async () => {
|
|
39
|
+
const plugins = await loadAuditPlugins();
|
|
40
|
+
const found = discoverByDetection(fixture("audit-gcp"), plugins);
|
|
41
|
+
expect(targets(found)).toEqual(["gcp:bucket.yaml", "gcp:firewall.yaml"]);
|
|
42
|
+
expect(found.some((i) => i.lexicon === "k8s")).toBe(false);
|
|
43
|
+
});
|
|
44
|
+
|
|
45
|
+
test("detects a Helm chart as a bundle, not loose manifests", async () => {
|
|
46
|
+
const plugins = await loadAuditPlugins();
|
|
47
|
+
const found = discoverByDetection(fixture("audit-helm"), plugins);
|
|
48
|
+
const helm = found.filter((i) => i.lexicon === "helm");
|
|
49
|
+
expect(helm).toHaveLength(1);
|
|
50
|
+
expect(helm[0].path).toBe("mychart");
|
|
51
|
+
expect(helm[0].files!["Chart.yaml"]).toContain("name: mychart");
|
|
52
|
+
expect(helm[0].files!["templates/deployment.yaml"]).toContain("privileged");
|
|
53
|
+
// chart-internal templates are NOT also picked up as loose k8s manifests.
|
|
54
|
+
expect(found.some((i) => i.lexicon === "k8s")).toBe(false);
|
|
55
|
+
});
|
|
56
|
+
|
|
57
|
+
test("detects CI workflows by path (github)", async () => {
|
|
58
|
+
const plugins = await loadAuditPlugins();
|
|
59
|
+
const found = discoverByDetection(fixture("audit-repo"), plugins);
|
|
60
|
+
expect(targets(found)).toEqual(["github:.github/workflows/ci.yml"]);
|
|
61
|
+
});
|
|
62
|
+
|
|
63
|
+
test("scopes detection to the provided plugins (k8s omitted → no k8s findings)", async () => {
|
|
64
|
+
const plugins = await loadAuditPlugins(["github", "gitlab", "forgejo", "docker", "aws", "azure", "gcp", "helm"]);
|
|
65
|
+
expect(discoverByDetection(fixture("audit-k8s"), plugins).some((i) => i.lexicon === "k8s")).toBe(false);
|
|
66
|
+
});
|
|
67
|
+
|
|
68
|
+
test("loadAuditPlugins skips an uninstalled lexicon instead of throwing", async () => {
|
|
69
|
+
const plugins = await loadAuditPlugins(["github", "definitely-not-a-real-lexicon"]);
|
|
70
|
+
expect(plugins.map((p) => p.name)).toEqual(["github"]);
|
|
71
|
+
});
|
|
72
|
+
});
|