Skip to content

Commit 5cb7f4a

Browse files
committed
security: standardize secret scanning on TruffleHog
1 parent 79aa431 commit 5cb7f4a

17 files changed

Lines changed: 25 additions & 122 deletions

.github/workflows/bench.yml

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,14 +2,11 @@
22
# Presswerk — Run workspace benchmarks (informational)
33

44
name: Benchmarks
5-
65
on:
76
push:
87
branches: [main]
9-
108
permissions:
119
contents: read
12-
1310
jobs:
1411
bench:
1512
name: Run Benchmarks
@@ -19,11 +16,9 @@ jobs:
1916
- uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4
2017
- uses: dtolnay/rust-toolchain@4be9e76fd7c4901c61fb841f559994984270fce7 # stable
2118
- uses: Swatinem/rust-cache@779680da715d629ac1d338a641029a2f4372abb5 # v2
22-
2319
- name: Install system dependencies
2420
run: |
2521
sudo apt-get update
2622
sudo apt-get install -y libxdo-dev libwebkit2gtk-4.1-dev libgtk-3-dev libayatana-appindicator3-dev libsoup-3.0-dev libjavascriptcoregtk-4.1-dev
27-
2823
- name: Run benchmarks
2924
run: cargo bench --workspace

.github/workflows/casket-pages.yml

Lines changed: 0 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,40 +1,33 @@
11
# SPDX-License-Identifier: MPL-2.0
22
name: GitHub Pages
3-
43
on:
54
push:
65
branches: [main, master]
76
workflow_dispatch:
8-
97
permissions:
108
contents: read
119
pages: write
1210
id-token: write
13-
1411
concurrency:
1512
group: "pages"
1613
cancel-in-progress: false
17-
1814
jobs:
1915
build:
2016
runs-on: ubuntu-latest
2117
timeout-minutes: 15
2218
steps:
2319
- name: Checkout
2420
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4
25-
2621
- name: Checkout casket-ssg
2722
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4
2823
with:
2924
repository: hyperpolymath/casket-ssg
3025
path: .casket-ssg
31-
3226
- name: Setup GHCup
3327
uses: haskell-actions/setup@ec49483bfc012387b227434aba94f59a6ecd0900 # v2
3428
with:
3529
ghc-version: '9.8.2'
3630
cabal-version: '3.10'
37-
3831
- name: Cache Cabal
3932
uses: actions/cache@0057852bfaa89a56745cba8c7296529d2fc39830 # v4
4033
with:
@@ -43,11 +36,9 @@ jobs:
4336
~/.cabal/store
4437
.casket-ssg/dist-newstyle
4538
key: ${{ runner.os }}-casket-${{ hashFiles('.casket-ssg/casket-ssg.cabal') }}
46-
4739
- name: Build casket-ssg
4840
working-directory: .casket-ssg
4941
run: cabal build
50-
5142
- name: Prepare site source
5243
shell: bash
5344
run: |
@@ -90,21 +81,17 @@ jobs:
9081
echo "Project-specific site content can be added later under site/."
9182
} > .site-src/index.md
9283
fi
93-
9484
- name: Build site
9585
run: |
9686
mkdir -p _site
9787
cd .casket-ssg && cabal run casket-ssg -- build ../.site-src ../_site
9888
touch ../_site/.nojekyll
99-
10089
- name: Setup Pages
10190
uses: actions/configure-pages@983d7736d9b0ae728b81ab479565c72886d7745b # v5
102-
10391
- name: Upload artifact
10492
uses: actions/upload-pages-artifact@56afc609e74202658d3ffba0e8f6dda462b719fa # v3
10593
with:
10694
path: '_site'
107-
10895
deploy:
10996
environment:
11097
name: github-pages

.github/workflows/ci.yml

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -2,16 +2,13 @@
22
# Presswerk — Rust CI (build, test, lint, format)
33

44
name: CI
5-
65
on:
76
push:
87
branches: [main]
98
pull_request:
109
branches: [main]
11-
1210
permissions:
1311
contents: read
14-
1512
jobs:
1613
test:
1714
name: Test
@@ -23,20 +20,15 @@ jobs:
2320
with:
2421
components: clippy, rustfmt
2522
- uses: Swatinem/rust-cache@779680da715d629ac1d338a641029a2f4372abb5 # v2
26-
2723
- name: Install system dependencies
2824
run: |
2925
sudo apt-get update
3026
sudo apt-get install -y libxdo-dev libwebkit2gtk-4.1-dev libgtk-3-dev libayatana-appindicator3-dev libsoup-3.0-dev libjavascriptcoregtk-4.1-dev
31-
3227
- name: Check
3328
run: cargo check --workspace
34-
3529
- name: Test (library crates)
3630
run: cargo test -p presswerk-core -p presswerk-security -p presswerk-document -p presswerk-print
37-
3831
- name: Clippy
3932
run: cargo clippy --workspace -- -D warnings
40-
4133
- name: Format check
4234
run: cargo fmt --all -- --check

.github/workflows/codeql.yml

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,25 +1,21 @@
11
# SPDX-License-Identifier: MPL-2.0
22
name: CodeQL Security Analysis
3-
43
on:
54
push:
65
branches: [main, master]
76
pull_request:
87
branches: [main, master]
98
schedule:
109
- cron: '0 6 * * 1'
11-
1210
# Estate guardrail: cancel superseded runs so re-pushes / rebased PR
1311
# updates do not pile up queued runs against the shared account-wide
1412
# Actions concurrency pool. Applied only to read-only check workflows
1513
# (no publish/mutation), so cancelling a superseded run is always safe.
1614
concurrency:
1715
group: ${{ github.workflow }}-${{ github.ref }}
1816
cancel-in-progress: true
19-
2017
permissions:
2118
contents: read
22-
2319
jobs:
2420
analyze:
2521
runs-on: ubuntu-latest
@@ -37,17 +33,14 @@ jobs:
3733
# every repo has). Per hypatia rule `codeql_language_matrix_mismatch`.
3834
- language: actions
3935
build-mode: none
40-
4136
steps:
4237
- name: Checkout
4338
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
44-
4539
- name: Initialize CodeQL
4640
uses: github/codeql-action/init@c6f931105cb2c34c8f901cc885ba1e2e259cf745 # v3
4741
with:
4842
languages: ${{ matrix.language }}
4943
build-mode: ${{ matrix.build-mode }}
50-
5144
- name: Perform CodeQL Analysis
5245
uses: github/codeql-action/analyze@c6f931105cb2c34c8f901cc885ba1e2e259cf745 # v3
5346
with:

.github/workflows/dependabot-automerge.yml

Lines changed: 2 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -35,30 +35,25 @@
3535
# bumps for dependabot/fetch-metadata flow through the same path.
3636

3737
name: Dependabot Auto-Merge
38-
3938
on:
4039
pull_request:
4140
types: [opened, reopened, synchronize]
42-
4341
permissions:
44-
contents: write # needed to enable auto-merge
45-
pull-requests: write # needed to approve
42+
contents: write # needed to enable auto-merge
43+
pull-requests: write # needed to approve
4644
# NB: keep narrow — do NOT add secrets: read or id-token: write here.
47-
4845
jobs:
4946
automerge:
5047
# Only run for PRs actually authored by Dependabot.
5148
if: github.actor == 'dependabot[bot]' && github.event.pull_request.user.login == 'dependabot[bot]'
5249
runs-on: ubuntu-latest
5350
timeout-minutes: 15
54-
5551
steps:
5652
- name: Fetch Dependabot metadata
5753
id: meta
5854
uses: dependabot/fetch-metadata@dbb049abf0d677abbd7f7eee0375145b417fdd34 # v2.2.0
5955
with:
6056
github-token: ${{ secrets.GITHUB_TOKEN }}
61-
6257
# --- Policy gate -------------------------------------------------------
6358
# Outputs from fetch-metadata we care about:
6459
# update-type → version-update:semver-{patch,minor,major}
@@ -107,7 +102,6 @@ jobs:
107102
echo "security=$is_security" >> "$GITHUB_OUTPUT"
108103
echo "update_type=$UPDATE_TYPE" >> "$GITHUB_OUTPUT"
109104
echo "ghsa=$GHSA_ID" >> "$GITHUB_OUTPUT"
110-
111105
- name: Approve PR (if policy allows)
112106
if: steps.policy.outputs.action == 'automerge'
113107
env:
@@ -116,15 +110,13 @@ jobs:
116110
run: |
117111
gh pr review --approve "$PR_URL" \
118112
--body "Auto-approving Dependabot security update (${{ steps.policy.outputs.ghsa }}, ${{ steps.policy.outputs.update_type }}). Policy: low/moderate security patches/minors only."
119-
120113
- name: Enable auto-merge (if policy allows)
121114
if: steps.policy.outputs.action == 'automerge'
122115
env:
123116
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
124117
PR_URL: ${{ github.event.pull_request.html_url }}
125118
run: |
126119
gh pr merge --auto --squash "$PR_URL"
127-
128120
- name: Write decision to step summary
129121
env:
130122
ACTION: ${{ steps.policy.outputs.action }}

.github/workflows/governance.yml

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -11,24 +11,20 @@
1111
# (rust-ci, codeql, dependabot, release, scan/mirror/pages plumbing).
1212

1313
name: Governance
14-
1514
on:
1615
push:
1716
branches: [main, master]
1817
pull_request:
1918
workflow_dispatch:
20-
2119
# Estate guardrail: cancel superseded runs so re-pushes / rebased PR
2220
# updates do not pile up queued runs against the shared account-wide
2321
# Actions concurrency pool. Applied only to read-only check workflows
2422
# (no publish/mutation), so cancelling a superseded run is always safe.
2523
concurrency:
2624
group: ${{ github.workflow }}-${{ github.ref }}
2725
cancel-in-progress: true
28-
2926
permissions:
3027
contents: read
31-
3228
jobs:
3329
governance:
3430
uses: hyperpolymath/standards/.github/workflows/governance-reusable.yml@861b5e911d9e5dcfb3c0ab3dd2a9a3c8fd0a1613

.github/workflows/hypatia-scan.yml

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@
33
# See standards#191 for the reusable's purpose and design.
44

55
name: Hypatia Security Scan
6-
76
on:
87
push:
98
branches: [main, master, develop]
@@ -12,17 +11,14 @@ on:
1211
schedule:
1312
- cron: '0 0 * * 0'
1413
workflow_dispatch:
15-
1614
# Estate guardrail: cancel superseded runs so re-pushes don't pile up.
1715
concurrency:
1816
group: ${{ github.workflow }}-${{ github.ref }}
1917
cancel-in-progress: true
20-
2118
permissions:
2219
contents: read
2320
security-events: write
2421
pull-requests: write
25-
2622
jobs:
2723
hypatia:
2824
uses: hyperpolymath/standards/.github/workflows/hypatia-scan-reusable.yml@6cd3772824e59c8c9affeab66061e25383544242

.github/workflows/mirror.yml

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,11 @@
11
# SPDX-License-Identifier: MPL-2.0
22
name: Mirror to Git Forges
3-
43
on:
54
push:
65
branches: [main]
76
workflow_dispatch:
8-
97
permissions:
108
contents: read
11-
129
jobs:
1310
mirror:
1411
uses: hyperpolymath/standards/.github/workflows/mirror-reusable.yml@e6b2884722350515934d443daf23442f2195796f

.github/workflows/release.yml

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -2,14 +2,11 @@
22
# Presswerk — Build release binary and create GitHub Release on tag push
33

44
name: Release
5-
65
on:
76
push:
87
tags:
98
- "v*"
10-
119
permissions: write-all
12-
1310
jobs:
1411
build-linux:
1512
name: Build (x86_64-unknown-linux-gnu)
@@ -21,42 +18,35 @@ jobs:
2118
with:
2219
targets: x86_64-unknown-linux-gnu
2320
- uses: Swatinem/rust-cache@779680da715d629ac1d338a641029a2f4372abb5 # v2
24-
2521
- name: Install system dependencies
2622
run: |
2723
sudo apt-get update
2824
sudo apt-get install -y libxdo-dev libwebkit2gtk-4.1-dev libgtk-3-dev libayatana-appindicator3-dev libsoup-3.0-dev libjavascriptcoregtk-4.1-dev
29-
3025
- name: Build release binary
3126
run: cargo build --release --target x86_64-unknown-linux-gnu -p presswerk-app
32-
3327
- name: Package binary
3428
run: |
3529
mkdir -p dist
3630
cp target/x86_64-unknown-linux-gnu/release/presswerk-app dist/presswerk-linux-x86_64
3731
chmod +x dist/presswerk-linux-x86_64
38-
3932
- name: Upload artifact
4033
uses: actions/upload-artifact@ea165f8d65b6db9a8b71b5c2d1a090c0daf9c8bb # v4
4134
with:
4235
name: presswerk-linux-x86_64
4336
path: dist/presswerk-linux-x86_64
4437
retention-days: 7
45-
4638
create-release:
4739
name: Create GitHub Release
4840
runs-on: ubuntu-latest
4941
timeout-minutes: 15
5042
needs: build-linux
5143
steps:
5244
- uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4
53-
5445
- name: Download artifacts
5546
uses: actions/download-artifact@d3f86a106a0bac45b974a628896c90dbdf5c8093 # v4
5647
with:
5748
name: presswerk-linux-x86_64
5849
path: dist/
59-
6050
- name: Create release
6151
uses: softprops/action-gh-release@a06a81a03ee405af7f2048a818ed3f03bbf83c7b # v2
6252
with:

.github/workflows/rust-ci.yml

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,15 +3,12 @@
33
# hyperpolymath/standards. Configure once, propagate everywhere.
44
# See: docs/CI-REUSABLE-WORKFLOWS.adoc in standards.
55
name: Rust CI
6-
76
on:
87
push:
98
branches: [main, master]
109
pull_request:
11-
1210
permissions:
1311
contents: read
14-
1512
jobs:
1613
rust-ci:
1714
uses: hyperpolymath/standards/.github/workflows/rust-ci-reusable.yml@cc5a372af1af1b202c17f1b21efd954e6c038bef

0 commit comments

Comments
 (0)