Repository navigation
feat: estate-read batch 1, discover, manifests kind, reference catalog, finding identity, parser notice, untyped import (#5095 #5096 #5097 #5106 #5083 #5070) - #5121
Merged
Conversation
…icationSet and AppProject (#5096)
…5106) A finding now carries an identity built from the rule, the file, the object, the finding's place in the object and, for a secret, its fingerprint. The message is not an input, so renaming a container leaves it alone. SARIF results publish it as partialFingerprints. Diagnostics gain an optional locator, which the k8s container checks set. An aliased Terraform provider is keyed by its alias instead of its order among the provider's blocks.
…tory with no declaration (#5095) The kinds' probes find the members under <dir>, and the read goes through the declared path with the found declaration held in memory and laid over the tree. Nothing is written inside <dir>. A directory a .tf file calls through a local module source is a module, two kinds at one precedence are a tie, and a claimed directory inside another member is left out; each is listed in the new additive discovered field with its outcome. Kinds come from the @INTENTIUS packages installed beside chant. Member names come from the path. --at, --member, --detail, --no-cache and --dry-run work; a declaration in <dir> itself is read as declared. (#5095)
…ers (#5097) chant workspace graph runs each lexicon's reference catalog over the composed declared graph (reconstructIndexedEdges), so a reference joins nodes of two members. The members are read at --detail 3 for the pass whatever tier the document is printed at; at --detail 1 and 0 the results move to the nodes they are drawn as. Derived edges go in edges with origin, rule and relation; references to no node go in dangling with their rule and targetKind; references to several nodes go in the new ambiguous list with every candidate; and catalog names the lexicons and members read, each rule named, and per node the arguments not read because not literal. Not run with --live. A catalog takes scopes, kinds whose names are unique inside a scope the node names (the k8s catalog's namespaced kinds and metadata.namespace), and declaredNode, the node the rules read (terraform: the provider type and the literal arguments). readPath takes a quoted key, metadata.annotations["iam.gke.io/gcp-service-account"]. Floor WORKSPACE_GRAPH_CATALOG_FLOOR.
# Conflicts: # packages/core/src/workspace/graph-cli.ts
…ss for, with one warning per kind (#5070)
…og and the JSON report (#5083) A Terraform root read without @cdktn/hcl2json produced no entities and so no findings, which read as a clean directory. The terraform entities hook now lets a missing-parser error (one carrying parserPackage) through, auditFiles records each affected lexicon, package, install command and directories, and chant audit prints it on stderr, as a note in text reports, and as a skipped list in the JSON report.
This was referenced Nov 15, 2026
Closed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #5095
Closes #5096
Closes #5097
Closes #5106
Closes #5083
Closes #5070
Batch 1 of the estate-read work in chant (#5105). Six issues, each built on its own branch and merged here. This branch holds the build and the full suite for the batch.
#5095:
chant workspace graph <dir> --discoverThe kinds' probes find a directory's members with no declaration and nothing written. The document is an ordinary contract-1 graph with one new optional field,
discovered, one entry per claimed directory (member,tie,moduleorinside-member). Docs:cli/workspace-graph.mdx, "Discovering members".fx/, a contract-1 document with members forinfra/netandargoand none for the module (discover.e2e.test.ts). Member names cannot hold/, so the members are namedinfra-netandargo, and theirdirfields areinfra/netandargo.fx/(mode, size, mtime, sha256) are identical before and after, and chant's refs and.git/chantare unchanged.discoveredwith both kinds and not read (unit test, plus the realflywayandgolang-migratekinds).--discover, the command still fails withdeclaration-missing.graph.schema.json.#5096: a
manifestsworkspace kind for plain manifest directoriesThe new kind sits at precedence 305 and probes any
*.yaml/*.ymlwithapiVersionandkind.argo-appnow also claims ApplicationSet and AppProject. A file holding template syntax is named in a warning and skipped. A directory a kustomization lists inresourcesorbasesis skipped and reported ascoveredBy.fx/plain/(Deployment, Service,external-secrets.io/v1ExternalSecret) prints three nodes at--detail 3, and the ExternalSecret carries itsspec.fx/argo/prints an Application, an ApplicationSet and an AppProject.{{ .Values.x }}is named in the warnings, and the other files' nodes still print.kustomization.yamlis still claimed bykustomize.#5097: the reference catalog on declared graphs and across members
Derived edges carry
rule,relationandgrain.danglingentries gainruleandtargetKind, a newambiguouslist records candidates, and acatalogobject names each rule the document uses. Adding a rule is one entry in a catalog'srefs. New floor:WORKSPACE_GRAPH_CATALOG_FLOOR. Docs:cli/workspace-graph.mdx("Derived edges") andlexicon-authoring/observation-contract.mdx.readPathreturns["x"]for a quoted annotation key, and the existing catalog tests pass unchanged.appDeployment torbacServiceAccountrunneredge prints with rulek8s:K8s::Apps::Deployment:spec.template.spec.serviceAccountName.missing, the reference appears indanglingwith that rule.runnergive no edge and two recorded candidates.--detail 0output still has the derived edges, mapped onto the members' stack nodes.#5106: audit findings carry a stable identity
findings[].identityis a hash of the rule, the file, the entity, an optional locator (a container's place, for example) and the secret fingerprint. Message text and line numbers are not inputs. SARIF results carry it aspartialFingerprints["chantFindingIdentity/v1"]. An aliased Terraform provider is keyedprovider.<name>~<alias>, so adding an earlier block no longer renumbers it.audit-identity.test.tsrenames a container: every message changes and no identity does.partialFingerprintsequals the JSON identity.parse.test.ts).#5083: audit says when the HCL parser is missing
chant auditprints a notice naming the lexicon, the package, the directories it could not read and the install command. Text reports lead with it, and the JSON report has a top-levelskippedlist ({lexicon, reason: "parser-not-installed", package, install, paths}). The list is absent when every lexicon was read. Any lexicon can report a missing optional parser the same way.audit-parser-notice.test.ts).skippedin the JSON report.#5070: k8s import writes no class the lexicon does not export
A kind with no exported class is written as
k8sManifest({ apiVersion, kind, ... }), which builds and round-trips. Each such kind gets one warning namingk8s.crdsandchant generate. The same check also stops two classes that loaded but were the wrong type: kustomize'sKustomizationhad become Flux's, and KyvernoPolicyhad becomeK8s::Iam::Policy.roundtrip-build.test.ts).kubernetes/k8s.iocorpus, files that wrote a missing class went from 51 to 0, and so did builds that failed to load.Gates on this branch
just build: passed. Coretsc: clean.just test: 24 failures in 14 files on the first run under load. Re-run alone, 7 of those files pass. The other 7 are git, tofu, signing and lock tests, none touched here. They fail on cleanorigin/mainthe same way on this machine, from the per-test time budget under load. CI is the arbiter for those.npx tsx scripts/typecheck.tsreports the same six files on cleanorigin/mainin a fresh worktree as on this branch (generated artifacts a fresh worktree lacks). Main's CI is green.chant/lifecycle,ci/*tags and.git/chantwere unchanged before and after every test run.Findings for the plan (also on #5105)
kubernetes/k8s.ioasinside-member, because a declaration does not nest members. Reading them would mean relaxing placement for discovered reads. That is a decision for epic: mixed graph from files - Kubernetes, Argo CD, Helm and secrets joined to the cloud #5094.kubernetes/k8s.iofail withmust specify --enable-helm. That is k8s: kustomize roots with helmCharts cannot render; --enable-helm is never passed #5112.argo-apporflux-kustomizationdirectories whose readers keep only their own kinds.