Skip to content
Discussion options

You must be logged in to vote

I was able to resolve the problem. Here is the solution:


trivy_scan_tag_v2:
  image:
   name: docker.io/aquasec/trivy:0.35.0
   entrypoint: [""]
  stage: scan_image_tag
  variables:
    # No need to clone the repo, we exclusively work on artifacts.  See
    # https://docs.gitlab.com/ee/ci/runners/README.html#git-strategy
    GIT_STRATEGY: none
    TRIVY_USERNAME: ""
    TRIVY_PASSWORD: ""
    TRIVY_AUTH_URL: ""
    GOOGLE_APPLICATION_CREDENTIALS: $GOOGLE_APPLICATION


  script:
    - echo $GOOGLE_APPLICATION_CREDENTIALS > /tmp/service.json
    - export GOOGLE_APPLICATION_CREDENTIALS=/tmp/service.json
    - trivy --version
  cache:
    paths:
      - .trivycache/

while $GOOGLE_APPLICATION

Replies: 9 comments

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Answer selected by ahsan-raza
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
help wanted Denotes an issue that needs help from a contributor. Must meet "help wanted" guidelines.
5 participants
Converted from issue

This discussion was converted from issue #3200 on May 08, 2023 13:46.