Skip to content

Commit 54ef538

Browse files
Merge branch 'main' into ci/repin-standards-reusables-d7c2271
Signed-off-by: Jonathan D.A. Jewell <6759885+hyperpolymath@users.noreply.github.com>
2 parents b775e71 + 98c1b32 commit 54ef538

69 files changed

Lines changed: 1197 additions & 1473 deletions

Some content is hidden

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

.envrc

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,8 +20,9 @@ fi
2020
# Project environment variables
2121
export PROJECT_NAME="Haec"
2222
export RSR_TIER="infrastructure"
23-
# export DATABASE_URL="..."
24-
# export API_KEY="..."
23+
# Project secrets (DATABASE_URL, API_KEY, ...) belong in .env, which is
24+
# gitignored and sourced below. Do not add them here: .envrc is committed,
25+
# and assignment-shaped comments trip secret scanners.
2526

2627
# Source .env if it exists (gitignored)
2728
dotenv_if_exists

.github/0.1-AI-MANIFEST.a2ml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1 +1,3 @@
1+
# SPDX-License-Identifier: MPL-2.0
2+
# SPDX-FileCopyrightText: © 2026 Jonathan D.A. Jewell (hyperpolymath) <j.d.a.jewell@open.ac.uk>
13
# AI Manifest - Level 1: .github

.github/SECURITY.md

Lines changed: 3 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -4,24 +4,6 @@ Copyright (c) Jonathan D.A. Jewell <j.d.a.jewell@open.ac.uk>
44
-->
55
# Security Policy
66

7-
<!--
8-
============================================================================
9-
TEMPLATE INSTRUCTIONS (delete this block before publishing)
10-
============================================================================
11-
Replace all {{PLACEHOLDER}} values with your information:
12-
Haec - Your project name
13-
hyperpolymath - GitHub username or org (e.g., hyperpolymath)
14-
haec - Repository name
15-
j.d.a.jewell@open.ac.uk - Security contact email
16-
{{PGP_FINGERPRINT}} - Your PGP key fingerprint (40 chars, no spaces)
17-
{{PGP_KEY_URL}} - URL to your public PGP key
18-
https://github.com/hyperpolymath/haec - Your website/domain
19-
2026 - Current year for copyright
20-
21-
Optional: Remove sections that don't apply (e.g., PGP if you don't use it)
22-
============================================================================
23-
-->
24-
257
We take security seriously. We appreciate your efforts to responsibly disclose vulnerabilities and will make every effort to acknowledge your contributions.
268

279
## Table of Contents
@@ -56,26 +38,16 @@ This method ensures:
5638
- Coordinated disclosure tooling
5739
- Automatic credit when the advisory is published
5840

59-
### Alternative: Encrypted Email
41+
### Alternative: Email
6042

6143
If you cannot use GitHub Security Advisories, you may email us directly:
6244

6345
| | |
6446
|---|---|
6547
| **Email** | j.d.a.jewell@open.ac.uk |
66-
| **PGP Key** | [Download Public Key]({{PGP_KEY_URL}}) |
67-
| **Fingerprint** | `{{PGP_FINGERPRINT}}` |
68-
69-
```bash
70-
# Import our PGP key
71-
curl -sSL {{PGP_KEY_URL}} | gpg --import
7248

73-
# Verify fingerprint
74-
gpg --fingerprint j.d.a.jewell@open.ac.uk
75-
76-
# Encrypt your report
77-
gpg --armor --encrypt --recipient j.d.a.jewell@open.ac.uk report.txt
78-
```
49+
No PGP key is published for this project. If you need to send an encrypted
50+
report, say so in a first plaintext message and a key will be exchanged.
7951

8052
> **⚠️ Important:** Do not report security vulnerabilities through public GitHub issues, pull requests, discussions, or social media.
8153
@@ -374,7 +346,6 @@ When using Haec, we recommend:
374346

375347
## Additional Resources
376348

377-
- [Our PGP Public Key]({{PGP_KEY_URL}})
378349
- [Security Advisories](https://github.com/hyperpolymath/haec/security/advisories)
379350
- [Changelog](CHANGELOG.md)
380351
- [Contributing Guidelines](CONTRIBUTING.md)

.github/dependabot.yml

Lines changed: 5 additions & 45 deletions
Original file line numberDiff line numberDiff line change
@@ -1,57 +1,17 @@
11
# SPDX-License-Identifier: MPL-2.0
2-
# Dependabot configuration for RSR-compliant repositories
3-
# Covers common ecosystems - remove unused ones for your project
2+
# Dependabot configuration for Haec's current dependency surface.
43

54
version: 2
65
updates:
7-
# GitHub Actions - always include
86
- package-ecosystem: "github-actions"
97
directory: "/"
108
schedule:
119
interval: "weekly"
10+
day: "wednesday"
11+
time: "13:37"
12+
timezone: "Europe/London"
13+
open-pull-requests-limit: 1
1214
groups:
1315
actions:
1416
patterns:
1517
- "*"
16-
17-
# Rust/Cargo
18-
#
19-
# `open-pull-requests-limit: 0` suppresses routine version-update PRs
20-
# (no weekly patch-bump noise) while leaving Dependabot SECURITY PRs
21-
# flowing. Under GitHub's current Dependabot behaviour (2024+), using
22-
# an `ignore:` rule with `version-update:semver-patch` would ALSO
23-
# silence security PRs that happen to be patch-level — historically
24-
# the cause of estate-wide vulns sitting un-PR'd for weeks.
25-
# `open-pull-requests-limit: 0` is the GitHub-endorsed way to say
26-
# "security only, not routine bumps". Pair with the
27-
# dependabot-automerge.yml workflow for low-touch security
28-
# maintenance.
29-
- package-ecosystem: "cargo"
30-
directory: "/"
31-
schedule:
32-
interval: "weekly"
33-
open-pull-requests-limit: 0
34-
35-
# Elixir/Mix
36-
- package-ecosystem: "mix"
37-
directory: "/"
38-
schedule:
39-
interval: "weekly"
40-
41-
# Node.js/npm
42-
- package-ecosystem: "npm"
43-
directory: "/"
44-
schedule:
45-
interval: "weekly"
46-
47-
# Python/pip
48-
- package-ecosystem: "pip"
49-
directory: "/"
50-
schedule:
51-
interval: "weekly"
52-
53-
# Nix flakes
54-
- package-ecosystem: "nix"
55-
directory: "/"
56-
schedule:
57-
interval: "weekly"

.github/workflows/boj-build.yml

Lines changed: 0 additions & 45 deletions
This file was deleted.

.github/workflows/ci.yml

Lines changed: 96 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,96 @@
1+
# SPDX-License-Identifier: MPL-2.0
2+
name: "CI / required"
3+
4+
on:
5+
pull_request:
6+
push:
7+
branches: [main]
8+
workflow_dispatch:
9+
10+
permissions:
11+
contents: read
12+
13+
concurrency:
14+
group: ci-${{ github.event.pull_request.number || github.ref }}
15+
cancel-in-progress: true
16+
17+
jobs:
18+
required:
19+
name: "CI / required"
20+
runs-on: ubuntu-latest
21+
timeout-minutes: 20
22+
container:
23+
# Idris 2 0.8.0, pinned by immutable image digest.
24+
# The digest is the authority; keep the version note in step with it.
25+
image: ghcr.io/stefan-hoeck/idris2-pack@sha256:de9781906050dc44704ec6de0108c86f899ef17b2642932b79e00245d613b8ad
26+
steps:
27+
- name: Checkout
28+
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
29+
30+
# The pinned idris2-pack image is minimal. Two things are missing:
31+
# xz — setup-zig's .tar.xz download dies with "tar: xz: Cannot exec"
32+
# jq — tests/check-examples.sh exits 2 with "jq is required", so the
33+
# Trope IR conformance test never actually ran in CI
34+
- name: Install container prerequisites (xz, jq)
35+
shell: bash
36+
run: |
37+
set -euo pipefail
38+
missing=()
39+
command -v xz >/dev/null 2>&1 || missing+=(xz-utils)
40+
command -v jq >/dev/null 2>&1 || missing+=(jq)
41+
if [ "${#missing[@]}" -gt 0 ]; then
42+
echo "installing: ${missing[*]}"
43+
apt-get update -qq
44+
apt-get install -y -qq --no-install-recommends "${missing[@]}"
45+
fi
46+
xz --version | head -1
47+
jq --version
48+
49+
- name: Set up Zig
50+
uses: goto-bus-stop/setup-zig@abea47f85e598557f500fa1fd2ab7464fcb39406 # v2.2.1
51+
with:
52+
version: 0.15.2
53+
54+
- name: Typecheck the Idris2 ABI
55+
shell: bash
56+
run: |
57+
set -euo pipefail
58+
# Print the version before asserting on it: piping straight into
59+
# `grep -Fx` under `pipefail` made a mismatch fail with no output at
60+
# all, which is what happened here. The pinned image reports a build
61+
# suffix, so match on the release rather than the whole string.
62+
ver="$(idris2 --version)"
63+
echo "idris2 --version -> ${ver}"
64+
case "$ver" in
65+
*"0.8.0"*) ;;
66+
*) echo "::error::expected Idris 2 0.8.0, got: ${ver}"; exit 1 ;;
67+
esac
68+
idris2 --typecheck abi.ipkg
69+
70+
- name: Compile and test the Zig FFI
71+
shell: bash
72+
run: |
73+
set -euo pipefail
74+
zver="$(zig version)"
75+
echo "zig version -> ${zver}"
76+
test "$zver" = '0.15.2' || { echo "::error::expected Zig 0.15.2, got: ${zver}"; exit 1; }
77+
zig fmt --check \
78+
src/interface/ffi/build.zig \
79+
src/interface/ffi/src/main.zig \
80+
src/interface/ffi/test/integration_test.zig
81+
(
82+
cd src/interface/ffi
83+
zig build --summary all
84+
zig build test --summary all
85+
)
86+
87+
- name: Validate repository contracts
88+
shell: bash
89+
run: |
90+
set -euo pipefail
91+
find tests scripts -type f -name '*.sh' -print0 \
92+
| xargs -0 -r bash -n
93+
bash tests/check-examples.sh
94+
bash tests/aspect_tests.sh
95+
bash scripts/check-root-shape.sh .
96+
bash tests/workflows/validate_workflows_test.sh

.github/workflows/codeql.yml

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,9 @@ on:
99
- cron: '0 6 * * 1'
1010
permissions:
1111
contents: read
12+
concurrency:
13+
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
14+
cancel-in-progress: true
1215
jobs:
1316
analyze:
1417
runs-on: ubuntu-latest
@@ -30,13 +33,13 @@ jobs:
3033
build-mode: none
3134
steps:
3235
- name: Checkout
33-
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
36+
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
3437
- name: Initialize CodeQL
35-
uses: github/codeql-action/init@0d579ffd059c29b07949a3cce3983f0780820c98 # v3.28.1
38+
uses: github/codeql-action/init@e4fba868fa4b1b91e1fdab776edc8cfbe6e9fb81 # v3.28.1
3639
with:
3740
languages: ${{ matrix.language }}
3841
build-mode: ${{ matrix.build-mode }}
3942
- name: Perform CodeQL Analysis
40-
uses: github/codeql-action/analyze@0d579ffd059c29b07949a3cce3983f0780820c98 # v3.28.1
43+
uses: github/codeql-action/analyze@e4fba868fa4b1b91e1fdab776edc8cfbe6e9fb81 # v3.28.1
4144
with:
4245
category: "/language:${{ matrix.language }}"

.github/workflows/dependabot-automerge.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ jobs:
5151
steps:
5252
- name: Fetch Dependabot metadata
5353
id: meta
54-
uses: dependabot/fetch-metadata@dbb049abf0d677abbd7f7eee0375145b417fdd34 # v2.2.0
54+
uses: dependabot/fetch-metadata@25dd0e34f4fe68f24cc83900b1fe3fe149efef98 # v3.1.0
5555
with:
5656
github-token: ${{ secrets.GITHUB_TOKEN }}
5757
# --- Policy gate -------------------------------------------------------

0 commit comments

Comments
 (0)