Skip to content

Commit

Permalink
Update codeql-analysis.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
nclsbayona authored Mar 7, 2024
1 parent be9686a commit 467dae7
Showing 1 changed file with 18 additions and 19 deletions.
37 changes: 18 additions & 19 deletions .github/workflows/codeql-analysis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -46,25 +46,24 @@ jobs:
- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@v2

build:
name: Build
runs-on: ubuntu-20.04
steps:
- name: Checkout code
uses: actions/checkout@v4
# build:
# name: Build
# runs-on: ubuntu-20.04
# steps:
# - name: Checkout code
# uses: actions/checkout@v4

- name: Build an image from Dockerfile
run: |
docker build -t docker.io/my-organization/my-app:${{ github.sha }} .
# - name: Build an image from Dockerfile
# run: docker build -t docker.io/my-organization/my-app:${{ github.sha }} .

- name: Run Trivy vulnerability scanner
uses: aquasecurity/trivy-action@master
with:
image-ref: 'docker.io/my-organization/my-app:${{ github.sha }}'
format: 'sarif'
output: 'trivy-results.sarif'
# - name: Run Trivy vulnerability scanner
# uses: aquasecurity/trivy-action@master
# with:
# image-ref: 'docker.io/my-organization/my-app:${{ github.sha }}'
# format: 'sarif'
# output: 'trivy-results.sarif'

- name: Upload Trivy scan results to GitHub Security tab
uses: github/codeql-action/upload-sarif@v2
with:
sarif_file: 'trivy-results.sarif'
# - name: Upload Trivy scan results to GitHub Security tab
# uses: github/codeql-action/upload-sarif@v2
# with:
# sarif_file: 'trivy-results.sarif'

0 comments on commit 467dae7

Please sign in to comment.