Documentation
¶
Overview ¶
Package contractconfig validates that the schema and fixtures paths configured in aiwf.yaml resolve to locations inside the consumer repo. Both `..` traversal and out-of-repo symlinks are rejected before any path is stat'd or passed to a validator.
The package is the single point of truth for path containment across contractcheck (which reports the finding) and contractverify (which refuses to invoke a validator on an escaped path).
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Resolved ¶
Resolved is the post-validation view of one contracts.entries[] entry. SchemaPath and FixturesPath are absolute paths with symlinks evaluated, suitable for direct use by callers.
Skip is true when at least one path-escape finding was raised for this entry; callers must treat Skip == true as "do not stat, do not invoke the validator, do not proceed."
func Resolve ¶
Resolve validates every entry's configured paths, returns the safe-to-use resolved forms, and emits one or two `contract-config` findings (subcode `path-escape`) per entry whose paths escape the repo root. repoRoot must be absolute.
A nil contracts argument yields nil resolved and nil findings.
The returned Resolved slice is in the same order as contracts.Entries. Entries whose paths are clean have Skip == false and absolute resolved paths populated; entries with any escape have Skip == true and the escaping path field empty.