Skip to content

Commit 7f27a0f

Browse files
authored
Merge pull request #48 from netresearch/chore/add-secret-and-workflow-scanners
ci: add secret and workflow scanning to security.yml
2 parents 641050d + b5cfb2d commit 7f27a0f

2 files changed

Lines changed: 40 additions & 4 deletions

File tree

.github/workflows/security.yml

Lines changed: 27 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,36 @@
11
name: Security
22

3+
# Aggregated security scans for skill repos: secret scanning (betterleaks),
4+
# workflow static analysis (zizmor), dependency review on PRs, and a composer
5+
# audit (every skill repo ships a composer.json for split-licensing /
6+
# Packagist distribution).
7+
#
8+
# Top-level `permissions: {}` denies everything by default; each reusable
9+
# caller job re-declares the exact union its reusable's jobs require, so the
10+
# token passed to each reusable is fully explicit and never relies on the
11+
# repo default. This is the same pattern proven in netresearch/.github's
12+
# go-app template (top {} + per-job security-events: write).
13+
314
on:
415
push:
5-
branches: [main, master]
16+
branches: [main]
617
pull_request:
7-
branches: [main, master]
18+
branches: [main]
19+
20+
permissions: {}
821

922
jobs:
1023
gitleaks:
1124
uses: netresearch/.github/.github/workflows/gitleaks.yml@main
12-
secrets:
13-
GITLEAKS_LICENSE: ${{ secrets.GITLEAKS_LICENSE }}
25+
permissions:
26+
contents: read
27+
security-events: write
28+
29+
zizmor:
30+
uses: netresearch/.github/.github/workflows/zizmor.yml@main
31+
permissions:
32+
contents: read
33+
security-events: write
1434

1535
dependency-review:
1636
if: github.event_name == 'pull_request'
@@ -21,3 +41,6 @@ jobs:
2141

2242
composer-audit:
2343
uses: netresearch/typo3-ci-workflows/.github/workflows/security.yml@main
44+
permissions:
45+
contents: read
46+
security-events: write

.github/zizmor.yml

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
# zizmor (https://zizmor.sh) configuration
2+
#
3+
# Tunes zizmor to Netresearch conventions so the audit reports only
4+
# actionable findings. Third-party actions remain hash-pin enforced.
5+
rules:
6+
unpinned-uses:
7+
config:
8+
policies:
9+
# First-party reusable workflows track @main by policy and are
10+
# never SHA-pinned, so fixes propagate to all consumers.
11+
"netresearch/*": ref-pin
12+
# Everything else must be pinned to a full commit SHA.
13+
"*": hash-pin

0 commit comments

Comments
 (0)