Repository navigation
Replies: 3 comments
|
Closing for now: observed with trivy-operator 0.30.1 / Trivy 0.69.3; I'll re-verify against the current release and reopen with exact versions if it still reproduces. |
0 replies
|
Reopening — verified against the current release. Trivy 0.76.1 (what trivy-operator 0.36.1 / chart 0.38.1 ships) reproduces it from a workstation with Control, same identity, same registry (
Two things worth fixing:
Versions: Trivy 0.76.1 (also 0.69.3 under trivy-operator 0.30.1 on AKS with workload identity); the ARM scope is unchanged on |
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Description
Trivy cannot pull from an Azure Container Registry whose
azureADAuthenticationAsArmPolicyisdisabled(the Defender-recommended hardening "Container registries should have ARM audience token authentication disabled"), even with a correctly configured workload identity / managed identity that holdsAcrPull.The ACR registry client hard-codes the ARM audience:
and then exchanges that token at
<registry>/oauth2/exchange. A registry with ARM-audience auth disabled rejects it:Seen with trivy-operator 0.32.1 on AKS: zero
VulnerabilityReportsand failing scan jobs for every image in such a registry.Desired behavior
Request the ACR audience,
https://containerregistry.azure.net/.default(what the Azure SDK'sazcontainerregistryclient andfluxcd/pkg/auth/azureuse), with the ARM scope at most as a fallback for sovereign/custom clouds that do not define the ACR service. Authorisation is unchanged — the exchange still yields a refresh token scoped by the identity'sAcrPull.Workaround
az acr config authentication-as-arm update -r <registry> --status enabled— i.e. undo the hardening.Environment
AZURE_CLIENT_ID/AZURE_TENANT_ID/AZURE_FEDERATED_TOKEN_FILEinjected), Premium ACR with private endpoint.All reactions