Skip to content

Harden conformance collection and regenerate the input corpus - #1

Merged
be-thomas merged 2 commits into
mainfrom
feat/conformance-inputs
Oct 26, 2026
Merged

be-thomas merged 2 commits into
mainfrom
feat/conformance-inputs

Conversation

@be-thomas

Copy link
Copy Markdown
Owner

Summary

  • Parse candidates with hclsyntax / hcljson and inspect nested expressions, so feature detection and secret scanning see function, conditional, template and for-expression bodies.
  • Tighten credential heuristics: name boundaries, qualifier suffixes, placeholder and filler detection, and a length-plus-digit value threshold.
  • Resolve licenses from the nearest ancestor, accept bare SPDX texts and the LICENCE spelling, and reject permissive texts that add restrictions.
  • Write the lock and attribution atomically and fail a cancelled run instead of presenting a partial crawl as a finished corpus.
  • Add an offline verifier that recomputes the lock and checks provenance, licenses, tiers and hashes, and run it in CI.
  • Regenerate the corpus: 853 fixtures, 6,471 files, 24,314,566 bytes.

Corpus

Metric Value
Fixtures 853
Files 6,471
Bytes 24,314,566
smoke / core / advanced / modules 20 / 0 / 487 / 346
Registry / GitHub 811 / 42
Apache-2.0 / MIT / BSD-3-Clause 633 / 211 / 9

Test plan

  • gofmt -l . — clean
  • go vet ./... — clean
  • go test ./... — pass
  • go test -race ./internal/conformance/collect/ — pass
  • make conformance-verify — verified 853 fixtures, 6471 files, 24314566 bytes

Add cmd/openiac-conformance and internal/conformance/collect to crawl
the Terraform Registry and configured GitHub seeds, resolve each module
to an immutable commit, filter for Terraform sources, licenses and
safety, and write self-contained fixtures.

Commit 918 fixtures (6,934 files, 25,173,266 bytes) with per-fixture
provenance, hashes, license texts, a deterministic corpus lock and
generated third-party attribution. Document the inputs phase in
docs/CONFORMANCE.md and conformance/README.md.
- Parse candidates with hclsyntax/hcljson and inspect nested expressions so
  feature detection and secret scanning see function, conditional, template
  and for-expression bodies.
- Tighten credential heuristics: name boundaries, qualifier suffixes,
  placeholder and filler detection, and a length-plus-digit value threshold.
- Resolve licenses from the nearest ancestor, accept bare SPDX texts and the
  LICENCE spelling, and reject permissive texts that add restrictions.
- Write the lock and attribution atomically and fail a cancelled run instead
  of presenting a partial crawl as a finished corpus.
- Add an offline verifier that recomputes the lock and checks provenance,
  licenses, tiers and hashes, and run it in CI.
- Regenerate the corpus: 853 fixtures, 6,471 files, 24,314,566 bytes.
@be-thomas
be-thomas merged commit 0af20d2 into main Oct 26, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant