gitleaks / gitleaks-action

Protect your secrets using Gitleaks-Action
https://gitleaks.io
Other
330 stars 129 forks source link

Сan’t get the artifact after completing the gitleaks step #133

Closed darliiin closed 8 months ago

darliiin commented 9 months ago

Hi I am using gitleaks-action

- uses: gitleaks/gitleaks-action@v2
   id: gitleaks
   continue-on-error: true
   env:
       GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}}
       GITLEAKS_LICENSE: ${{secrets.GITLEAKS_LICENSE}} 

And then I want to get the gitleaks-results.sarif artifact

- name: Download gitleaks-results.sarif artifact
  id: download
  uses: actions/download-artifact@v4

gitleaks step states that the artifact is downloaded image

but the download step shows that there are no artifacts and does not download anything image

Full code:

name: gitleaks
on:
  push:

jobs:
  gitleaks:
    name: gitleaks
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v3
        with:
          fetch-depth: 0

      - uses: gitleaks/gitleaks-action@v2
        id: gitleaks
        continue-on-error: true
        env:
          GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

  download:
    needs: gitleaks
    runs-on: ubuntu-latest
    steps:
      - name: Download gitleaks-results.sarif artifact
        uses: actions/download-artifact@v4

Visually, I also see that the artifact does not appear until all jobs are completed and only then does the artifact appear

Why can't I get the actefact after completing the gitleaks step?