Scanning Docker images from Google Artifacts Registry from Gitlab CI #4231
-
|
I was using trivy to scan docker images in Gitlab CI job from Gitlab registry. Now I have moved the registry from Gitlab to Google Artifact Registry. I am able to push the image using json auth to Artifact Registry. But whenever I try to implement the scanning of the docker image in Gitlab CI job, it gives me an error of permission denied. I tried to manually run the trivy on Docker for Mac and perform all the steps that I did in my CI job, it works without any problem. It gives the following error: Here is my Gitlab CI job: Output of run with
|
Beta Was this translation helpful? Give feedback.
Replies: 9 comments
-
|
I did some exercise by attaching a docker executor runner with my project on gitlab and it works fine. But the problem occurs only when I am running gitlab-runner in kubernetes executor configurations. |
Beta Was this translation helpful? Give feedback.
-
|
Does anybody try to scan images from Github Actions? |
Beta Was this translation helpful? Give feedback.
-
|
Hi, @ahsan-raza. What is MICROSERVICE_BRANCH_OR_TAG_IMAGE variable value? |
Beta Was this translation helpful? Give feedback.
-
|
@ahsan-raza I am running into the same issue, did you ever resolve it? |
Beta Was this translation helpful? Give feedback.
-
|
Running into same issue too. Any update? |
Beta Was this translation helpful? Give feedback.
-
|
@umax MICROSERVICE_BRANCH_OR_TAG_IMAGE is the name:tag of the image that is needed to be scanned. |
Beta Was this translation helpful? Give feedback.
-
|
@ahsan-raza does just |
Beta Was this translation helpful? Give feedback.
-
|
yes it does. I build the docker image and push it to Google Artifact Registry on the same Gitlab runner which I use to scan Docker image with trivy. |
Beta Was this translation helpful? Give feedback.
-
|
I was able to resolve the problem. Here is the solution: while |
Beta Was this translation helpful? Give feedback.
I was able to resolve the problem. Here is the solution:
while
$GOOGLE_APPLICATION…