Skip to content

Commit

Permalink
Update aquasec-container-scanner.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
andreazorzetto authored Jul 18, 2023
1 parent 6e6f7c3 commit ec69dbe
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions .github/workflows/aquasec-container-scanner.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,14 +25,15 @@ jobs:
- name: Docker login Aqua Registry
run: docker login registry.aquasec.com -u ${{ secrets.AQUAREG_USER }} -p ${{ secrets.AQUAREG_PSWD }}

- name: Tag image with Registry
run: docker tag my-demo-image:${{ github.sha }} $IMAGE_REGISTRY/my-demo-image:${{ github.sha }}

# Scanner authenticates to the server (-H) using a token (-A) but this can be replaced with user and password auth
# image is registered if found compliant (--register-compliant) as belonging to the final registry (--registry).
# the --local flag indicates a locally built image not available in the registry yet
- name: Scan image
run: docker run --rm -v /var/run/docker.sock:/var/run/docker.sock registry.aquasec.com/scanner:2022.4 scan -H ${{ secrets.AQUA_SERVER }} -n -A ${{ secrets.TOKEN }} --local --text --register-compliant --registry $IMAGE_REGISTRY my-demo-image:${{ github.sha }}

- name: Tag image with Registry
run: docker tag my-demo-image:${{ github.sha }} $IMAGE_REGISTRY/my-demo-image:${{ github.sha }}

- name: Push to Registry
run: echo "docker push"
run: echo "docker push"

0 comments on commit ec69dbe

Please sign in to comment.