ci: add gitleaks workflow
This commit is contained in:
parent
96b583228c
commit
21cbb440c6
1 changed files with 40 additions and 0 deletions
40
.forgejo/workflows/gitleaks.yml
Normal file
40
.forgejo/workflows/gitleaks.yml
Normal file
|
|
@ -0,0 +1,40 @@
|
|||
# .forgejo/workflows/gitleaks.yml
|
||||
#
|
||||
# gitleaks secret-scan workflow.
|
||||
# Scans the repository for accidentally committed secrets on push and PRs.
|
||||
#
|
||||
#
|
||||
# Requires a Forgejo/Gitea Actions runner; it is a no-op without one and is
|
||||
# safe to remove if you do not use Forgejo/Gitea Actions.
|
||||
#
|
||||
#
|
||||
#
|
||||
#
|
||||
#
|
||||
|
||||
name: gitleaks
|
||||
|
||||
on:
|
||||
push:
|
||||
pull_request:
|
||||
|
||||
jobs:
|
||||
scan:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
with:
|
||||
# Full history — gitleaks needs depth to scan a commit range.
|
||||
fetch-depth: 0
|
||||
|
||||
- name: install gitleaks
|
||||
run: |
|
||||
curl -sSL -o gl.tar.gz \
|
||||
https://github.com/gitleaks/gitleaks/releases/download/v8.21.2/gitleaks_8.21.2_linux_x64.tar.gz
|
||||
tar xzf gl.tar.gz gitleaks
|
||||
chmod +x gitleaks
|
||||
./gitleaks version
|
||||
|
||||
- name: scan
|
||||
run: |
|
||||
./gitleaks detect --source . --no-banner --redact --verbose
|
||||
Loading…
Add table
Add a link
Reference in a new issue