chore: switch to ID from AVDID in internal and user-facing fields #9655
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.
Description
Migration from AVDID to ID in PolicyMetadata and DetectedMisconfiguration
This PR continues the migration of check identifiers from AVDID to a unified ID field.
Key changes:
The ID field in types.PolicyMetadata now stores the check identifier (the
IDfield) instead ofAVDIDor the first alias.PolicyMetadatais mapped into types.DetectedMisconfiguration, theIDfield inDetectedMisconfigurationis also updated.DetectedMisconfiguration.PrimaryURLwill change because it is built based on thePolicyMetadata.IDfield.ID, so theIDfield inPolicyMetadataandDetectedMisconfigurationwill never be empty.DetectedMisconfigurationis serialized to JSON and proto (Scanner service), whilePolicyMetadatais serialized only to proto and used in the Cache service. Therefore, this change may affect downstream consumers depending on how they use these fields.The link format for built-in checks in tabular reports will change to use the check ID. Support for the new format has already been added in
avd-generator.Trivy now associates controls from compliance with misconfiguration findings not only by AVDID but also by ID.
Impact:
Users who directly work with the ID or PrimaryURL fields in JSON/proto may notice changes in the format of identifiers and check links.
Related PRs
Checklist