Skip to content

Commit c158dd2

Browse files
committed
security: standardize secret scanning on TruffleHog
1 parent 2835bc9 commit c158dd2

21 files changed

Lines changed: 40 additions & 133 deletions

.github/workflows/cargo-audit.yml

Lines changed: 1 addition & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
# SPDX-License-Identifier: MPL-2.0
22
# Prevention workflow - audits Rust dependencies for vulnerabilities
33
name: Cargo Audit
4-
54
on:
65
push:
76
branches: [main]
@@ -13,26 +12,20 @@ on:
1312
- '**/Cargo.toml'
1413
- '**/Cargo.lock'
1514
schedule:
16-
- cron: '0 6 * * 1' # Weekly on Monday
17-
15+
- cron: '0 6 * * 1' # Weekly on Monday
1816
permissions: read-all
19-
2017
jobs:
2118
audit:
2219
runs-on: ubuntu-latest
2320
timeout-minutes: 15
2421
steps:
2522
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4
26-
2723
- name: Install cargo-audit
2824
run: cargo install cargo-audit --locked
29-
3025
- name: Run cargo audit
3126
run: cargo audit --deny warnings
32-
3327
- name: Check for unmaintained crates
3428
run: cargo audit --deny unmaintained
35-
3629
# Optional: Create issues for vulnerabilities
3730
create-issue:
3831
runs-on: ubuntu-latest
@@ -43,7 +36,6 @@ jobs:
4336
issues: write
4437
steps:
4538
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4
46-
4739
- name: Create vulnerability issue
4840
env:
4941
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}

.github/workflows/casket-pages.yml

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,36 +1,29 @@
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: Setup Pages
2722
uses: actions/configure-pages@983d7736d9b0ae728b81ab479565c72886d7745b # v5
28-
2923
- name: Upload artifact
3024
uses: actions/upload-pages-artifact@56afc609e74202658d3ffba0e8f6dda462b719fa # v3
3125
with:
3226
path: '.'
33-
3427
deploy:
3528
environment:
3629
name: github-pages

.github/workflows/cflite_batch.yml

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,10 +4,8 @@ on:
44
schedule:
55
- cron: '0 3 * * 0'
66
workflow_dispatch:
7-
87
permissions:
98
contents: read
10-
119
jobs:
1210
BatchFuzzing:
1311
runs-on: ubuntu-latest
@@ -23,7 +21,6 @@ jobs:
2321
with:
2422
language: rust
2523
sanitizer: ${{ matrix.sanitizer }}
26-
2724
- name: Run Fuzzers (${{ matrix.sanitizer }})
2825
id: run
2926
uses: google/clusterfuzzlite/actions/run_fuzzers@884713a6c30a92e5e8544c39945cd7cb630abcd1 # v1

.github/workflows/cflite_pr.yml

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,10 +3,8 @@ name: ClusterFuzzLite PR fuzzing
33
on:
44
pull_request:
55
branches: [main]
6-
76
permissions:
87
contents: read
9-
108
jobs:
119
PR:
1210
runs-on: ubuntu-latest
@@ -22,7 +20,6 @@ jobs:
2220
with:
2321
language: rust
2422
sanitizer: ${{ matrix.sanitizer }}
25-
2623
- name: Run Fuzzers (${{ matrix.sanitizer }})
2724
id: run
2825
uses: google/clusterfuzzlite/actions/run_fuzzers@884713a6c30a92e5e8544c39945cd7cb630abcd1 # v1

.github/workflows/codeql.yml

Lines changed: 1 addition & 8 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:
10-
- cron: '0 6 1 * *'
11-
9+
- cron: '0 6 * * 1'
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
@@ -36,17 +32,14 @@ jobs:
3632
# codeql_language_matrix_mismatch.
3733
- language: actions
3834
build-mode: none
39-
4035
steps:
4136
- name: Checkout
4237
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
43-
4438
- name: Initialize CodeQL
4539
uses: github/codeql-action/init@c6f931105cb2c34c8f901cc885ba1e2e259cf745 # v3
4640
with:
4741
languages: ${{ matrix.language }}
4842
build-mode: ${{ matrix.build-mode }}
49-
5043
- name: Perform CodeQL Analysis
5144
uses: github/codeql-action/analyze@c6f931105cb2c34c8f901cc885ba1e2e259cf745 # v3
5245
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/generator-generic-ossf-slsa3-publish.yml

Lines changed: 4 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -13,34 +13,29 @@
1313

1414
permissions:
1515
contents: read
16-
1716
name: SLSA generic generator
1817
on:
1918
workflow_dispatch:
2019
release:
2120
types: [created]
22-
2321
jobs:
2422
build:
2523
runs-on: ubuntu-latest
2624
timeout-minutes: 15
2725
outputs:
2826
digests: ${{ steps.hash.outputs.digests }}
29-
3027
steps:
3128
- uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4
32-
3329
# ========================================================
3430
#
3531
# Step 1: Build your artifacts.
3632
#
3733
# ========================================================
3834
- name: Build artifacts
3935
run: |
40-
# These are some amazing artifacts.
41-
echo "artifact1" > artifact1
42-
echo "artifact2" > artifact2
43-
36+
# These are some amazing artifacts.
37+
echo "artifact1" > artifact1
38+
echo "artifact2" > artifact2
4439
# ========================================================
4540
#
4641
# Step 2: Add a step to generate the provenance subjects
@@ -58,11 +53,10 @@ jobs:
5853
files=$(ls artifact*)
5954
# Generate the subjects (base64 encoded).
6055
echo "hashes=$(sha256sum $files | base64 -w0)" >> "${GITHUB_OUTPUT}"
61-
6256
provenance:
6357
needs: [build]
6458
permissions:
65-
actions: read # To read the workflow path.
59+
actions: read # To read the workflow path.
6660
id-token: write # To sign the provenance.
6761
contents: write # To add assets to a release.
6862
uses: slsa-framework/slsa-github-generator/.github/workflows/generator_generic_slsa3.yml@68bad40844440577b33778c9f29077a3388838e9 # v1.4.0

.github/workflows/ghcr-publish.yml

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,30 +1,24 @@
11
# SPDX-License-Identifier: MPL-2.0
22
name: Publish to GHCR
3-
43
permissions:
54
contents: read
6-
75
on:
86
release:
97
types: [published]
108
workflow_dispatch:
11-
129
env:
1310
REGISTRY: ghcr.io
1411
IMAGE_NAME: ${{ github.repository }}
15-
1612
jobs:
1713
build-and-push:
1814
runs-on: ubuntu-latest
1915
timeout-minutes: 15
2016
permissions:
2117
contents: read
2218
packages: write
23-
2419
steps:
2520
- name: Checkout repository
2621
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4
27-
2822
- name: Install nerdctl and containerd
2923
run: |
3024
sudo apt-get update
@@ -39,21 +33,17 @@ jobs:
3933
4034
sudo /usr/local/bin/buildkitd &
4135
sleep 3
42-
4336
- name: Log in to GHCR
4437
run: |
4538
echo "${{ secrets.GITHUB_TOKEN }}" | sudo nerdctl login ghcr.io -u ${{ github.actor }} --password-stdin
46-
4739
- name: Build image
4840
run: |
4941
sudo nerdctl build -f Containerfile -t ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:${{ github.sha }} .
5042
sudo nerdctl tag ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:${{ github.sha }} ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:latest
51-
5243
- name: Push image
5344
run: |
5445
sudo nerdctl push ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:${{ github.sha }}
5546
sudo nerdctl push ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:latest
56-
5747
- name: Tag release version
5848
if: github.event_name == 'release'
5949
run: |

.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

0 commit comments

Comments
 (0)