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

Gitleaks breaks #154

Closed
praveenkumarpk opened this issue May 29, 2024 · 14 comments
Closed

Gitleaks breaks #154

praveenkumarpk opened this issue May 29, 2024 · 14 comments

Comments

@praveenkumarpk
Copy link

gitleaks-action/v2/dist/index.js:128395
const artifactClient = artifact.create();
^

TypeError: artifact.create is not a function

Gitleaks/gitleaks-action@v2
gitleaks version: 8.16.1

@mabbott-aurorasolar
Copy link

Also seeing this when my workflow calls gitleaks on github actions

on: [workflow_call]

name: Scan repo for secrets

jobs:
  gitleaks:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v4
        with:
          fetch-depth: 50
      - uses: gitleaks/gitleaks-action@v2
        env:
          GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
          GITLEAKS_LICENSE: ${{ secrets.GITLEAKS_LICENSE}}

Output:

5:19PM INF 2 commits scanned.
5:19PM DBG Note: this number might be smaller than expected due to commits with no additions
5:19PM INF scan completed in 61.8ms
5:19PM INF no leaks found
/home/runner/work/_actions/gitleaks/gitleaks-action/v2/dist/index.js:1[28](https://github.com/aurorasolar/zarya/actions/runs/9290350749/job/25566563759#step:3:28)395
  const artifactClient = artifact.create();
                                  ^
TypeError: artifact.create is not a function
    at Object.Scan (/home/runner/work/_actions/gitleaks/gitleaks-action/v2/dist/index.js:128395:35)
    at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
    at async start (/home/runner/work/_actions/gitleaks/gitleaks-action/v2/dist/index.js:139588:16)
Node.js v20.8.1

@mabbott-aurorasolar
Copy link

Suspect this is related to #153 which was merged 30 minutes ago, and updated a reference to artifact.

@ShaunKav
Copy link

+1 I got this same error in my actions after the mentioned PR was merged.

@quagliato
Copy link

+1

@gustavo-depaula
Copy link

+1 pls fix 😢

@rafael-loggi
Copy link

Same here!!!
On all repositories..

@mvanderkamp-cmb
Copy link

If it helps, here's the deprecation notice that shows up on successful runs before the action started breaking an hour ago.

Screenshot 2024-05-29 at 11 16 05

@mvanderkamp-cmb
Copy link

I think this is because #153 bumped the dependency without changing how its used. I'd recommend reverting.

@maxlouthain-arcadia
Copy link

+1

@matimercado
Copy link

+1, same issue in my workflows

@cerontrustly
Copy link

+1

@mvanderkamp-cmb
Copy link

Workaround:

In your workflow file, use the last working version instead of the latest v2 release by specifying gitleaks/[email protected] instead of gitleaks/gitleaks-action@v2:

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

carleeto added a commit to immutable/ts-immutable-sdk that referenced this issue May 30, 2024
ghenry added a commit to SentryPeer/SentryPeer that referenced this issue May 30, 2024
ghenry added a commit to SentryPeer/SentryPeerHQ that referenced this issue May 30, 2024
@codykhon
Copy link
Contributor

Opened pull request that should fix this issue

#157

@zricethezav
Copy link
Collaborator

Huge thanks to @codykhon for the quick fix. Let me know if it's still broken

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