Skip to content

gitleaks action scan repo not found secret in org #1486

@orange723

Description

@orange723

Describe the bug
I request a License,set token and license to secret,but pr feat-xxx to dev scan always not found secret,action gitleaks cmd is

gitleaks detect --redact -v --exit-code=2 --report-format=sarif --report-path=results.sarif --log-level=debug --log-opts=--no-merges

Was local scan cmd
gitleaks detect --redact -v --exit-code=2 --report-format=sarif --report-path=results.sarif --log-level=debug
find more secret

How to fix or config gitleaks action

action example

name: gitleaks
on: [pull_request, workflow_dispatch]
jobs:
  scan:
    name: gitleaks
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v4
        with:
          fetch-depth: 0
      - uses: gitleaks/gitleaks-action@v2
        env:
          GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
          GITLEAKS_LICENSE: ${{ secrets.GITLEAKS_LICENSE}}

Basic Info (please complete the following information):

  • OS: github action
  • Gitleaks Version: gitleaks-8.16.1

cc @zricethezav

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions