Failed runs with errors about `artifactClient = artifact.create()`
khoadaniel opened this issue Β· comments
Describe the bug
Since 7AM UTC, 30.05.2024 (refer to my screenshot), my gitleaks workflow has failed with the following error.
I have not implemented anything that might have caused such a change in behavior.
/home/ubuntu/actions-runner/_work/_actions/gitleaks/gitleaks-action/v2/dist/index.js:128395
const artifactClient = artifact.create();
^
TypeError: artifact.create is not a function
To Reproduce
name: gitleaks
on: [pull_request, push, workflow_dispatch]
jobs:
scan:
name: gitleaks
runs-on: [self-hosted, linux, x64]
steps:
- name: Check out
uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Install and run gitleaks
uses: gitleaks/gitleaks-action@v2
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
GITLEAKS_LICENSE: ${{ secrets.GITLEAKS_LICENSE}}
- name: Remove temp files
run: sudo rm -rf /tmp/gitleaks.tmp
Expected behavior
Successful runs without the previously mentioned error.
Basic Info (please complete the following information):
- OS: amazon/ubuntu/images/hvm-ssd/ubuntu-jammy-22.04-amd64-server-20231207
- Gitleaks Version: gitleaks/gitleaks-action@v2
Additional context
π license valid for repo [dent/data_platform]
gitleaks version: 8.16.1
Version to install: 8.16.1 (target directory: /tmp/gitleaks-8.16.1)
Received 0 of 2[7](https://github.com/dent/data_platform/actions/runs/9300142327/job/25595540525#step:3:8)04406 (0.0%), 0.0 MBs/sec
Received 2704406 of 2704406 (100.0%), 2.1 MBs/sec
Cache Size: ~3 MB (2704406 B)
/usr/bin/tar --use-compress-program zstd -d -xf /home/ubuntu/actions-runner/_work/_temp/9bc2e393-757[8](https://github.com/dent/data_platform/actions/runs/9300142327/job/25595540525#step:3:9)-4777-9b67-d473e77156d5/cache.tzst -P -C /home/ubuntu/actions-runner/_work/data_platform/data_platform
Cache restored successfully
Gitleaks restored from cache
event type: push
gitleaks cmd: gitleaks detect --redact -v --exit-code=2 --report-format=sarif --report-path=results.sarif --log-level=debug --log-opts=--no-merges --first-parent 7f47af4e3edd0abb4[9](https://github.com/dent/data_platform/actions/runs/9300142327/job/25595540525#step:3:10)3708d07775d1478973ee07^..b654067d9cad1939927d6699a71e08e41b898ff2
/tmp/gitleaks-8.16.1/gitleaks detect --redact -v --exit-code=2 --report-format=sarif --report-path=results.sarif --log-level=debug --log-opts=--no-merges --first-parent 7f47af4e3edd0abb493708d07775d1478973ee07^..b654067d9cad1939927d6699a71e08e41b898ff2
β
ββ²
β β
β β
β gitleaks
9:21AM DBG no gitleaks config found in path .gitleaks.toml, using default gitleaks config
9:21AM DBG found .gitleaksignore file
9:21AM DBG executing: /usr/bin/git -C . log -p -U0 --no-merges --first-parent 7f47af4e3edd0abb493708d07775d1478973ee07^..b654067d9cad1939927d6699a71e08e41b898ff2
9:21AM INF 2 commits scanned.
9:21AM DBG Note: this number might be smaller than expected due to commits with no additions
9:21AM INF scan completed in 66.2ms
9:21AM INF no leaks found
/home/ubuntu/actions-runner/_work/_actions/gitleaks/gitleaks-action/v2/dist/index.js:[12](https://github.com/dent/data_platform/actions/runs/9300142327/job/25595540525#step:3:13)8395
const artifactClient = artifact.create();
^
TypeError: artifact.create is not a function
at Object.Scan (/home/ubuntu/actions-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/ubuntu/actions-runner/_work/_actions/gitleaks/gitleaks-action/v2/dist/index.js:[13](https://github.com/dent/data_platform/actions/runs/9300142327/job/25595540525#step:3:14)9588:16)
Thanks for your help.
cc @zricethezav
@khoadaniel should be fixed with the latest release of gitleaks action
@khoadaniel should be fixed with the latest release of gitleaks action
Thanks a lot @zricethezav
It worked.