Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
25 changes: 17 additions & 8 deletions .github/workflows/security.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,15 +24,24 @@ jobs:
uses: zizmorcore/zizmor-action@45d7276c9ca790aabd705e31ca99c6185c3e76dd # v0.8.1
with:
advanced-security: false
gitleaks:
betterleaks:
runs-on: ubuntu-slim
permissions:
contents: read # needed to check out a private repo
steps:
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
persist-credentials: false
fetch-depth: 0
- name: Check gitleaks
uses: gitleaks/gitleaks-action@e0c47f4f8be36e29cdc102c57e68cb5cbf0e8d1e # v3.0.0
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
GITLEAKS_ENABLE_COMMENTS: false
persist-credentials: false
fetch-depth: 0
# betterleaks has no official action or PyPI package, so it is built from source
- name: Install Go
uses: actions/setup-go@d8cbb8045d7f43706b9177cceb36c1f91a6644d5 # v7.1.0
with:
go-version: stable
cache: false
- name: Install betterleaks
run: |
go install github.com/betterleaks/betterleaks@v1.10.1
- name: Scan git history for secrets
run: |
"$(go env GOPATH)/bin/betterleaks" git --redact .
2 changes: 1 addition & 1 deletion Brewfile
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
brew "actionlint"
brew "gitleaks"
brew "betterleaks"
brew "just"
brew "markdownlint-cli2"
brew "prek"
Expand Down
8 changes: 0 additions & 8 deletions CHANGELOG.md

This file was deleted.

4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ template changes with `copier update`.
* `uv` for dependencies and `just` as the command runner
* ruff, ty, codespell, actionlint, and markdownlint for linting
* pytest with coverage, Zensical docs with an API reference generated from docstrings
* pip-audit, gitleaks, and zizmor for security checks
* pip-audit, betterleaks, and zizmor for security checks
* prek git hooks, GitHub Actions CI, Dependabot, Release Drafter, and a release workflow
* A VS Code dev container

Expand Down Expand Up @@ -82,7 +82,7 @@ Commands (requires `uv` and `just`; install `just` with `brew install just`, the
* `just check` - render the demo project and run its lint, tests, docs build, pip-audit, and zizmor (used in CI)
* `just actionlint` - lint the root and template GitHub workflows
* `just zizmor` - audit the root and template GitHub workflows for security issues
* `just git-leaks` - scan staged changes for secrets with gitleaks
* `just betterleaks` - scan staged changes for secrets with betterleaks
* `just prek` - run the git hooks on staged files

### Releases
Expand Down
4 changes: 2 additions & 2 deletions justfile
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@ default:
actionlint:
actionlint .github/workflows/*.yml template/.github/workflows/*.yml
# Scan staged changes for secrets
git-leaks:
gitleaks git --pre-commit --staged --redact
betterleaks:
betterleaks git --pre-commit --staged --redact
# Run the git hooks on staged files
prek:
prek
Expand Down
6 changes: 3 additions & 3 deletions prek.toml
Original file line number Diff line number Diff line change
Expand Up @@ -35,10 +35,10 @@ hooks = [
pass_filenames = false
},
{
id = "git-leaks",
name = "git leaks",
id = "betterleaks",
name = "betterleaks",
language = "system",
entry = "gitleaks git --pre-commit --staged --redact",
entry = "just betterleaks",
pass_filenames = false
}
]
Loading