Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
48 changes: 40 additions & 8 deletions .github/workflows/scorecard-enforcer.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,17 +17,24 @@ concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true

permissions: read-all
permissions:
contents: read

jobs:
# Publish job. The OSSF attestation flow requires that a job invoking
# ossf/scorecard-action with publish_results: true contain ONLY `uses:`
# steps (no `run:`). A `run:` step in this job makes the OSSF publish
# endpoint reject the upload with HTTP 400 ("scorecard job must only have
# steps with `uses`"), failing the whole workflow. Score enforcement is
# therefore split into the separate unprivileged `score-gate` job below.
scorecard:
runs-on: ubuntu-latest
timeout-minutes: 30
timeout-minutes: 15
permissions:
security-events: write
id-token: write # For OIDC
steps:
- uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v4
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
with:
persist-credentials: false

Expand All @@ -39,14 +46,39 @@ jobs:
publish_results: true

- name: Upload SARIF
uses: github/codeql-action/upload-sarif@8aad20d150bbac5944a9f9d289da16a4b0d87c1e # v3
uses: github/codeql-action/upload-sarif@c6f931105cb2c34c8f901cc885ba1e2e259cf745 # v4
with:
sarif_file: results.sarif

# Unprivileged enforcement gate. Re-derives the score read-only (no
# publish, no id-token), so it may legally contain a `run:` step.
# NOTE: uses JSON output deliberately. The SARIF format does NOT carry the
# aggregate score at .runs[0].tool.driver.properties.score (it is absent
# there, so a SARIF-based gate reads the `// 0` fallback and ALWAYS fails
# the < MIN_SCORE check); the JSON format exposes the aggregate at the
# top-level `.score`. publish_results is false here and does not affect the
# computed score, so enforcement behaviour is unchanged.
score-gate:
runs-on: ubuntu-latest
timeout-minutes: 15
permissions:
contents: read
steps:
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
with:
persist-credentials: false

- name: Run Scorecard (analysis only)
uses: ossf/scorecard-action@4eaacf0543bb3f2c246792bd56e8cdeffafb205a # v2.4.3
with:
results_file: results.json
results_format: json
publish_results: false

- name: Check minimum score
run: |
# Parse score from results
SCORE=$(jq -r '.runs[0].tool.driver.properties.score // 0' results.sarif 2>/dev/null || echo "0")
# JSON output carries the aggregate score at the top-level `.score`.
SCORE=$(jq -r '.score // 0' results.json 2>/dev/null || echo "0")

echo "OpenSSF Scorecard Score: $SCORE"

Expand All @@ -61,9 +93,9 @@ jobs:
# Check specific high-priority items
check-critical:
runs-on: ubuntu-latest
timeout-minutes: 30
timeout-minutes: 15
steps:
- uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v4
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2

- name: Check SECURITY.md exists
run: |
Expand Down
2 changes: 1 addition & 1 deletion editors/vscode/README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<!-- SPDX-License-Identifier: MIT OR Apache-2.0 -->
<!-- SPDX-License-Identifier: MPL-2.0 -->
<!-- Copyright (c) Jonathan D.A. Jewell <j.d.a.jewell@open.ac.uk> -->

# Betlang for Visual Studio Code
Expand Down
1 change: 1 addition & 0 deletions wiki/Architecture.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
<!-- SPDX-License-Identifier: MPL-2.0 -->
<!-- Owner: Jonathan D.A. Jewell <j.d.a.jewell@open.ac.uk> -->
<!-- SPDX-FileCopyrightText: 2026 Jonathan D.A. Jewell (hyperpolymath) -->
# Architecture

Expand Down
1 change: 1 addition & 0 deletions wiki/Echo-Types.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
<!-- SPDX-License-Identifier: MPL-2.0 -->
<!-- Owner: Jonathan D.A. Jewell <j.d.a.jewell@open.ac.uk> -->
<!-- SPDX-FileCopyrightText: 2026 Jonathan D.A. Jewell (hyperpolymath) -->
# Echo Types — Structured Loss as a Typed Object

Expand Down
1 change: 1 addition & 0 deletions wiki/Formal-Verification.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
<!-- SPDX-License-Identifier: MPL-2.0 -->
<!-- Owner: Jonathan D.A. Jewell <j.d.a.jewell@open.ac.uk> -->
<!-- SPDX-FileCopyrightText: 2026 Jonathan D.A. Jewell (hyperpolymath) -->
# Formal Verification — and How BetLang Compares

Expand Down
1 change: 1 addition & 0 deletions wiki/Home.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
<!-- SPDX-License-Identifier: MPL-2.0 -->
<!-- Owner: Jonathan D.A. Jewell <j.d.a.jewell@open.ac.uk> -->
<!-- SPDX-FileCopyrightText: 2026 Jonathan D.A. Jewell (hyperpolymath) -->
# BetLang Wiki

Expand Down
1 change: 1 addition & 0 deletions wiki/Number-Tower.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
<!-- SPDX-License-Identifier: MPL-2.0 -->
<!-- Owner: Jonathan D.A. Jewell <j.d.a.jewell@open.ac.uk> -->
<!-- SPDX-FileCopyrightText: 2026 Jonathan D.A. Jewell (hyperpolymath) -->
# The Uncertainty Number Tower

Expand Down
1 change: 1 addition & 0 deletions wiki/Roadmap.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
<!-- SPDX-License-Identifier: MPL-2.0 -->
<!-- Owner: Jonathan D.A. Jewell <j.d.a.jewell@open.ac.uk> -->
<!-- SPDX-FileCopyrightText: 2026 Jonathan D.A. Jewell (hyperpolymath) -->
# Roadmap

Expand Down
1 change: 1 addition & 0 deletions wiki/Ternary-Semantics.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
<!-- SPDX-License-Identifier: MPL-2.0 -->
<!-- Owner: Jonathan D.A. Jewell <j.d.a.jewell@open.ac.uk> -->
<!-- SPDX-FileCopyrightText: 2026 Jonathan D.A. Jewell (hyperpolymath) -->
# The `bet` Primitive & Ternary Semantics

Expand Down
1 change: 1 addition & 0 deletions wiki/Type-System.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
<!-- SPDX-License-Identifier: MPL-2.0 -->
<!-- Owner: Jonathan D.A. Jewell <j.d.a.jewell@open.ac.uk> -->
<!-- SPDX-FileCopyrightText: 2026 Jonathan D.A. Jewell (hyperpolymath) -->
# Type System

Expand Down
Loading