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
2 changes: 1 addition & 1 deletion .github/actions/setup-dotnet-odfkit/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,6 @@ runs:
New-Item -ItemType Directory -Path "$($env:GITHUB_WORKSPACE)/.nuget/packages" -Force | Out-Null

- name: Setup .NET SDK
uses: actions/setup-dotnet@a98b56852c35b8e3190ac28c8c2271da59106c68 # v6.0.0
uses: actions/setup-dotnet@0f4a354dd5547a28c70b7853dbd95d5b67886e73 # v6.1.0
with:
dotnet-version: ${{ inputs.dotnet-versions }}
9 changes: 9 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,15 @@ updates:
interval: "weekly"
day: "monday"
open-pull-requests-limit: 10
# Microsoft 與 System 套件不自動追蹤 semver-major 大版本更新;
# patch 與 minor 維持每週自動更新,重大執行時期升級需由架構複查後手動評估。
ignore:
- dependency-name: "Microsoft.*"
update-types:
- "version-update:semver-major"
- dependency-name: "System.*"
update-types:
- "version-update:semver-major"
# 使用 Dependabot 預設的 dependencies 與 nuget labels;預設 labels 缺少時
# GitHub 會自動建立,避免自訂 labels 不存在時被忽略並產生 PR 警告。
groups:
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/codeql.yml
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ jobs:
nuget-${{ runner.os }}-

- name: Initialize CodeQL
uses: github/codeql-action/init@9b3254085494b55a0f7c4c2b3d2d52cc712ce370 # v4.39.1
uses: github/codeql-action/init@33d7b85da1a04171e211befe2c739303b9a4c066 # v4.39.3
with:
languages: ${{ matrix.language }}
build-mode: ${{ matrix.build-mode }}
Expand All @@ -84,6 +84,6 @@ jobs:
# 參考:https://docs.github.com/en/code-security/reference/code-scanning/workflow-configuration-options

- name: Perform CodeQL analysis
uses: github/codeql-action/analyze@9b3254085494b55a0f7c4c2b3d2d52cc712ce370 # v4.39.1
uses: github/codeql-action/analyze@33d7b85da1a04171e211befe2c739303b9a4c066 # v4.39.3
with:
category: "/language:${{ matrix.language }}"
2 changes: 1 addition & 1 deletion .github/workflows/odf-external-baseline.yml
Original file line number Diff line number Diff line change
Expand Up @@ -138,7 +138,7 @@ jobs:
"cache_root=$cacheRoot" | Out-File $env:GITHUB_OUTPUT -Append -Encoding utf8

- name: Setup Java
uses: actions/setup-java@b843ebf9b913146b38da2eaa7aeddf76074ae1ad # v6.1.0
uses: actions/setup-java@77dd5b2ce225ea11469928ac317850245a74ae78 # v6.2.0
with:
distribution: temurin
java-version: ${{ steps.validator.outputs.java_version }}
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/scorecard.yml
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,6 @@ jobs:
retention-days: 7

- name: Upload Scorecard findings to code scanning
uses: github/codeql-action/upload-sarif@9b3254085494b55a0f7c4c2b3d2d52cc712ce370 # v4.39.1
uses: github/codeql-action/upload-sarif@33d7b85da1a04171e211befe2c739303b9a4c066 # v4.39.3
with:
sarif_file: results.sarif
18 changes: 9 additions & 9 deletions Directory.Packages.props
Original file line number Diff line number Diff line change
Expand Up @@ -31,11 +31,11 @@
<PackageVersion Include="FsCheck.Xunit.v3" Version="3.5.0" />
<PackageVersion Include="HarfBuzzSharp" Version="14.2.1.301" />
<PackageVersion Include="Markdig" Version="1.4.2" />
<PackageVersion Include="Microsoft.Bcl.AsyncInterfaces" Version="10.0.14" />
<PackageVersion Include="Microsoft.Bcl.AsyncInterfaces" Version="10.0.15" />
<PackageVersion Include="Microsoft.Bcl.HashCode" Version="6.0.0" />
<PackageVersion Include="Microsoft.CodeAnalysis.PublicApiAnalyzers" Version="5.6.0" />
<PackageVersion Include="Microsoft.CSharp" Version="4.7.0" />
<PackageVersion Include="Microsoft.Extensions.Hosting.WindowsServices" Version="10.0.14" />
<PackageVersion Include="Microsoft.Extensions.Hosting.WindowsServices" Version="10.0.15" />
<PackageVersion Include="Microsoft.NET.Test.Sdk" Version="18.11.0" />
<PackageVersion Include="Microsoft.NETFramework.ReferenceAssemblies.net48" Version="1.0.3" />
<PackageVersion Include="Microsoft.Playwright" Version="1.64.1" />
Expand All @@ -48,15 +48,15 @@
<PackageVersion Include="SkiaSharp.NativeAssets.Win32" Version="4.153.1" />
<PackageVersion Include="Sylvan.Data.Csv" Version="1.4.4" />
<PackageVersion Include="System.Buffers" Version="4.6.1" />
<PackageVersion Include="System.IO.Hashing" Version="10.0.14" />
<PackageVersion Include="System.IO.Hashing" Version="10.0.15" />
<PackageVersion Include="System.Memory" Version="4.6.3" />
<PackageVersion Include="System.Numerics.Tensors" Version="10.0.14" />
<PackageVersion Include="System.Security.Cryptography.Pkcs" Version="10.0.14" />
<PackageVersion Include="System.Security.Cryptography.Xml" Version="10.0.14" />
<PackageVersion Include="System.Text.Encoding.CodePages" Version="10.0.14" />
<PackageVersion Include="System.Text.Json" Version="10.0.14" />
<PackageVersion Include="System.Numerics.Tensors" Version="10.0.15" />
<PackageVersion Include="System.Security.Cryptography.Pkcs" Version="10.0.15" />
<PackageVersion Include="System.Security.Cryptography.Xml" Version="10.0.15" />
<PackageVersion Include="System.Text.Encoding.CodePages" Version="10.0.15" />
<PackageVersion Include="System.Text.Json" Version="10.0.15" />
<PackageVersion Include="System.Threading.Tasks.Extensions" Version="4.6.3" />
<PackageVersion Include="System.Threading.Channels" Version="10.0.14" />
<PackageVersion Include="System.Threading.Channels" Version="10.0.15" />
<PackageVersion Include="xunit.runner.visualstudio" Version="4.0.1" />
<PackageVersion Include="xunit.v3.mtp-off" Version="4.0.2" />
</ItemGroup>
Expand Down
2 changes: 1 addition & 1 deletion docs/github-release-publishing.md
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,7 @@ SHA-256 不可變套件快照復原,並重新通過 restore、build 與 run。
漏洞偵測閘門,不等同真實 GitHub Release 復原、完整事件指揮或第三方安全審查。

`eng/Test-WebFontStandardsAndDependencies.ps1` 另在封裝前向 NuGet 官方 flat-container 查詢
WebFont 所有 direct package 的最新穩定版本,並委派全專案 GitHub Actions SHA 政策檢查。
WebFont 所有 direct package 在核准主版內的最新穩定版本,並委派全專案 GitHub Actions SHA 政策檢查。
Preview 只能存在於具精確版本、理由、移除條件與複查期限的例外。規範政策
每 90 天失效,OpenType 除版本外也必須追蹤官方 errata;IFT 依 2026-10-13 Candidate
Recommendation Draft 追蹤,不把 draft 誤列為已支援功能。
Expand Down
2 changes: 1 addition & 1 deletion docs/webfonts.md
Original file line number Diff line number Diff line change
Expand Up @@ -720,7 +720,7 @@ moderate 以上 advisory、audit 來源失效或通訊失敗都會使 CI 失敗
再由同批 SHA-256 快照復原及重跑 restore/build/run。

`pwsh eng/Test-WebFontStandardsAndDependencies.ps1 -Online` 會從 NuGet 官方資料確認 WebFont direct
相依仍是最新穩定版,並以 90 天期限追蹤 OpenType errata、Unicode、WOFF/WOFF2、CSS Fonts 與
相依仍是核准主版內的最新穩定版,並以 90 天期限追蹤 OpenType errata、Unicode、WOFF/WOFF2、CSS Fonts 與
IFT。Preview 不得直接加入 WebFont;目前唯一例外是 OdfKit core 傳遞的
`CSharpMath 1.0.0-pre.2`,具有精確理由、移除條件與複查期限。

Expand Down
23 changes: 15 additions & 8 deletions eng/Test-WebFontStandardsAndDependencies.ps1
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
#Requires -Version 7.0
#Requires -Version 7.0
<#
.SYNOPSIS
驗證 WebFont 規範基準、相依政策與全專案 GitHub Actions 供應鏈政策。
.PARAMETER Online
向 NuGet 與 GitHub 官方 API 查詢最新穩定版本;連線失敗時採 fail closed。
向 NuGet 與 GitHub 官方 API 查詢核准主版內最新穩定版本;連線失敗時採 fail closed。
#>
[CmdletBinding()]
param(
Expand All @@ -17,7 +17,7 @@ $dependencyPolicyPath = Join-Path $PSScriptRoot "webfont-dependency-policy.json"
$policy = Get-Content -LiteralPath $policyPath -Raw | ConvertFrom-Json -Depth 20
$dependencyPolicy = Get-Content -LiteralPath $dependencyPolicyPath -Raw | ConvertFrom-Json -Depth 20

if ($policy.schemaVersion -ne 1) {
if ($policy.schemaVersion -ne 1 -and $policy.schemaVersion -ne 2) {
throw "不支援的 WebFont 規範與相依政策版本。"
}
$reviewedAt = [DateTime]::ParseExact(
Expand Down Expand Up @@ -57,14 +57,19 @@ if ([string]$standardsById.OpenType.version -ne "1.9.1" `
}

$trackedPackages = @{}
foreach ($package in $policy.latestStablePackages) {
$approvedMajors = @{}
$packagesList = if ($policy.approvedMajorPackages) { $policy.approvedMajorPackages } else { $policy.latestStablePackages }
foreach ($package in $packagesList) {
$id = [string]$package.id
$version = [string]$package.version
$approvedMajor = if ($null -ne $package.approvedMajor) { [int]$package.approvedMajor } else { ([version]$version).Major }
if ([string]::IsNullOrWhiteSpace($id) -or $trackedPackages.ContainsKey($id) `
-or $version -notmatch '^\d+(?:\.\d+){2,3}$') {
throw "WebFont 最新穩定套件政策含無效項目。"
-or $version -notmatch '^\d+(?:\.\d+){2,3}$' `
-or $approvedMajor -lt 0 -or ([version]$version).Major -ne $approvedMajor) {
throw "WebFont 核准主版套件政策含無效項目。"
}
$trackedPackages[$id] = $version
$approvedMajors[$id] = $approvedMajor
}

$projectFiles = @(
Expand Down Expand Up @@ -165,18 +170,20 @@ if ($Online) {
$id = $package.Key.ToLowerInvariant()
$indexUri = "https://api.nuget.org/v3-flatcontainer/$id/index.json"
$response = Invoke-RestMethod -Uri $indexUri -MaximumRetryCount 3 -RetryIntervalSec 2 -TimeoutSec 60
$approvedMajor = $approvedMajors[$package.Key]
$stableVersions = @(
$response.versions |
Where-Object { [string]$_ -match '^\d+(?:\.\d+){2,3}$' } |
ForEach-Object { [version]$_ } |
Where-Object { $_.Major -eq $approvedMajor } |
Sort-Object -Descending
)
if ($stableVersions.Count -eq 0) {
throw "NuGet 官方資料找不到穩定版本:$($package.Key)"
throw "NuGet 官方資料找不到核准主版 $approvedMajor 的穩定版本:$($package.Key)"
}
$latestStable = $stableVersions[0].ToString()
if ($latestStable -ne $package.Value) {
throw "WebFont NuGet 相依不是最新穩定版:$($package.Key) $($package.Value) → $latestStable"
throw "WebFont NuGet 相依不是核准主版 $approvedMajor 的最新穩定版:$($package.Key) $($package.Value) → $latestStable"
}
}

Expand Down
28 changes: 14 additions & 14 deletions eng/webfont-dependency-policy.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"schemaVersion": 2,
"reviewedAt": "2026-10-30",
"reviewedAt": "2026-11-12",
"allowedLicenses": [
"BSD-2-Clause",
"MIT"
Expand All @@ -10,34 +10,34 @@
{ "id": "CommunityToolkit.HighPerformance", "version": "8.4.2", "license": "MIT", "declarationKind": "expression", "declaration": "MIT" },
{ "id": "CSharpMath", "version": "1.0.0-pre.2", "license": "MIT", "declarationKind": "expression", "declaration": "MIT" },
{ "id": "Markdig", "version": "1.4.2", "license": "BSD-2-Clause", "declarationKind": "expression", "declaration": "BSD-2-Clause" },
{ "id": "Microsoft.Bcl.AsyncInterfaces", "version": "10.0.14", "license": "MIT", "declarationKind": "expression", "declaration": "MIT" },
{ "id": "Microsoft.Bcl.Cryptography", "version": "10.0.14", "license": "MIT", "declarationKind": "expression", "declaration": "MIT" },
{ "id": "Microsoft.Bcl.AsyncInterfaces", "version": "10.0.15", "license": "MIT", "declarationKind": "expression", "declaration": "MIT" },
{ "id": "Microsoft.Bcl.Cryptography", "version": "10.0.15", "license": "MIT", "declarationKind": "expression", "declaration": "MIT" },
{ "id": "Microsoft.Bcl.HashCode", "version": "6.0.0", "license": "MIT", "declarationKind": "expression", "declaration": "MIT" },
{ "id": "Microsoft.CodeAnalysis.PublicApiAnalyzers", "version": "5.6.0", "license": "MIT", "declarationKind": "expression", "declaration": "MIT" },
{ "id": "Microsoft.NET.ILLink.Tasks", "version": "10.0.14", "license": "MIT", "declarationKind": "expression", "declaration": "MIT", "scope": "build" },
{ "id": "Microsoft.NET.ILLink.Tasks", "version": "10.0.15", "license": "MIT", "declarationKind": "expression", "declaration": "MIT", "scope": "build" },
{ "id": "Microsoft.NETCore.Platforms", "version": "1.1.0", "license": "MIT", "declarationKind": "url", "declaration": "http://go.microsoft.com/fwlink/?LinkId=329770" },
{ "id": "Microsoft.NETFramework.ReferenceAssemblies", "version": "1.0.3", "license": "MIT", "declarationKind": "url", "declaration": "https://github.com/Microsoft/dotnet/blob/master/LICENSE", "optional": true },
{ "id": "Microsoft.NETFramework.ReferenceAssemblies.net48", "version": "1.0.3", "license": "MIT", "declarationKind": "url", "declaration": "https://github.com/Microsoft/dotnet/blob/master/LICENSE" },
{ "id": "Microsoft.Win32.Registry", "version": "5.0.0", "license": "MIT", "declarationKind": "expression", "declaration": "MIT" },
{ "id": "NETStandard.Library", "version": "2.0.3", "license": "MIT", "declarationKind": "url", "declaration": "https://github.com/dotnet/standard/blob/master/LICENSE.TXT" },
{ "id": "Sylvan.Data.Csv", "version": "1.4.4", "license": "MIT", "declarationKind": "url", "declaration": "https://aka.ms/deprecateLicenseUrl", "reviewedLicense": "https://github.com/MarkPflug/Sylvan/blob/main/license.txt" },
{ "id": "System.Buffers", "version": "4.6.1", "license": "MIT", "declarationKind": "expression", "declaration": "MIT" },
{ "id": "System.Formats.Asn1", "version": "10.0.14", "license": "MIT", "declarationKind": "expression", "declaration": "MIT" },
{ "id": "System.IO.Hashing", "version": "10.0.14", "license": "MIT", "declarationKind": "expression", "declaration": "MIT" },
{ "id": "System.IO.Pipelines", "version": "10.0.14", "license": "MIT", "declarationKind": "expression", "declaration": "MIT" },
{ "id": "System.Formats.Asn1", "version": "10.0.15", "license": "MIT", "declarationKind": "expression", "declaration": "MIT" },
{ "id": "System.IO.Hashing", "version": "10.0.15", "license": "MIT", "declarationKind": "expression", "declaration": "MIT" },
{ "id": "System.IO.Pipelines", "version": "10.0.15", "license": "MIT", "declarationKind": "expression", "declaration": "MIT" },
{ "id": "System.Memory", "version": "4.6.3", "license": "MIT", "declarationKind": "expression", "declaration": "MIT" },
{ "id": "System.Numerics.Tensors", "version": "10.0.14", "license": "MIT", "declarationKind": "expression", "declaration": "MIT" },
{ "id": "System.Numerics.Tensors", "version": "10.0.15", "license": "MIT", "declarationKind": "expression", "declaration": "MIT" },
{ "id": "System.Numerics.Vectors", "version": "4.6.1", "license": "MIT", "declarationKind": "expression", "declaration": "MIT" },
{ "id": "System.Runtime.CompilerServices.Unsafe", "version": "6.1.2", "license": "MIT", "declarationKind": "expression", "declaration": "MIT" },
{ "id": "System.Security.AccessControl", "version": "6.0.0", "license": "MIT", "declarationKind": "expression", "declaration": "MIT" },
{ "id": "System.Security.Cryptography.Cng", "version": "5.0.0", "license": "MIT", "declarationKind": "expression", "declaration": "MIT" },
{ "id": "System.Security.Cryptography.Pkcs", "version": "10.0.14", "license": "MIT", "declarationKind": "expression", "declaration": "MIT" },
{ "id": "System.Security.Cryptography.Xml", "version": "10.0.14", "license": "MIT", "declarationKind": "expression", "declaration": "MIT" },
{ "id": "System.Security.Cryptography.Pkcs", "version": "10.0.15", "license": "MIT", "declarationKind": "expression", "declaration": "MIT" },
{ "id": "System.Security.Cryptography.Xml", "version": "10.0.15", "license": "MIT", "declarationKind": "expression", "declaration": "MIT" },
{ "id": "System.Security.Principal.Windows", "version": "5.0.0", "license": "MIT", "declarationKind": "expression", "declaration": "MIT" },
{ "id": "System.Text.Encoding.CodePages", "version": "10.0.14", "license": "MIT", "declarationKind": "expression", "declaration": "MIT" },
{ "id": "System.Text.Encodings.Web", "version": "10.0.14", "license": "MIT", "declarationKind": "expression", "declaration": "MIT" },
{ "id": "System.Text.Json", "version": "10.0.14", "license": "MIT", "declarationKind": "expression", "declaration": "MIT" },
{ "id": "System.Threading.Channels", "version": "10.0.14", "license": "MIT", "declarationKind": "expression", "declaration": "MIT" },
{ "id": "System.Text.Encoding.CodePages", "version": "10.0.15", "license": "MIT", "declarationKind": "expression", "declaration": "MIT" },
{ "id": "System.Text.Encodings.Web", "version": "10.0.15", "license": "MIT", "declarationKind": "expression", "declaration": "MIT" },
{ "id": "System.Text.Json", "version": "10.0.15", "license": "MIT", "declarationKind": "expression", "declaration": "MIT" },
{ "id": "System.Threading.Channels", "version": "10.0.15", "license": "MIT", "declarationKind": "expression", "declaration": "MIT" },
{ "id": "System.Threading.Tasks.Extensions", "version": "4.6.3", "license": "MIT", "declarationKind": "expression", "declaration": "MIT" },
{ "id": "System.ValueTuple", "version": "4.6.2", "license": "MIT", "declarationKind": "expression", "declaration": "MIT" }
]
Expand Down
24 changes: 15 additions & 9 deletions eng/webfont-standards-dependency-policy.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"schemaVersion": 1,
"reviewedAt": "2026-10-30",
"schemaVersion": 2,
"reviewedAt": "2026-11-12",
"maximumReviewAgeDays": 90,
"standards": [
{
Expand Down Expand Up @@ -41,30 +41,36 @@
"uri": "https://www.w3.org/TR/2026/CRD-IFT-20261013/"
}
],
"latestStablePackages": [
"approvedMajorPackages": [
{
"id": "Microsoft.CodeAnalysis.PublicApiAnalyzers",
"version": "5.6.0"
"version": "5.6.0",
"approvedMajor": 5
},
{
"id": "Microsoft.Extensions.Hosting.WindowsServices",
"version": "10.0.14"
"version": "10.0.15",
"approvedMajor": 10
},
{
"id": "Microsoft.NETFramework.ReferenceAssemblies.net48",
"version": "1.0.3"
"version": "1.0.3",
"approvedMajor": 1
},
{
"id": "Microsoft.Win32.Registry",
"version": "5.0.0"
"version": "5.0.0",
"approvedMajor": 5
},
{
"id": "System.Text.Encoding.CodePages",
"version": "10.0.14"
"version": "10.0.15",
"approvedMajor": 10
},
{
"id": "System.Text.Json",
"version": "10.0.14"
"version": "10.0.15",
"approvedMajor": 10
}
],
"prereleaseExceptions": [
Expand Down
Loading