@intentius/chant 0.7.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 +16 -1
- package/src/audit/catalog.ts +244 -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/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 +27 -19
- package/src/cli/commands/audit.ts +28 -272
- 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[];
|
|
@@ -107,7 +119,12 @@ function meta(
|
|
|
107
119
|
remediation: string,
|
|
108
120
|
authority?: Authority[],
|
|
109
121
|
): RuleMeta {
|
|
110
|
-
|
|
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 };
|
|
111
128
|
}
|
|
112
129
|
|
|
113
130
|
const M = "merge-worthy" as const;
|
|
@@ -115,6 +132,229 @@ const R = "report-only" as const;
|
|
|
115
132
|
const D = "deterministic" as const;
|
|
116
133
|
const G = "guidance" as const;
|
|
117
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
|
+
|
|
118
358
|
/** Every audited post-synth check, keyed by id. */
|
|
119
359
|
export const RULE_CATALOG: Record<string, RuleMeta> = {
|
|
120
360
|
// ── GitHub Actions (GHA) ───────────────────────────────────────────
|
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
|
+
});
|