Skip to content

Commit c04c345

Browse files
security: standardize secret scanning on TruffleHog (#41)
Standardizing on TruffleHog.
2 parents 357b806 + 65139f6 commit c04c345

107 files changed

Lines changed: 1202 additions & 836 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/CODEOWNERS

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
# SPDX-License-Identifier: MPL-2.0
2+
# CODEOWNERS - Define code review assignments for GitHub
3+
# See: https://docs.github.com/en/repositories/managing-your-repositorys-settings-and-features/customizing-your-repository/about-code-owners
4+
5+
# Default: sole maintainer for all files
6+
* @hyperpolymath
7+
8+
# Security-sensitive files require explicit ownership
9+
SECURITY.md @hyperpolymath
10+
.github/workflows/ @hyperpolymath
11+
.machine_readable/ @hyperpolymath
12+
contractiles/ @hyperpolymath
13+
14+
# License files
15+
LICENSE @hyperpolymath
16+
LICENSES/ @hyperpolymath
17+
18+
# Configuration
19+
.gitignore @hyperpolymath
20+
.github/ @hyperpolymath
21+
22+
# Documentation
23+
README* @hyperpolymath
24+
CONTRIBUTING* @hyperpolymath
25+
CODE_OF_CONDUCT* @hyperpolymath
26+
GOVERNANCE* @hyperpolymath
27+
MAINTAINERS* @hyperpolymath
28+
CHANGELOG* @hyperpolymath
29+
ROADMAP* @hyperpolymath
30+
31+
# Build and CI
32+
Justfile @hyperpolymath
33+
Makefile @hyperpolymath
34+
*.sh @hyperpolymath

.github/ISSUE_TEMPLATE/bug_report.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
<!--
2+
SPDX-License-Identifier: MPL-2.0
3+
Copyright (c) Jonathan D.A. Jewell <j.d.a.jewell@open.ac.uk>
4+
-->
15
---
26
name: Bug report
37
about: Create a report to help us improve

.github/ISSUE_TEMPLATE/custom.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
<!--
2+
SPDX-License-Identifier: MPL-2.0
3+
Copyright (c) Jonathan D.A. Jewell <j.d.a.jewell@open.ac.uk>
4+
-->
15
---
26
name: Custom issue template
37
about: Describe this issue template's purpose here.

.github/ISSUE_TEMPLATE/documentation.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
<!--
2+
SPDX-License-Identifier: MPL-2.0
3+
Copyright (c) Jonathan D.A. Jewell <j.d.a.jewell@open.ac.uk>
4+
-->
15
---
26
name: Documentation
37
about: Report unclear, missing, or incorrect documentation

.github/ISSUE_TEMPLATE/feature_request.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
<!--
2+
SPDX-License-Identifier: MPL-2.0
3+
Copyright (c) Jonathan D.A. Jewell <j.d.a.jewell@open.ac.uk>
4+
-->
15
---
26
name: Feature request
37
about: Suggest an idea for this project

.github/ISSUE_TEMPLATE/question.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
<!--
2+
SPDX-License-Identifier: MPL-2.0
3+
Copyright (c) Jonathan D.A. Jewell <j.d.a.jewell@open.ac.uk>
4+
-->
15
---
26
name: Question
37
about: Ask a question about usage or behaviour

.github/copilot/coding-agent.yml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
mcp_servers:
2+
boj-server:
3+
command: npx
4+
args: ["-y", "@hyperpolymath/boj-server@latest"]
5+
env:
6+
BOJ_URL: http://localhost:7700

.github/workflows/codeql.yml

Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
# SPDX-License-Identifier: MPL-2.0
2+
name: CodeQL Security Analysis
3+
on:
4+
push:
5+
branches: [main, master]
6+
pull_request:
7+
branches: [main, master]
8+
schedule:
9+
- cron: '0 6 * * 1'
10+
# Estate guardrail: cancel superseded runs so re-pushes / rebased PR
11+
# updates do not pile up queued runs against the shared account-wide
12+
# Actions concurrency pool. Applied only to read-only check workflows
13+
# (no publish/mutation), so cancelling a superseded run is always safe.
14+
concurrency:
15+
group: ${{ github.workflow }}-${{ github.ref }}
16+
cancel-in-progress: true
17+
permissions:
18+
contents: read
19+
jobs:
20+
analyze:
21+
runs-on: ubuntu-latest
22+
timeout-minutes: 15
23+
permissions:
24+
contents: read
25+
security-events: write
26+
strategy:
27+
fail-fast: false
28+
matrix:
29+
include:
30+
- language: javascript-typescript
31+
build-mode: none
32+
steps:
33+
- name: Checkout
34+
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
35+
- name: Initialize CodeQL
36+
uses: github/codeql-action/init@7211b7c8077ea37d8641b6271f6a365a22a5fbfa # v3
37+
with:
38+
languages: ${{ matrix.language }}
39+
build-mode: ${{ matrix.build-mode }}
40+
- name: Perform CodeQL Analysis
41+
uses: github/codeql-action/analyze@7211b7c8077ea37d8641b6271f6a365a22a5fbfa # v3
42+
with:
43+
category: "/language:${{ matrix.language }}"

.github/workflows/dependabot-automerge.yml

Lines changed: 3 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -35,29 +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
53-
50+
timeout-minutes: 15
5451
steps:
5552
- name: Fetch Dependabot metadata
5653
id: meta
5754
uses: dependabot/fetch-metadata@25dd0e34f4fe68f24cc83900b1fe3fe149efef98 # v3.1.0
5855
with:
5956
github-token: ${{ secrets.GITHUB_TOKEN }}
60-
6157
# --- Policy gate -------------------------------------------------------
6258
# Outputs from fetch-metadata we care about:
6359
# update-type → version-update:semver-{patch,minor,major}
@@ -106,7 +102,6 @@ jobs:
106102
echo "security=$is_security" >> "$GITHUB_OUTPUT"
107103
echo "update_type=$UPDATE_TYPE" >> "$GITHUB_OUTPUT"
108104
echo "ghsa=$GHSA_ID" >> "$GITHUB_OUTPUT"
109-
110105
- name: Approve PR (if policy allows)
111106
if: steps.policy.outputs.action == 'automerge'
112107
env:
@@ -115,15 +110,13 @@ jobs:
115110
run: |
116111
gh pr review --approve "$PR_URL" \
117112
--body "Auto-approving Dependabot security update (${{ steps.policy.outputs.ghsa }}, ${{ steps.policy.outputs.update_type }}). Policy: low/moderate security patches/minors only."
118-
119113
- name: Enable auto-merge (if policy allows)
120114
if: steps.policy.outputs.action == 'automerge'
121115
env:
122116
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
123117
PR_URL: ${{ github.event.pull_request.html_url }}
124118
run: |
125119
gh pr merge --auto --squash "$PR_URL"
126-
127120
- name: Write decision to step summary
128121
env:
129122
ACTION: ${{ steps.policy.outputs.action }}

.github/workflows/dogfood-gate.yml

Lines changed: 5 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -5,24 +5,21 @@
55
# Validates that the repo uses hyperpolymath's own formats and tools.
66
# Companion to static-analysis-gate.yml (security) — this is for format compliance.
77
name: Dogfood Gate
8-
98
on:
109
pull_request:
1110
branches: ['**']
1211
push:
1312
branches: [main, master]
14-
1513
permissions:
1614
contents: read
17-
1815
jobs:
1916
# ---------------------------------------------------------------------------
2017
# Job 1: A2ML manifest validation
2118
# ---------------------------------------------------------------------------
2219
a2ml-validate:
2320
name: Validate A2ML manifests
2421
runs-on: ubuntu-latest
25-
22+
timeout-minutes: 15
2623
steps:
2724
- name: Checkout repository
2825
uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3
@@ -35,14 +32,12 @@ jobs:
3532
if [ "$COUNT" -eq 0 ]; then
3633
echo "::warning::No .a2ml manifest files found. Every RSR repo should have 0-AI-MANIFEST.a2ml"
3734
fi
38-
3935
- name: Validate A2ML manifests
4036
if: steps.detect.outputs.count > 0
4137
uses: hyperpolymath/a2ml-validate-action@59145c7d1039fa3059b3ecacdb50ee23d7505898 # main
4238
with:
4339
path: '.'
4440
strict: 'false'
45-
4641
- name: Write summary
4742
run: |
4843
A2ML_COUNT="${{ steps.detect.outputs.count }}"
@@ -59,14 +54,13 @@ jobs:
5954
echo "" >> "$GITHUB_STEP_SUMMARY"
6055
echo "Scanned **${A2ML_COUNT}** .a2ml file(s). See step output for details." >> "$GITHUB_STEP_SUMMARY"
6156
fi
62-
6357
# ---------------------------------------------------------------------------
6458
# Job 2: K9 contract validation
6559
# ---------------------------------------------------------------------------
6660
k9-validate:
6761
name: Validate K9 contracts
6862
runs-on: ubuntu-latest
69-
63+
timeout-minutes: 15
7064
steps:
7165
- name: Checkout repository
7266
uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3
@@ -83,14 +77,12 @@ jobs:
8377
if [ "$COUNT" -eq 0 ] && [ "$CONFIG_COUNT" -gt 0 ]; then
8478
echo "::warning::Found $CONFIG_COUNT config files but no K9 contracts. Run k9iser to generate contracts."
8579
fi
86-
8780
- name: Validate K9 contracts
8881
if: steps.detect.outputs.k9_count > 0
8982
uses: hyperpolymath/k9-validate-action@2d96f43c538964b097d159ed3a56ba5b5ceca227 # main
9083
with:
9184
path: '.'
9285
strict: 'false'
93-
9486
- name: Write summary
9587
run: |
9688
K9_COUNT="${{ steps.detect.outputs.k9_count }}"
@@ -108,14 +100,13 @@ jobs:
108100
echo "" >> "$GITHUB_STEP_SUMMARY"
109101
echo "Validated **${K9_COUNT}** K9 contract(s) against **${CFG_COUNT}** config file(s)." >> "$GITHUB_STEP_SUMMARY"
110102
fi
111-
112103
# ---------------------------------------------------------------------------
113104
# Job 3: Empty-linter — invisible character detection
114105
# ---------------------------------------------------------------------------
115106
empty-lint:
116107
name: Empty-linter (invisible characters)
117108
runs-on: ubuntu-latest
118-
109+
timeout-minutes: 15
119110
steps:
120111
- name: Checkout repository
121112
uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3
@@ -153,7 +144,6 @@ jobs:
153144
REL_PATH="${filepath#$GITHUB_WORKSPACE/}"
154145
echo "::warning file=${REL_PATH}::Invisible Unicode characters detected (zero-width space, BOM, NBSP, etc.)"
155146
done < /tmp/empty-lint-results.txt
156-
157147
- name: Write summary
158148
run: |
159149
if [ "${{ steps.lint.outputs.ready }}" = "true" ]; then
@@ -172,14 +162,13 @@ jobs:
172162
echo "" >> "$GITHUB_STEP_SUMMARY"
173163
echo "Skipped: empty-linter not available." >> "$GITHUB_STEP_SUMMARY"
174164
fi
175-
176165
# ---------------------------------------------------------------------------
177166
# Job 4: Groove manifest check (for repos that should expose services)
178167
# ---------------------------------------------------------------------------
179168
groove-check:
180169
name: Groove manifest check
181170
runs-on: ubuntu-latest
182-
171+
timeout-minutes: 15
183172
steps:
184173
- name: Checkout repository
185174
uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3
@@ -220,7 +209,6 @@ jobs:
220209
if [ "$HAS_SERVER" = "true" ] && [ "$HAS_MANIFEST" = "false" ] && [ "$HAS_GROOVE_CODE" = "false" ]; then
221210
echo "::warning::This repo has server code but no Groove endpoint. Add .well-known/groove/manifest.json for service discovery."
222211
fi
223-
224212
- name: Write summary
225213
run: |
226214
echo "## Groove Protocol Check" >> "$GITHUB_STEP_SUMMARY"
@@ -230,16 +218,15 @@ jobs:
230218
echo "| Static manifest (.well-known/groove/manifest.json) | ${{ steps.groove.outputs.has_manifest }} |" >> "$GITHUB_STEP_SUMMARY"
231219
echo "| Groove endpoint in code | ${{ steps.groove.outputs.has_groove_code }} |" >> "$GITHUB_STEP_SUMMARY"
232220
echo "| Has HTTP server code | ${{ steps.groove.outputs.has_server }} |" >> "$GITHUB_STEP_SUMMARY"
233-
234221
# ---------------------------------------------------------------------------
235222
# Job 5: Dogfooding summary
236223
# ---------------------------------------------------------------------------
237224
dogfood-summary:
238225
name: Dogfooding compliance summary
239226
runs-on: ubuntu-latest
227+
timeout-minutes: 15
240228
needs: [a2ml-validate, k9-validate, empty-lint, groove-check]
241229
if: always()
242-
243230
steps:
244231
- name: Checkout repository
245232
uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3
@@ -306,4 +293,3 @@ jobs:
306293
*Generated by the [Dogfood Gate](https://github.com/hyperpolymath/rsr-template-repo) workflow.*
307294
*Dogfooding is guinea pig fooding — we test our tools on ourselves.*
308295
EOF
309-

0 commit comments

Comments
 (0)