Skip to content

Commit 0c37f28

Browse files
committed
security: standardize secret scanning on TruffleHog
1 parent 8bccc69 commit 0c37f28

690 files changed

Lines changed: 1426 additions & 10762 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.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/governance.yml

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,16 +11,13 @@
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
permissions:
2220
contents: read
23-
2421
jobs:
2522
governance:
2623
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/instant-sync.yml

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,13 @@
11
# SPDX-License-Identifier: MPL-2.0
22
# Instant Forge Sync - Triggers propagation to all forges on push/release
33
name: Instant Sync
4-
54
on:
65
push:
76
branches: [main, master]
87
release:
98
types: [published]
10-
119
permissions:
1210
contents: read
13-
1411
jobs:
1512
dispatch:
1613
runs-on: ubuntu-latest
@@ -29,6 +26,5 @@ jobs:
2926
"sha": "${{ github.sha }}",
3027
"forges": ""
3128
}
32-
3329
- name: Confirm
3430
run: echo "::notice::Propagation triggered for ${{ github.event.repository.name }}"

.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/scorecard-enforcer.yml

Lines changed: 2 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,25 +1,21 @@
11
# SPDX-License-Identifier: MPL-2.0
22
# Prevention workflow - runs OpenSSF Scorecard and fails on low scores
33
name: OpenSSF Scorecard Enforcer
4-
54
on:
65
push:
76
branches: [main]
87
schedule:
9-
- cron: '0 6 * * 1' # Weekly on Monday
8+
- cron: '0 6 * * 1' # Weekly on Monday
109
workflow_dispatch:
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
# The OSSF Scorecard publish endpoint enforces a hard contract: the job that
2521
# runs `ossf/scorecard-action` with `publish_results: true` must contain
@@ -36,31 +32,27 @@ jobs:
3632
timeout-minutes: 15
3733
permissions:
3834
security-events: write
39-
id-token: write # For OIDC
35+
id-token: write # For OIDC
4036
steps:
4137
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
4238
with:
4339
persist-credentials: false
44-
4540
- name: Run Scorecard
4641
uses: ossf/scorecard-action@4eaacf0543bb3f2c246792bd56e8cdeffafb205a # v2.4.3
4742
with:
4843
results_file: results.sarif
4944
results_format: sarif
5045
publish_results: true
51-
5246
- name: Upload SARIF
5347
uses: github/codeql-action/upload-sarif@c6f931105cb2c34c8f901cc885ba1e2e259cf745 # v4
5448
with:
5549
sarif_file: results.sarif
56-
5750
- name: Persist SARIF for downstream score-gate job
5851
uses: actions/upload-artifact@330a01c490aca151604b8cf639adc76d48f6c5d4 # v5.0.0
5952
with:
6053
name: scorecard-results
6154
path: results.sarif
6255
retention-days: 1
63-
6456
check-score:
6557
needs: scorecard
6658
runs-on: ubuntu-latest
@@ -72,7 +64,6 @@ jobs:
7264
uses: actions/download-artifact@018cc2cf5baa6db3ef3c5f8a56943fffe632ef53 # v5.0.0
7365
with:
7466
name: scorecard-results
75-
7667
- name: Check minimum score
7768
run: |
7869
SCORE=$(jq -r '.runs[0].tool.driver.properties.score // 0' results.sarif 2>/dev/null || echo "0")
@@ -86,21 +77,18 @@ jobs:
8677
echo "::error::Scorecard score $SCORE is below minimum $MIN_SCORE"
8778
exit 1
8879
fi
89-
9080
# Check specific high-priority items
9181
check-critical:
9282
runs-on: ubuntu-latest
9383
timeout-minutes: 15
9484
steps:
9585
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
96-
9786
- name: Check SECURITY.md exists
9887
run: |
9988
if [ ! -f "SECURITY.md" ]; then
10089
echo "::error::SECURITY.md is required"
10190
exit 1
10291
fi
103-
10492
- name: Check for pinned dependencies
10593
run: |
10694
# Check workflows for unpinned actions
Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,26 @@
11
# SPDX-License-Identifier: MPL-2.0
22
name: Secret Scanner
3-
43
on:
54
pull_request:
65
push:
76
branches: [main]
8-
97
concurrency:
108
group: ${{ github.workflow }}-${{ github.ref }}
119
cancel-in-progress: true
12-
1310
permissions:
1411
contents: read
15-
1612
jobs:
1713
scan:
1814
uses: hyperpolymath/standards/.github/workflows/secret-scanner-reusable.yml@3e4bd4c93911750727e2e4c66dff859e00079da0
1915
timeout-minutes: 10
2016
secrets: inherit
17+
trufflehog:
18+
runs-on: ubuntu-latest
19+
steps:
20+
- uses: actions/checkout@v4
21+
with:
22+
fetch-depth: 0
23+
- name: TruffleHog Secret Scan
24+
uses: trufflesecurity/trufflehog@main
25+
with:
26+
extra_args: --only-verified --fail

.machine_readable/contractiles/Justfile

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -109,3 +109,6 @@ crg-badge:
109109
D) color="orange" ;; E) color="red" ;; F) color="critical" ;; \
110110
*) color="lightgrey" ;; esac; \
111111
echo "[![CRG $$grade](https://img.shields.io/badge/CRG-$$grade-$$color?style=flat-square)](https://github.com/hyperpolymath/standards/tree/main/component-readiness-grades)"
112+
113+
secret-scan-trufflehog:
114+
@command -v trufflehog >/dev/null && trufflehog filesystem . --only-verified || true

Justfile

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -109,3 +109,6 @@ crg-badge:
109109
D) color="orange" ;; E) color="red" ;; F) color="critical" ;; \
110110
*) color="lightgrey" ;; esac; \
111111
echo "[![CRG $$grade](https://img.shields.io/badge/CRG-$$grade-$$color?style=flat-square)](https://github.com/hyperpolymath/standards/tree/main/component-readiness-grades)"
112+
113+
secret-scan-trufflehog:
114+
@command -v trufflehog >/dev/null && trufflehog filesystem . --only-verified || true

0 commit comments

Comments
 (0)