Record EX-0013 only for QRun-IO/qbit-printing's unmodified H2 2.4.240 binary, with reviewed SHA-256, existing security controls and expiry 2027-04-30. Restore normal required CI and preserve Actions plus JavaScript/TypeScript security-extended coverage in the advanced workflow. Default setup was explicitly disabled to resolve its upload conflict. All required checks and both advanced analyses passed on b8e4debe64040a346c5a0815174a68edc94fed98. Signed-off-by: James Maes <james@kof22.com> Co-Authored-By: Codex (GPT-6) <noreply@openai.com>
214 lines
8.9 KiB
YAML
214 lines
8.9 KiB
YAML
# CI for the standards repository itself: it runs the same reusable gates it
|
|
# publishes (called by local path, so a change is tested before it is released),
|
|
# plus documentation linting and a static self-conformance check.
|
|
name: ci
|
|
|
|
on:
|
|
workflow_call:
|
|
pull_request:
|
|
push:
|
|
branches: [main]
|
|
schedule:
|
|
- cron: "41 6 * * 1"
|
|
workflow_dispatch:
|
|
|
|
permissions: {}
|
|
|
|
concurrency:
|
|
group: ci-${{ github.ref }}
|
|
cancel-in-progress: ${{ github.event_name == 'pull_request' }}
|
|
|
|
jobs:
|
|
pr:
|
|
if: github.event_name == 'pull_request'
|
|
uses: ./.github/workflows/pr.yml
|
|
permissions:
|
|
contents: read
|
|
pull-requests: read # list the pull request commits for the DCO check
|
|
|
|
security:
|
|
uses: ./.github/workflows/security.yml
|
|
permissions:
|
|
contents: read
|
|
security-events: write # upload SARIF results to code scanning
|
|
|
|
codeql:
|
|
uses: ./.github/workflows/codeql.yml
|
|
permissions:
|
|
contents: read
|
|
security-events: write # upload SARIF results to code scanning
|
|
with:
|
|
languages: '["actions", "javascript-typescript"]'
|
|
|
|
docs:
|
|
name: docs
|
|
runs-on: ubuntu-24.04
|
|
timeout-minutes: 10
|
|
permissions:
|
|
contents: read
|
|
steps:
|
|
- name: Checkout
|
|
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
|
|
with:
|
|
persist-credentials: false
|
|
|
|
- name: markdownlint
|
|
uses: docker://davidanson/markdownlint-cli2:v0.23.3@sha256:d5f3f3f04b2e285dcbcdcd13b4454d119e273e3c393a9dabd163dba4abad526d
|
|
with:
|
|
args: "**/*.md"
|
|
|
|
# Offline mode checks every relative link and anchor between documents, which
|
|
# is deterministic. External URLs are not checked on every change: third-party
|
|
# sites rate-limit and go down, and a gate must not fail for reasons outside
|
|
# the change under review.
|
|
- name: Link check (internal links)
|
|
env:
|
|
LYCHEE_VERSION: 0.24.2
|
|
LYCHEE_SHA256: 1f4e0ef7f6554a6ed33dd7ac144fb2e1bbed98598e7af973042fc5cd43951c9a
|
|
run: |
|
|
set -euo pipefail
|
|
archive="lychee-x86_64-unknown-linux-gnu.tar.gz"
|
|
tool="${RUNNER_TEMP}/lychee"
|
|
mkdir -p "${tool}"
|
|
curl -fsSL -o "${tool}/${archive}" "https://github.com/lycheeverse/lychee/releases/download/lychee-v${LYCHEE_VERSION}/${archive}"
|
|
(cd "${tool}" && echo "${LYCHEE_SHA256} ${archive}" | sha256sum --check --strict)
|
|
# The archive unpacks into a versioned directory with its own README and
|
|
# docs; it is extracted outside the checkout so they are not link-checked.
|
|
tar -xzf "${tool}/${archive}" -C "${tool}"
|
|
"${tool}/lychee-x86_64-unknown-linux-gnu/lychee" --offline --include-fragments --no-progress './**/*.md'
|
|
|
|
conformance:
|
|
name: conformance
|
|
runs-on: ubuntu-24.04
|
|
timeout-minutes: 10
|
|
permissions:
|
|
contents: read
|
|
steps:
|
|
- name: Checkout
|
|
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
|
|
with:
|
|
persist-credentials: false
|
|
|
|
- name: Checker self-test
|
|
shell: pwsh
|
|
run: ./tools/Test-RepoConformance.ps1 -SelfTest
|
|
|
|
- name: Conformance parser fuzzing
|
|
shell: pwsh
|
|
env:
|
|
CI_EVENT_NAME: ${{ github.event_name }}
|
|
CI_REF_TYPE: ${{ github.ref_type }}
|
|
run: |
|
|
$iterations = if ($env:CI_EVENT_NAME -eq 'schedule' -or $env:CI_REF_TYPE -eq 'tag') { 10000 } else { 1000 }
|
|
./tools/Test-RepoConformance.Fuzz.ps1 -Seed 22023 -Iterations $iterations
|
|
./tools/Test-RepoConformance.Fuzz.ps1 -Seed 99173 -Iterations $iterations
|
|
|
|
- name: Standards package tests
|
|
shell: pwsh
|
|
run: ./tools/Test-StandardsPackage.ps1
|
|
|
|
# Static mode reads only the checkout: no API calls, no admin scope needed.
|
|
- name: Static conformance of this repository
|
|
shell: pwsh
|
|
run: ./tools/Test-RepoConformance.ps1 -LocalPath . -StaticOnly
|
|
|
|
windows-signing:
|
|
name: windows-signing
|
|
runs-on: windows-latest
|
|
timeout-minutes: 10
|
|
permissions:
|
|
contents: read
|
|
steps:
|
|
- name: Checkout
|
|
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
|
|
with:
|
|
persist-credentials: false
|
|
- name: Lint and test Windows signing gates
|
|
shell: pwsh
|
|
run: |
|
|
$ErrorActionPreference = 'Stop'
|
|
Install-Module PSScriptAnalyzer -RequiredVersion 1.25.0 -Scope CurrentUser -Force
|
|
Install-Module Pester -RequiredVersion 5.7.1 -Scope CurrentUser -Force
|
|
Import-Module PSScriptAnalyzer -RequiredVersion 1.25.0
|
|
Import-Module Pester -RequiredVersion 5.7.1
|
|
# Keep every configured rule; isolate concurrent command-metadata consumers.
|
|
# https://github.com/PowerShell/PSScriptAnalyzer/issues/1708
|
|
$settings = 'configs/shell/PSScriptAnalyzerSettings.psd1'
|
|
$casingFixture = @(Invoke-ScriptAnalyzer -ScriptDefinition "get-content -literalpath 'fixture.txt'" -Settings $settings -IncludeRule PSUseCorrectCasing)
|
|
if ('PSUseCorrectCasing' -notin $casingFixture.RuleName) { throw 'The casing pass did not detect incorrect casing.' }
|
|
$reservedFixture = @(Invoke-ScriptAnalyzer -ScriptDefinition 'function Get-Fixture? { [CmdletBinding()] param() }; Export-ModuleMember -Function Get-Fixture?' -Settings $settings -IncludeRule PSReservedCmdletChar)
|
|
if ('PSReservedCmdletChar' -notin $reservedFixture.RuleName) { throw 'The reserved-character pass did not detect the exported function.' }
|
|
$remainingFixture = @(Invoke-ScriptAnalyzer -ScriptDefinition "Write-Host 'fixture'" -Settings $settings -ExcludeRule PSUseCorrectCasing, PSReservedCmdletChar)
|
|
if ('PSAvoidUsingWriteHost' -notin $remainingFixture.RuleName) { throw 'The remaining-rule pass did not detect Write-Host.' }
|
|
foreach ($path in @('tools/WindowsSigning.psm1', 'tools/WindowsSigning.Tests.ps1', 'tools/VelopackSigning.Tests.ps1'))
|
|
{
|
|
Write-Output "Analyzing $path"
|
|
try
|
|
{
|
|
$findings = @(
|
|
Invoke-ScriptAnalyzer -Path $path -Settings $settings -IncludeRule PSUseCorrectCasing
|
|
Invoke-ScriptAnalyzer -Path $path -Settings $settings -IncludeRule PSReservedCmdletChar
|
|
Invoke-ScriptAnalyzer -Path $path -Settings $settings -ExcludeRule PSUseCorrectCasing, PSReservedCmdletChar
|
|
)
|
|
}
|
|
catch
|
|
{
|
|
Write-Output $_.Exception.ToString()
|
|
throw
|
|
}
|
|
if ($findings.Count -gt 0) { $findings | Format-Table; throw "Script analysis failed: $path" }
|
|
}
|
|
$configuration = New-PesterConfiguration
|
|
$configuration.Run.Path = @('tools/WindowsSigning.Tests.ps1', 'tools/VelopackSigning.Tests.ps1')
|
|
$configuration.Run.Exit = $true
|
|
Invoke-Pester -Configuration $configuration
|
|
|
|
release-please:
|
|
name: release-please
|
|
needs: [security, codeql, docs, conformance, windows-signing]
|
|
if: github.event_name == 'push' && github.ref == 'refs/heads/main' && vars.RELEASE_APP_CLIENT_ID != ''
|
|
runs-on: ubuntu-24.04
|
|
timeout-minutes: 10
|
|
# EX-0006: a main-only bot key, never a repository secret.
|
|
environment: release-automation
|
|
concurrency:
|
|
group: standards-release-pr
|
|
cancel-in-progress: false
|
|
permissions: {}
|
|
steps:
|
|
# An App token lets the generated PR trigger CI; GITHUB_TOKEN does not.
|
|
- name: Release PR token
|
|
id: app
|
|
uses: actions/create-github-app-token@bcd2ba49218906704ab6c1aa796996da409d3eb1 # v3.2.0
|
|
with:
|
|
client-id: ${{ vars.RELEASE_APP_CLIENT_ID }}
|
|
private-key: ${{ secrets.RELEASE_APP_PRIVATE_KEY }}
|
|
permission-contents: write
|
|
permission-pull-requests: write
|
|
|
|
# Version files merge before publication; wait for the publisher's label.
|
|
- name: Check for unpublished merged releases
|
|
id: pending
|
|
env:
|
|
GH_TOKEN: ${{ steps.app.outputs.token }}
|
|
GH_REPO: ${{ github.repository }}
|
|
run: |
|
|
set -euo pipefail
|
|
pending="$(gh api --paginate "repos/$GH_REPO/pulls?state=closed&per_page=100" --jq '.[] | select(.merged_at != null and any(.labels[]; .name == "autorelease: pending")) | .number')"
|
|
if [[ -n "$pending" ]]; then
|
|
echo 'can-propose=false' >> "$GITHUB_OUTPUT"
|
|
echo "Waiting for publication of merged release PR(s): $pending"
|
|
else
|
|
echo 'can-propose=true' >> "$GITHUB_OUTPUT"
|
|
fi
|
|
|
|
- name: Propose a semantic release
|
|
if: steps.pending.outputs.can-propose == 'true'
|
|
uses: googleapis/release-please-action@45996ed1f6d02564a971a2fa1b5860e934307cf7 # v5.0.0
|
|
with:
|
|
token: ${{ steps.app.outputs.token }}
|
|
target-branch: main
|
|
config-file: release-please-config.json
|
|
manifest-file: .release-please-manifest.json
|
|
skip-github-release: true
|