Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Scanning taking too long in Github actions #384

Open
yalamarthisr opened this issue Aug 26, 2024 · 2 comments
Open

Scanning taking too long in Github actions #384

yalamarthisr opened this issue Aug 26, 2024 · 2 comments

Comments

@yalamarthisr
Copy link

yalamarthisr commented Aug 26, 2024

Recently we have beeing seeing trivy action taking lot of time to Initialize the aqyasecurity trivy action(Build container for action use: '/home/runner/work/_actions/aquasecurity/trivy-action/0.20.0/Dockerfile) and also running Trivy vulnerability scanner. It is sometimes failing out without displaying any errors.

test:
    runs-on: ubuntu-latest
    environment: dev
    needs: id
    env:
      FULLY_QUALIFIED_IMAGE: test.azurecr.io/myimage
    steps:
    - name: Checkout Code
      uses: actions/checkout@v4
    
    - name: Create docker images
      run: >
        docker build --file ./test/Dockerfile
        --tag  "${{ env.FULLY_QUALIFIED_IMAGE }}:${{ inputs.imagetag }}"
        --no-cache
        ./
    - name: Run Trivy vulnerability scanner
      uses: aquasecurity/[email protected]
      with:
        image-ref: '${{ env.FULLY_QUALIFIED_IMAGE }}:${{ inputs.imagetag }}'
        format: 'sarif'
        output: 'scan-results.sarif'
        severity: 'CRITICAL,HIGH'
    - name: Upload Trivy scan results to GitHub Security tab
      uses: github/codeql-action/upload-sarif@v3
      with:
        sarif_file: 'scan-results.sarif'
@yalamarthisr
Copy link
Author

I see this issue but still it was taking more than 5 Minutes before I see this error. We are using github hosted runners.
FATAL init error: DB error: failed to download vulnerability DB: database download error: oci download error: download error: failed to download: context deadline exceeded

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants
@yalamarthisr and others