gitleaks / gitleaks/gitleaks-action
pass checkout path?
- Dominant language
- JavaScript
- Stars
- 646
- Forks
- 195
- PR merge metrics
- No merged PRs in 30d
Description
It seems that action does not support passing path with usual `with: path: ...`
my checkout is in a subfolder and action failed because not a git repo
https://github.com/juju4/ansible-adduser/actions/runs/4151619785/jobs/7182030614#step:12:26
```
1:40PM DBG no gitleaks config found in path .gitleaks.toml, using default gitleaks config
1:40PM DBG executing: /usr/bin/git -C . log -p -U0 --no-merges --first-parent 7c0c0e648f21bea1575b57aba8091c8f2c705e06^..da271afad6e5b5d769a7bdf1c654fb1ea32942c1
1:40PM ERR [git] fatal: not a git repository (or any of the parent directories): .git
1:40PM DBG 0 commits scanned. Note: this number might be smaller than expected due to commits with no additions
```
config
https://github.com/juju4/ansible-adduser/blob/da271afad6e5b5d769a7bdf1c654fb1ea32942c1/.github/workflows/lint.yml#L74
```
steps:
- uses: actions/checkout@v2
with:
path: ${{ env.ANSIBLE_ROLE }}
[...]
- name: Gitleaks check
uses: gitleaks/gitleaks-action@1f2d10fb689bc07a5f56f48d6db61f5bbbe772fa
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
GITLEAKS_ENABLE_SUMMARY: true
GITLEAKS_ENABLE_COMMENTS: true
GITLEAKS_ENABLE_UPLOAD_ARTIFACT: false
with:
path: ${{ env.ANSIBLE_ROLE }}
```
Contributor guide
Research direction
Start with .github/workflows/lint.yml at the checkout and Gitleaks check steps, then run the workflow with checkout.path set to ANSIBLE_ROLE. Done means the action honors the with.path value and scans that subfolder without the not-a-git-repository error.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- github-actions
- Domain
- ci-cd, security
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100