Skip to content

Conversation

@nikpivkin
Copy link
Contributor

@nikpivkin nikpivkin commented Oct 13, 2025

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 ID field) instead of AVDID or the first alias.

    • Since PolicyMetadata is mapped into types.DetectedMisconfiguration, the ID field in DetectedMisconfiguration is also updated.
    • The link format in DetectedMisconfiguration.PrimaryURL will change because it is built based on the PolicyMetadata.ID field.
    • All built-in checks currently have an ID, so the ID field in PolicyMetadata and DetectedMisconfiguration will never be empty.
  • DetectedMisconfiguration is serialized to JSON and proto (Scanner service), while PolicyMetadata is 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

  • I've read the guidelines for contributing to this repository.
  • I've followed the conventions in the PR title.
  • I've added tests that prove my fix is effective or that my feature works.
  • I've updated the documentation with the relevant information (if needed).
  • I've added usage information (if the PR introduces new options)
  • I've included a "before" and "after" example to the description (if the PR is a user interface change).

@nikpivkin nikpivkin changed the title refactor(misconf): deprecate AVDID fields in structs @nikpivkin chore: show ID instead of AVDID in user-facing reports Oct 14, 2025
@nikpivkin nikpivkin changed the title @nikpivkin chore: show ID instead of AVDID in user-facing reports chore: show ID instead of AVDID in user-facing reports Oct 14, 2025
@nikpivkin nikpivkin force-pushed the report-links branch 4 times, most recently from 4b6f26e to 7213206 Compare October 23, 2025 18:39
@nikpivkin nikpivkin changed the title chore: show ID instead of AVDID in user-facing reports chore: switch to ID from AVDID in internal and user-facing fields Oct 24, 2025
@nikpivkin nikpivkin marked this pull request as ready for review October 24, 2025 10:47
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