Skip to content
Merged
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
20 changes: 12 additions & 8 deletions .github/workflows/security.yml
Original file line number Diff line number Diff line change
@@ -1,11 +1,7 @@
name: security

on:
workflow_dispatch:
pull_request:
branches:
- main
- release-0.2

permissions:
contents: read
Expand All @@ -23,9 +19,8 @@ jobs:
name: secrets scan
runs-on: ubuntu-latest
steps:
# Full history so the first runs on main and this PR catch historical
# leaks. After that we can switch to a PR-scoped scan if the extra
# clone cost is not worth it.
# Full clone: the pull request scan diffs against the merge base of
# the branch the change targets.
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
fetch-depth: 0
Expand All @@ -41,8 +36,17 @@ jobs:
tar -xzf "${archive}" gitleaks
sudo mv gitleaks /usr/local/bin/gitleaks

# A pull request is scanned only for the commits it adds on top of its
# target branch: the scan range always runs from the merge base of
# that branch to the commit under test, so the history shared between
# the branches is never scanned twice.
- name: Run gitleaks
run: gitleaks detect --source . --redact --verbose
env:
BASE_SHA: ${{ github.event.pull_request.base.sha }}
HEAD_SHA: ${{ github.event.pull_request.head.sha }}
run: >
gitleaks detect --source . --redact --verbose
--log-opts "--no-merges $BASE_SHA..$HEAD_SHA"

poutine:
name: poutine
Expand Down
Loading