google-cloud-platformgoogle-artifact-registryimage-scanner

Problem with Container Analysis API in GCP


I have enabled the Container Analysis API in the GCP project using the following code in Pulumi using TypeScript:

new gcp.projects.Service(`mbadas-${environment}-container-analysis-api`, {
  project: projectId,
  service: 'containeranalysis.googleapis.com',
  disableOnDestroy: false,
});

When I go to my GCP console --> API --> Enabled APIs & Services, then I can also see that API is enabled

enter image description here

enter image description here

When I go to Artifact Registry in GCP console, it is still showing API disabled (see the pic below):

enter image description here

What am I doing wrong here ? Why are the images not being scanned for Vulnerabilities.


Solution

  • For you to perform the scanning, there are 2 APIs need to be enable:

    Then follow through these docs to enable automatic scanning of images vulnerabilities.