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
8 changes: 7 additions & 1 deletion .github/workflows/build-app.yml
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,8 @@ jobs:
BOL_ALLOW_PARTIAL_ARTIFACTS: ${{ vars.BOL_ALLOW_PARTIAL_ARTIFACTS }}
steps:
- uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4
with:
persist-credentials: false

- name: Install the packaging toolchain
run: |
Expand Down Expand Up @@ -158,6 +160,8 @@ jobs:
GH_TOKEN: ${{ github.token }}
steps:
- uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4
with:
persist-credentials: false
- name: Download the built artifacts
uses: actions/download-artifact@d3f86a106a0bac45b974a628896c90dbdf5c8093 # v4
with:
Expand All @@ -176,6 +180,8 @@ jobs:
dist/BedrockOnLinux-*-inputs.sha256

- name: Compute release metadata + bill of materials
env:
CHANNEL_INPUT: ${{ inputs.channel }}
run: |
ver="$(grep -m1 '^VERSION = ' bol/config.py | cut -d'"' -f2)"
eng_rev="$(grep -m1 '^WINEGDK_BUILD_REV = ' bol/config.py | cut -d'"' -f2)"
Expand All @@ -185,7 +191,7 @@ jobs:
xcurl_rev="$(grep -m1 '^OPENSSL_XCURL_REV = ' bol/config.py | cut -d'"' -f2)"
vkd3d_hashes="$(grep -m1 '^VKD3D_OUTPUT_HASHES_SHA256=' \
third_party/vkd3d-proton-universal/provenance.env | cut -d= -f2 | tr -d "'\"")"
channel="${{ inputs.channel || 'release' }}"
channel="${CHANNEL_INPUT:-release}"
if [ "$channel" = "nightly" ]; then
# Rolling nightly: one release/tag, moved to HEAD each run (see the
# "Roll the nightly tag" step). Date + short commit in the name give
Expand Down
2 changes: 2 additions & 0 deletions .github/workflows/build-engine.yml
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,8 @@ jobs:
GH_TOKEN: ${{ github.token }}
steps:
- uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4
with:
persist-credentials: false

- name: Install packaging tools
run: |
Expand Down
2 changes: 2 additions & 0 deletions .github/workflows/build-vkd3d.yml
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,8 @@ jobs:
sha256: ${{ steps.pack.outputs.sha256 }}
steps:
- uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4
with:
persist-credentials: false

- name: Build universal vkd3d-proton in a pinned Trixie container
run: |
Expand Down
2 changes: 2 additions & 0 deletions .github/workflows/build-winegdk.yml
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,8 @@ jobs:
short: ${{ steps.pack.outputs.short }}
steps:
- uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4
with:
persist-credentials: false

- name: Prepare work area on the large /mnt volume
run: |
Expand Down
2 changes: 2 additions & 0 deletions .github/workflows/build-xcurl.yml
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,8 @@ jobs:
rev: ${{ steps.build.outputs.rev }}
steps:
- uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4
with:
persist-credentials: false

- name: Build the set from source in a pinned Trixie container
run: |
Expand Down
14 changes: 14 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,8 @@ jobs:
timeout-minutes: 15
steps:
- uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4
with:
persist-credentials: false
- name: Run the test suite
run: |
python3 -m venv .venv
Expand All @@ -34,6 +36,8 @@ jobs:
timeout-minutes: 15
steps:
- uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4
with:
persist-credentials: false

- name: Byte-compile the package
run: python3 -m compileall -q bol
Expand All @@ -54,6 +58,14 @@ jobs:
tar -xzf actionlint.tar.gz actionlint
./actionlint -color

- name: Lint Python (ruff, pyflakes rules)
run: pipx run --spec 'ruff==0.14.3' ruff check --select F bol/ tests/

- name: Audit the workflows (zizmor)
env:
GH_TOKEN: ${{ github.token }}
run: pipx run --spec 'zizmor==1.5.2' zizmor --persona=regular .github/workflows/

cryptbase:
# Wine runtime test for the from-source cryptbase RNG stub: proves
# SystemFunction036 returns varied random bytes and does not recurse to a
Expand All @@ -62,6 +74,8 @@ jobs:
timeout-minutes: 15
steps:
- uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4
with:
persist-credentials: false
- name: Run scripts/test-cryptbase.sh in a pinned Trixie container
run: |
docker run --rm -v "$PWD:/repo" -w /repo \
Expand Down
62 changes: 62 additions & 0 deletions .github/workflows/codeql.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,62 @@
# CodeQL static analysis for the Python launcher and the native C sources
# (the DLL injector, the cryptbase RNG stub, and the XCurl CA shim: the
# highest-risk code in the tree). Python needs no build; the C sources are
# cross-compiled with mingw between init and analyze so the extractor observes
# them. Results surface in the repository's code-scanning tab.
name: CodeQL

on:
push:
branches: [main]
pull_request:
schedule:
- cron: "0 8 * * 1" # weekly, Monday ~08:00 UTC

permissions:
contents: read

concurrency:
group: codeql-${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true

jobs:
analyze:
name: Analyze (${{ matrix.language }})
runs-on: ubuntu-24.04
timeout-minutes: 30
permissions:
security-events: write
contents: read
strategy:
fail-fast: false
matrix:
include:
- language: python
build-mode: none
- language: c-cpp
build-mode: manual
steps:
- uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4
with:
persist-credentials: false

- name: Initialize CodeQL
uses: github/codeql-action/init@4187e74d05793876e9989daffde9c3e66b4acd07 # v3
with:
languages: ${{ matrix.language }}
build-mode: ${{ matrix.build-mode }}

- name: Build the native C sources for the extractor
if: matrix.build-mode == 'manual'
run: |
sudo apt-get update
sudo apt-get install -y --no-install-recommends gcc-mingw-w64-x86-64
CC=x86_64-w64-mingw32-gcc
"$CC" -c -O2 -mrdrnd src/cryptbase-stub.c -o "$RUNNER_TEMP/cryptbase.o"
"$CC" -c -O2 src/xcurl-cashim.c -o "$RUNNER_TEMP/xcurl-cashim.o"
"$CC" -c -O2 src/injector.c -o "$RUNNER_TEMP/injector.o"

- name: Perform CodeQL analysis
uses: github/codeql-action/analyze@4187e74d05793876e9989daffde9c3e66b4acd07 # v3
with:
category: "/language:${{ matrix.language }}"
9 changes: 7 additions & 2 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -54,13 +54,18 @@ jobs:
publish: ${{ steps.probe.outputs.publish }}
steps:
- uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4
with:
persist-credentials: false

- name: Resolve pins and decide reuse-or-build per tier
id: probe
env:
FORCE_REBUILD: ${{ inputs.force_rebuild }}
PUBLISH_INPUT: ${{ inputs.publish }}
run: |
set -euo pipefail
repo="${{ github.repository }}"
force="${{ inputs.force_rebuild || 'false' }}"
force="${FORCE_REBUILD:-false}"
cfg=bol/config.py
xrev="$(grep -m1 '^OPENSSL_XCURL_REV = ' $cfg | cut -d'"' -f2)"
xsha="$(grep -m1 '^OPENSSL_XCURL_ARCHIVE_SHA256 = ' $cfg | cut -d'"' -f2)"
Expand Down Expand Up @@ -94,7 +99,7 @@ jobs:
if [ "${{ github.event_name }}" = "schedule" ]; then
channel=nightly; publish=true
else
channel=release; publish="${{ inputs.publish }}"
channel=release; publish="$PUBLISH_INPUT"
fi
{
echo "build_xcurl=$bx"
Expand Down
1 change: 0 additions & 1 deletion tests/test_auth_settings.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
# SPDX-License-Identifier: MIT

import json
import os
import stat
import tempfile
import unittest
Expand Down
Loading