2 Commits
Author SHA1 Message Date
tthandClaude Opus 5.5 67a711fe3c gitleaks: fetch the parent of a single scanned commit in shallow checkouts (v3)
A dispatch or cron run has no before-sha, so one commit is scanned; in a
depth-1 checkout it has no parent and gitleaks diffed it as a root commit,
reporting the whole tree (corescope: 3 upstream files).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-25 19:34:32 +01:00
tthandClaude Opus 5.5 9591a27e59 README: dot-free version tags (runner mangles v1.2), v2
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-25 19:09:45 +01:00
2 changed files with 17 additions and 4 deletions

No files matched your search

+9 -3
View File
@@ -32,7 +32,7 @@ the git-tracked files plus lockfiles generated in the job (also gitignored
ones like Flutter's `pubspec.lock`), so run it after the dependency fetch:
```yaml
- uses: https://git.rfa.cz/tth-pub/ci-actions/trivy-gate@v1.1
- uses: https://git.rfa.cz/tth-pub/ci-actions/trivy-gate@v2
with:
scan-type: fs
```
@@ -78,7 +78,7 @@ other IaC in the tree. These findings are reported (HIGH/CRITICAL by
default) and never block.
```yaml
- uses: https://git.rfa.cz/tth-pub/ci-actions/trivy-gate@v1.2
- uses: https://git.rfa.cz/tth-pub/ci-actions/trivy-gate@v2
with:
scan-type: fs
scanners: misconfig
@@ -94,7 +94,13 @@ default rules apply with test files and fixtures allowlisted. The release
binary is verified by SHA-256.
```yaml
- uses: https://git.rfa.cz/tth-pub/ci-actions/gitleaks@v1.2
- uses: https://git.rfa.cz/tth-pub/ci-actions/gitleaks@v2
with:
mode: block # or warn
```
## Versions
`v1` image gate + SBOM; `v2` fs scans, binary runtime, misconfig, gitleaks;
`v3` gitleaks fetches the parent of a single commit in a depth-1 checkout
(dispatch/cron runs scanned the whole tree as a root commit before).
+8 -1
View File
@@ -83,7 +83,14 @@ runs:
opts="--first-parent --diff-merges=off $BEFORE..$SHA"
fi
fi
[ -n "$opts" ] || opts="--diff-merges=off -1 ${SHA:-HEAD}"
if [ -z "$opts" ]; then
# One commit (dispatch/cron). In a depth-1 checkout it has no
# parent and would be diffed as a root commit, i.e. the whole
# tree (upstream files of a fork included): fetch its parent.
head="${SHA:-HEAD}"
git rev-parse -q --verify "$head^" >/dev/null 2>&1 || git fetch -q --deepen=1 origin 2>/dev/null || true
opts="--diff-merges=off -1 $head"
fi
fi
if [ -n "$CONFIG" ] && [ -f "$CONFIG" ]; then
cfg=(--config "$CONFIG")