You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
GenerationState tracks PolicyDigest to detect when policy artifacts need regeneration, but does not track complypack digests. If a user pulls a new complypack via complyctl get without changing the policy, checkGenerationFreshness sees a fresh policy digest and skips regeneration. Providers continue using artifacts generated from the old complypack.
This also affects step identity in evaluation logs: state.json reflects the new complypack's repository@digest, but the scan results are based on content generated from the old complypack.
Steps to reproduce
complyctl get — pulls policy + complypack, generates artifacts
Update the complypack in the registry (new content, same evaluator-id)
complyctl get — pulls new complypack, updates state.json with new digest
complyctl scan — generation skipped (policy unchanged), providers use stale artifacts
Proposed fix
Add complypack digests to GenerationState and check them in needsRegeneration. When any complypack digest changes, trigger regeneration.
A separate enhancement (co-locating OCI provenance in the cache directory) would improve data locality but does not fix this issue on its own — generation invalidation is necessary regardless
Problem
GenerationStatetracksPolicyDigestto detect when policy artifacts need regeneration, but does not track complypack digests. If a user pulls a new complypack viacomplyctl getwithout changing the policy,checkGenerationFreshnesssees a fresh policy digest and skips regeneration. Providers continue using artifacts generated from the old complypack.This also affects step identity in evaluation logs:
state.jsonreflects the new complypack'srepository@digest, but the scan results are based on content generated from the old complypack.Steps to reproduce
complyctl get— pulls policy + complypack, generates artifactscomplyctl get— pulls new complypack, updatesstate.jsonwith new digestcomplyctl scan— generation skipped (policy unchanged), providers use stale artifactsProposed fix
Add complypack digests to
GenerationStateand check them inneedsRegeneration. When any complypack digest changes, trigger regeneration.Related
state.jsonfor complypackrepository@digest, which can drift from what was actually used during generation