Skip to content

Commit b7cc58a

Browse files
committed
security: standardize secret scanning on TruffleHog
1 parent 582af10 commit b7cc58a

19 files changed

Lines changed: 21 additions & 157 deletions

.github/workflows/boj-build.yml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,6 @@ jobs:
1111
steps:
1212
- name: Checkout
1313
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
14-
1514
- name: Trigger BoJ Server (Casket/ssg-mcp)
1615
run: |
1716
# Send a secure trigger to boj-server to build this repository

.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/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
@@ -33,17 +29,14 @@ jobs:
3329
include:
3430
- language: javascript-typescript
3531
build-mode: none
36-
3732
steps:
3833
- name: Checkout
3934
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
40-
4135
- name: Initialize CodeQL
4236
uses: github/codeql-action/init@c6f931105cb2c34c8f901cc885ba1e2e259cf745 # v3
4337
with:
4438
languages: ${{ matrix.language }}
4539
build-mode: ${{ matrix.build-mode }}
46-
4740
- name: Perform CodeQL Analysis
4841
uses: github/codeql-action/analyze@c6f931105cb2c34c8f901cc885ba1e2e259cf745 # v3
4942
with:

.github/workflows/container-build.yml

Lines changed: 0 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -1,88 +1,73 @@
11
# SPDX-License-Identifier: MPL-2.0
22
name: Container Build
3-
43
on:
54
push:
65
branches: [main, develop]
76
pull_request:
87
branches: [main]
98
workflow_dispatch:
10-
119
permissions:
1210
contents: read
13-
1411
jobs:
1512
container-build:
1613
runs-on: ubuntu-latest
1714
timeout-minutes: 15
1815
permissions:
1916
contents: read
2017
packages: write
21-
2218
steps:
2319
- name: Checkout
2420
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v4
25-
2621
- name: Set up Podman
2722
run: |
2823
sudo apt-get update
2924
sudo apt-get install -y podman
30-
3125
- name: Build container
3226
run: |
3327
podman build -f .containerization/Containerfile -t fireflag:${{ github.sha }} .
34-
3528
- name: Extract artifacts
3629
run: |
3730
CONTAINER_ID=$(podman create fireflag:${{ github.sha }})
3831
mkdir -p build-output
3932
podman cp $CONTAINER_ID:/build/extension/web-ext-artifacts/ build-output/ || true
4033
podman rm $CONTAINER_ID
41-
4234
- name: Verify checksums
4335
run: |
4436
if [ -f build-output/web-ext-artifacts/SHA256SUMS ]; then
4537
cd build-output/web-ext-artifacts
4638
sha256sum -c SHA256SUMS
4739
fi
48-
4940
- name: Upload extension artifact
5041
uses: actions/upload-artifact@bbbca2ddaa5d8feaa63e36b76fdaad77386f024f # v4
5142
with:
5243
name: fireflag-extension-${{ github.sha }}
5344
path: build-output/web-ext-artifacts/*.xpi
5445
retention-days: 30
55-
5646
- name: Upload checksums
5747
uses: actions/upload-artifact@bbbca2ddaa5d8feaa63e36b76fdaad77386f024f # v4
5848
with:
5949
name: fireflag-checksums-${{ github.sha }}
6050
path: build-output/web-ext-artifacts/SHA256SUMS*
6151
retention-days: 30
62-
6352
reproducibility-check:
6453
runs-on: ubuntu-latest
6554
timeout-minutes: 15
6655
needs: container-build
6756
if: github.event_name == 'pull_request'
68-
6957
steps:
7058
- name: Checkout
7159
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v4
72-
7360
- name: Set up Podman
7461
run: |
7562
sudo apt-get update
7663
sudo apt-get install -y podman
77-
7864
- name: Build container (attempt 1)
7965
run: |
8066
podman build -f .containerization/Containerfile -t fireflag:build1 .
8167
CONTAINER_ID=$(podman create fireflag:build1)
8268
mkdir -p build1
8369
podman cp $CONTAINER_ID:/build/extension/web-ext-artifacts/ build1/ || true
8470
podman rm $CONTAINER_ID
85-
8671
- name: Build container (attempt 2)
8772
run: |
8873
# Clean and rebuild to test reproducibility
@@ -92,7 +77,6 @@ jobs:
9277
mkdir -p build2
9378
podman cp $CONTAINER_ID:/build/extension/web-ext-artifacts/ build2/ || true
9479
podman rm $CONTAINER_ID
95-
9680
- name: Compare builds
9781
run: |
9882
echo "Comparing build artifacts for reproducibility..."
@@ -104,22 +88,18 @@ jobs:
10488
echo "⚠ Builds differ (this is expected currently)"
10589
echo "See .containerization/README.adoc for details"
10690
fi
107-
10891
security-scan:
10992
runs-on: ubuntu-latest
11093
timeout-minutes: 15
11194
needs: container-build
112-
11395
steps:
11496
- name: Checkout
11597
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v4
116-
11798
- name: Download artifact
11899
uses: actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c # v4
119100
with:
120101
name: fireflag-extension-${{ github.sha }}
121102
path: artifacts/
122-
123103
- name: Scan extension archive
124104
run: |
125105
# Unzip and scan contents
@@ -133,7 +113,6 @@ jobs:
133113
echo "Verifying manifest..."
134114
jq empty /tmp/extension/manifest.json
135115
jq '.manifest_version == 3' /tmp/extension/manifest.json
136-
137116
- name: Run TruffleHog
138117
uses: trufflesecurity/trufflehog@37b77001d0174ebec2fcca2bd83ff83a6d45a3ab # v3
139118
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 }}

0 commit comments

Comments
 (0)