Skip to content

Help with exit-code #183

@akashkumarmg

Description

@akashkumarmg

Hi, I am using the below workflow which works fine for our use case but, i need the --exit-code to be set to 0 as we don't want to fail the scan or block the PR at the moment, and the scan to succeed.

name: gitleaks

on:
  pull_request:
    branches:
      - main
 
jobs:
  scan:
    name: gitleaks-try-1
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v3

      - uses: gitleaks/gitleaks-action@v2
        env:
          GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
          GITLEAKS_LICENSE: ${{ secrets.GITLEAKS_LICENSE}}
          GITLEAKS_CONFIG: ${{ github.workspace }}/.github/gitleaks.toml
          GITLEAKS_EXIT_CODE: 0

I checked online on how to pass arguments, but the results were that we cannot do so when we use gitleaks/gitleaks-action@v2 directly.

Kindly help on how to pass the --exit-code=0

Thanks

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions