diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 6ae7cc0..dfa4d99 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -45,6 +45,7 @@ jobs: - 'scripts/collect-windows-defender-evidence*.ps1' - 'scripts/verify-windows-signatures.ps1' - 'scripts/verify-windows-signatures.test.ps1' + - 'scripts/validate-windows-signing-config*.ps1' - 'Makefile' - '.github/workflows/*.yml' homebrew: @@ -65,7 +66,7 @@ jobs: package-manager-cache: false - run: corepack enable - run: pnpm install --frozen-lockfile - - run: pnpm audit --audit-level high + - run: pnpm audit --audit-level low - run: pnpm validate:ids - run: pnpm typecheck - run: pnpm test @@ -294,6 +295,10 @@ jobs: if: runner.os == 'macOS' run: | set -euo pipefail + # Trust this checkout's cask on Homebrew versions that require it. + if brew command trust >/dev/null 2>&1; then + brew trust --cask dantraynor/tailchrome/tailchrome + fi brew style --cask dantraynor/tailchrome/tailchrome brew info --cask --json=v2 dantraynor/tailchrome/tailchrome brew fetch --cask dantraynor/tailchrome/tailchrome @@ -406,6 +411,9 @@ jobs: WINDOWS_SIGNTOOL_PATH: C:\Program Files (x86)\Windows Kits\10\bin\10.0.26100.0\x64\signtool.exe steps: - uses: actions/checkout@v5 + - name: Test production signing configuration + shell: pwsh + run: .\scripts\validate-windows-signing-config.test.ps1 - uses: actions/setup-dotnet@v5 with: dotnet-version: "8.0.x" diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 361dc6a..b973f12 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -24,10 +24,11 @@ concurrency: # APPLE_API_KEY_ID - App Store Connect API key ID # APPLE_API_ISSUER_ID - App Store Connect API issuer UUID # APPLE_API_KEY_P8 - contents of the AuthKey_*.p8 file +# SIGNPATH_API_TOKEN - submitter for tailchrome/release-signing # -# Signed Windows candidate creation remains blocked until one signing provider -# and the exact WINDOWS_EXPECTED_SIGNER_SUBJECT repository variable are -# recorded. The only alternative is the explicit unsigned mode: setting the +# Signed Windows candidates use SignPath's fixed release-signing policy. +# SIGNPATH_ORGANIZATION_ID and the exact WINDOWS_EXPECTED_SIGNER_SUBJECT must +# identify the approved production certificate. In explicit unsigned mode, setting the # WINDOWS_ALLOW_UNSIGNED_RELEASE repository variable to "true" ships the raw # EXE and MSI without Authenticode signatures, and records that choice in the # candidate metadata. Both signing modes require clean Defender evidence. @@ -49,6 +50,7 @@ jobs: runs-on: ubuntu-latest outputs: source_sha: ${{ steps.source.outputs.source_sha }} + windows_artifact_id: ${{ steps.upload-windows-executables.outputs.artifact-id }} env: RELEASE_TAG: ${{ github.event_name == 'workflow_dispatch' && inputs.release_tag || github.ref_name }} steps: @@ -110,6 +112,17 @@ jobs: unzip -q packages/extension/.output/firefox.zip -d "$rebuilt_dir" diff -qr "$original_dir" "$rebuilt_dir" popd >/dev/null + - name: Upload Windows EXEs for production signing + id: upload-windows-executables + if: vars.WINDOWS_ALLOW_UNSIGNED_RELEASE != 'true' + uses: actions/upload-artifact@b7c566a772e6b6bfb58ed0dc250532a479d7789f # v6.0.0 + with: + name: windows-unsigned-executables + retention-days: 7 + if-no-files-found: error + path: | + dist/tailscale-browser-ext-windows-amd64.exe + dist/tailscale-browser-ext-windows-arm64.exe - name: Upload reviewed build outputs uses: actions/upload-artifact@v6 with: @@ -440,6 +453,10 @@ jobs: package-windows: needs: build runs-on: windows-2025 + timeout-minutes: 90 + permissions: + actions: read + contents: read outputs: artifact_id: ${{ steps.upload-windows.outputs.artifact-id }} artifact_digest: ${{ steps.upload-windows.outputs.artifact-digest }} @@ -451,6 +468,7 @@ jobs: WINDOWS_SIGNTOOL_PATH: C:\Program Files (x86)\Windows Kits\10\bin\10.0.26100.0\x64\signtool.exe WINDOWS_EXPECTED_SIGNER_SUBJECT: ${{ vars.WINDOWS_EXPECTED_SIGNER_SUBJECT }} WINDOWS_ALLOW_UNSIGNED_RELEASE: ${{ vars.WINDOWS_ALLOW_UNSIGNED_RELEASE }} + SIGNPATH_ORGANIZATION_ID: ${{ vars.SIGNPATH_ORGANIZATION_ID }} steps: - uses: actions/checkout@v5 with: @@ -460,32 +478,30 @@ jobs: with: dotnet-version: "8.0.x" - name: Require Windows release signing configuration + env: + SIGNPATH_API_TOKEN: ${{ secrets.SIGNPATH_API_TOKEN }} shell: pwsh - run: | - if ($env:WINDOWS_ALLOW_UNSIGNED_RELEASE -eq 'true') { - if (-not [string]::IsNullOrWhiteSpace($env:WINDOWS_EXPECTED_SIGNER_SUBJECT)) { - throw "WINDOWS_ALLOW_UNSIGNED_RELEASE cannot be combined with WINDOWS_EXPECTED_SIGNER_SUBJECT; remove one." - } - Write-Warning "WINDOWS_ALLOW_UNSIGNED_RELEASE is enabled: this candidate ships UNSIGNED Windows binaries." - } else { - if ([string]::IsNullOrWhiteSpace($env:WINDOWS_EXPECTED_SIGNER_SUBJECT)) { - throw "WINDOWS_EXPECTED_SIGNER_SUBJECT must contain the exact selected publisher subject." - } - if (-not (Test-Path -LiteralPath $env:WINDOWS_SIGNTOOL_PATH -PathType Leaf)) { - throw "Expected SignTool was not found at $env:WINDOWS_SIGNTOOL_PATH" - } - } + run: .\scripts\validate-windows-signing-config.ps1 - name: Download reviewed build outputs uses: actions/download-artifact@v6 with: name: build-output - name: Install WiX run: dotnet tool install --global wix --version 6.0.2 - # Provider integration gate (signed mode): the selected provider must - # place timestamped amd64 and ARM64 raw EXEs in signed-windows before MSI - # construction, then sign the unsigned MSI to the final filename before - # verification. Unsigned mode stages both reviewed raw EXEs directly and - # builds the x64-only MSI without any signature validation. + - name: Submit Windows EXEs for production signing + id: sign-executables + if: vars.WINDOWS_ALLOW_UNSIGNED_RELEASE != 'true' + uses: signpath/github-action-submit-signing-request@f6d04783b4569d051e0c80105fe66e82819d0092 # v3 + with: + api-token: ${{ secrets.SIGNPATH_API_TOKEN }} + organization-id: ${{ env.SIGNPATH_ORGANIZATION_ID }} + project-slug: tailchrome + signing-policy-slug: release-signing + artifact-configuration-slug: windows-executables + github-artifact-id: ${{ needs.build.outputs.windows_artifact_id }} + wait-for-completion: true + wait-for-completion-timeout-in-seconds: 1800 + output-artifact-directory: signed-windows - name: Stage unsigned helper if: vars.WINDOWS_ALLOW_UNSIGNED_RELEASE == 'true' shell: pwsh @@ -508,7 +524,7 @@ jobs: .\packaging\windows\build-msi.ps1 ` -Version "$env:RELEASE_TAG" ` -HelperExe $signedExe ` - -OutPath .\signed-windows\tailchrome-helper-windows-x64.unsigned.msi ` + -OutPath .\unsigned-msi\tailchrome-helper-windows-x64.msi ` -ExpectedSignerSubject "$env:WINDOWS_EXPECTED_SIGNER_SUBJECT" ` -SignToolPath "$env:WINDOWS_SIGNTOOL_PATH" - name: Require provider-signed ARM64 helper @@ -519,6 +535,36 @@ jobs: if (-not (Test-Path -LiteralPath $signedArm64 -PathType Leaf)) { throw "The selected signing provider must produce the timestamped ARM64 raw EXE before candidate assembly." } + - name: Upload outer MSI for production signing + id: upload-unsigned-msi + if: vars.WINDOWS_ALLOW_UNSIGNED_RELEASE != 'true' + uses: actions/upload-artifact@b7c566a772e6b6bfb58ed0dc250532a479d7789f # v6.0.0 + with: + name: windows-unsigned-msi + retention-days: 7 + if-no-files-found: error + path: unsigned-msi/tailchrome-helper-windows-x64.msi + - name: Submit outer MSI for production signing + id: sign-msi + if: vars.WINDOWS_ALLOW_UNSIGNED_RELEASE != 'true' + uses: signpath/github-action-submit-signing-request@f6d04783b4569d051e0c80105fe66e82819d0092 # v3 + with: + api-token: ${{ secrets.SIGNPATH_API_TOKEN }} + organization-id: ${{ env.SIGNPATH_ORGANIZATION_ID }} + project-slug: tailchrome + signing-policy-slug: release-signing + artifact-configuration-slug: windows-msi + github-artifact-id: ${{ steps.upload-unsigned-msi.outputs.artifact-id }} + wait-for-completion: true + wait-for-completion-timeout-in-seconds: 1800 + output-artifact-directory: signed-msi + - name: Stage the production-signed MSI + if: vars.WINDOWS_ALLOW_UNSIGNED_RELEASE != 'true' + shell: pwsh + run: | + Copy-Item ` + -LiteralPath .\signed-msi\tailchrome-helper-windows-x64.msi ` + -Destination .\signed-windows\tailchrome-helper-windows-x64.msi - name: Build Windows MSI from the unsigned helper if: vars.WINDOWS_ALLOW_UNSIGNED_RELEASE == 'true' shell: pwsh @@ -593,6 +639,44 @@ jobs: "raw_sha256=$rawHash" | Out-File -FilePath $env:GITHUB_OUTPUT -Append "arm64_sha256=$arm64Hash" | Out-File -FilePath $env:GITHUB_OUTPUT -Append "msi_sha256=$msiHash" | Out-File -FilePath $env:GITHUB_OUTPUT -Append + - name: Record production signing provenance + if: vars.WINDOWS_ALLOW_UNSIGNED_RELEASE != 'true' + shell: pwsh + env: + SOURCE_SHA: ${{ needs.build.outputs.source_sha }} + EXE_SIGNING_REQUEST_ID: ${{ steps.sign-executables.outputs.signing-request-id }} + MSI_SIGNING_REQUEST_ID: ${{ steps.sign-msi.outputs.signing-request-id }} + run: | + foreach ($requestId in @($env:EXE_SIGNING_REQUEST_ID, $env:MSI_SIGNING_REQUEST_ID)) { + $parsed = [Guid]::Empty + if (-not [Guid]::TryParseExact($requestId, "D", [ref]$parsed) -or $parsed -eq [Guid]::Empty) { + throw "SignPath did not report a production signing request ID." + } + } + New-Item -ItemType Directory -Force -Path .\signpath-evidence | Out-Null + [ordered]@{ + schemaVersion = 1 + sourceSha = $env:SOURCE_SHA + releaseTag = $env:RELEASE_TAG + runUrl = "https://github.com/$env:GITHUB_REPOSITORY/actions/runs/$env:GITHUB_RUN_ID" + runAttempt = $env:GITHUB_RUN_ATTEMPT + organizationId = $env:SIGNPATH_ORGANIZATION_ID + projectSlug = "tailchrome" + signingPolicySlug = "release-signing" + expectedSignerSubject = $env:WINDOWS_EXPECTED_SIGNER_SUBJECT + executableSigningRequestId = $env:EXE_SIGNING_REQUEST_ID + msiSigningRequestId = $env:MSI_SIGNING_REQUEST_ID + signatures = Get-Content .\signed-windows\windows-signature-verification.json -Raw | ConvertFrom-Json + } | ConvertTo-Json -Depth 8 | + Set-Content .\signpath-evidence\signpath-release.json -Encoding utf8NoBOM + - name: Preserve production signing evidence + if: vars.WINDOWS_ALLOW_UNSIGNED_RELEASE != 'true' + uses: actions/upload-artifact@b7c566a772e6b6bfb58ed0dc250532a479d7789f # v6.0.0 + with: + name: windows-signpath-signing + retention-days: 90 + if-no-files-found: error + path: signpath-evidence/signpath-release.json - name: Upload final Windows bundle id: upload-windows uses: actions/upload-artifact@v6 diff --git a/README.md b/README.md index d5b89a5..7648a7a 100644 --- a/README.md +++ b/README.md @@ -73,7 +73,7 @@ irm https://github.com/dantraynor/tailchrome/releases/latest/download/tailchrome ## Windows code signing -SignPath Foundation accepted Tailchrome for Windows Authenticode signing. [Test signing](https://github.com/dantraynor/tailchrome/actions/runs/37815038448) passed; production certificate issuance and signed release integration are still pending. Windows releases stay explicitly unsigned until that work ships. See the [Windows code-signing policy](docs/WINDOWS_CODE_SIGNING_POLICY.md) and [SignPath setup notes](docs/signpath-setup.md). +SignPath Foundation accepted Tailchrome for Windows Authenticode signing. [Test signing](https://github.com/dantraynor/tailchrome/actions/runs/37815038448) passed, and the release workflow supports its separate production policy. Production certificate and publisher approval are still pending; v0.1.15's Windows artifacts are explicitly unsigned. Signing identifies the publisher but does not guarantee immediate SmartScreen reputation. See the [Windows code-signing policy](docs/WINDOWS_CODE_SIGNING_POLICY.md) and [SignPath setup notes](docs/signpath-setup.md). For releases signed through the SignPath Foundation program: diff --git a/docs/DOCUMENTATION.md b/docs/DOCUMENTATION.md index df05958..2413504 100644 --- a/docs/DOCUMENTATION.md +++ b/docs/DOCUMENTATION.md @@ -1008,13 +1008,13 @@ immutable SHA in every downstream checkout. It: 4. **Verifies Firefox source ZIP**: extracts sources, rebuilds from scratch, `diff -qr` against original to ensure reproducibility 5. Signs/notarizes the macOS binaries, app, and package and verifies every layer 6. Builds and inspects Linux `.deb`/`.rpm` packages and includes the Unix and PowerShell bootstraps -7. In signed mode, verifies both raw Windows EXEs, the outer x64 MSI, and its embedded amd64 EXE against the configured signing policy; explicit unsigned mode records its exception +7. In signed mode, signs both Windows EXEs through SignPath `tailchrome` / `release-signing`, builds the x64 MSI from the signed amd64 EXE, signs the outer MSI, and verifies all four signature surfaces; explicit unsigned mode records its exception 8. Requires native ARM64 runtime evidence and Defender evidence for both raw Windows EXEs and the MSI in both signing modes 9. Assembles the complete allowlisted matrix, generates `SHA256SUMS.txt` only after final signing/packaging, creates build-provenance attestations, and stores the immutable candidate for 90 days The candidate workflow has no release-write permission and never publishes -assets. The currently documented external Windows signer selection and -publisher subject are intentionally fail-closed; see +assets. Production signing requires the approved SignPath certificate, exact +publisher subject, trusted-build policy, and explicit request approvals; see [WINDOWS_CODE_SIGNING_POLICY.md](WINDOWS_CODE_SIGNING_POLICY.md). ### Helper publication (`publish-helper-release.yml`) -- Manual Dispatch Only @@ -1035,6 +1035,9 @@ candidate manifest digest. Defender/Malwarebytes findings apply only to those exact hashes; an ordinary SmartScreen unknown-reputation warning is tracked separately from a malware or PUA detection. The complete operator procedure and asset matrix are in [RELEASE_CHECKLIST.md](RELEASE_CHECKLIST.md). +The separate [browser-download test](windows-smartscreen-validation.md) +preserves Mark of the Web and exercises Explorer launch on Windows 11; +signature verification and direct installation do not establish that result. ### Publish (`publish.yml`) -- Manual Dispatch Only diff --git a/docs/RELEASE_CHECKLIST.md b/docs/RELEASE_CHECKLIST.md index 8238af4..66ba29f 100644 --- a/docs/RELEASE_CHECKLIST.md +++ b/docs/RELEASE_CHECKLIST.md @@ -15,8 +15,9 @@ not apply. > **Unsigned Windows mode.** When the `WINDOWS_ALLOW_UNSIGNED_RELEASE` > repository variable is `true` (see the code-signing policy), the -> signing-provider and `WINDOWS_EXPECTED_SIGNER_SUBJECT` items below do not -> apply. Defender-environment, controlled-runner, and exact-hash Windows +> signing-provider, production-signature, signing-evidence, acknowledgement, +> and `WINDOWS_EXPECTED_SIGNER_SUBJECT` items below do not apply. +> Defender-environment, controlled-runner, and exact-hash Windows > security clearance requirements still apply. Candidate metadata must record > `windowsSigning: unsigned`, the release notes must state that the Windows > binaries are unsigned, and every other item still applies. @@ -27,6 +28,8 @@ not apply. - [ ] The Windows code-signing policy records exactly one selected provider and one exact expected signer subject. - [ ] The selected Windows provider has produced a successful test signature through the repository workflow. - [ ] `WINDOWS_EXPECTED_SIGNER_SUBJECT` exactly matches the documented subject. +- [ ] SignPath `tailchrome` / `release-signing` uses the production certificate, requires trusted GitHub builds and explicit maintainer approval, and permits the CI token to submit without approval rights. +- [ ] Signed release notes include: `Free code signing provided by SignPath.io, certificate by SignPath Foundation`. - [ ] The protected `windows-defender-validation` environment requires review, prevents administrator bypass, permits only `v*` tags, and records the approved snapshot in `WINDOWS_DEFENDER_IMAGE_ID`; no repository- or organization-scoped variable uses that name. - [ ] A clean x64 Windows VM is registered only to this repository with `--ephemeral` and the run-specific `self-hosted`, `Windows`, `X64`, and `tailchrome-defender-` labels. - [ ] The VM's host-owned pre-job hook permits only the approved repository, workflow, job, run ID, tag, and source SHA and verifies `TAILCHROME_DEFENDER_IMAGE_ID` against the approved snapshot; the VM has no signing credentials or internal-network access. @@ -72,6 +75,7 @@ not apply. - [ ] The MSI-embedded EXE has the same signature requirements and SHA-256 as the raw EXE. - [ ] The outer MSI has one valid SHA-256 Authenticode signature, a timestamp, and the same expected subject. - [ ] The fixed Windows SDK SignTool and `Get-AuthenticodeSignature` both accept all four Windows signature surfaces. +- [ ] The `windows-signpath-signing` evidence identifies both approved production requests, this run/attempt and source commit, and the final signature report; archive it with the clearance evidence. ## Exact-hash Windows security clearance @@ -101,6 +105,8 @@ publication approval. - [ ] Repair or reinstall succeeded. - [ ] Uninstall removed only registrations and executables owned by that installation; node state was preserved. - [ ] No malware, PUA, or behavioral detection occurred. +- [ ] The [browser-download and Explorer procedure](windows-smartscreen-validation.md) records the exact MSI hash, source URL, browser, Windows build/account context, `ZoneId=3`, protection/policy state, screenshots, available buttons, and installer launch result. +- [ ] An unpublished candidate's download origin is recorded accurately; any untested public download route remains explicitly outstanding. - [ ] Any ordinary signed SmartScreen unknown-reputation prompt is recorded for release notes or support, but is not described as malware. If either scanner reports malware, PUA, or suspicious behavior, stop. Record the exact hash, detection name, definition version, vendor submission reference, determination, and same-hash retest. Do not approve publication while a determination is pending. A rebuild creates a new candidate and restarts every security check. @@ -118,6 +124,7 @@ If either scanner reports malware, PUA, or suspicious behavior, stop. Record the - [ ] No asset was overwritten with `--clobber`. - [ ] The complete draft was downloaded and byte-compared with the candidate. - [ ] The draft was made public only by the final publication step. +- [ ] The public MSI download was repeated through the browser and Explorer with its hash and Internet-zone marker rechecked; any prompt or block is recorded without changing the published assets. If the candidate artifact expires, or any file or digest differs, create a new candidate and repeat this checklist. Never rebuild, resign, repackage, regenerate checksums, or replace assets after clearance. diff --git a/docs/WINDOWS_CODE_SIGNING_POLICY.md b/docs/WINDOWS_CODE_SIGNING_POLICY.md index d65ac92..cd16652 100644 --- a/docs/WINDOWS_CODE_SIGNING_POLICY.md +++ b/docs/WINDOWS_CODE_SIGNING_POLICY.md @@ -10,7 +10,8 @@ the project, issued one stable publisher identity, and produced a successfully timestamped test signature. SignPath Foundation accepted the project on October 8, 2026; the isolated [test-signing run](https://github.com/dantraynor/tailchrome/actions/runs/37815038448) -passed that day. Production certificate issuance and release integration are +passed that day. The release workflow integrates the fixed +`tailchrome` / `release-signing` policy, but production activation remains pending. The repository has no approved production Authenticode signer subject. A release must not substitute a locally generated certificate or a second provider when signing is unavailable. @@ -20,17 +21,19 @@ unsigned Windows binaries by setting the `WINDOWS_ALLOW_UNSIGNED_RELEASE` repository variable to `true`. Unsigned mode is mutually exclusive with a configured signer subject, requires the same Defender clearance evidence, records `windowsSigning: unsigned` in the candidate metadata, and still requires the -protected publication approval. Users installing these builds see the ordinary -SmartScreen unknown-publisher warning. The variable must be removed as soon as -a signing provider and expected signer subject are recorded, at which point the +protected publication approval. Windows may show an unknown-publisher or +reputation warning, and device policy can prevent overriding it. The variable +must be removed as soon as a signing provider and expected signer subject are +recorded, at which point the fail-closed signed gate below is the only release path again. SignPath is the accepted onboarding provider. The isolated [test-signing workflow](signpath-setup.md) uses its self-signed test certificate only for setup review. It cannot produce publishable release candidates. -Production signing remains blocked until -the Foundation reviews the setup and issues the production certificate, and -the release integration and exact production signer subject are recorded here. +Production signing remains blocked until the Foundation-issued production +certificate, exact signer subject, trusted-build requirement, and explicit +request approvals have been verified using the +[production setup procedure](signpath-setup.md#activate-production-signing). If SignPath supplies the production signature, the project home and download surfaces must include this acknowledgement: @@ -111,6 +114,13 @@ minimum configuration required by the selected provider. Identity and billing documents stay in the provider account. Production signing configuration must not expose a workflow input that switches providers or publisher identities. +The release workflow fixes the provider to SignPath and the project/policy to +`tailchrome` / `release-signing`. Its CI credential is a submitter, not an +approver. The production policy must require GitHub trusted-build provenance +and explicit maintainer approval for both the EXE and MSI requests. The +`windows-signpath-signing` artifact retains those request IDs and the final +signature report with the run's source commit for 90 days. + ## Signature and timestamp requirements All four Windows signature surfaces—the amd64 raw EXE, ARM64 raw EXE, @@ -145,6 +155,14 @@ A validly signed SmartScreen unknown-reputation prompt is documented for users but is not itself a malware detection. An invalid signature or an actual SmartScreen/Defender classification remains blocking. +Test the exact MSI downloaded by a browser with its Internet-zone marker intact +and launched from Explorer using the +[SmartScreen validation procedure](windows-smartscreen-validation.md). Record +the visible publisher, buttons, relevant Windows policies, and whether the +installer opens. A missing override button alone does not identify the policy +or establish a malware detection. Direct `msiexec` installation and clean +antivirus scans do not cover this path. + The complete procedure is in [RELEASE_CHECKLIST.md](RELEASE_CHECKLIST.md). ## Compromise, revocation, and publisher migration diff --git a/docs/signpath-setup.md b/docs/signpath-setup.md index 623deb5..46f1f86 100644 --- a/docs/signpath-setup.md +++ b/docs/signpath-setup.md @@ -1,10 +1,12 @@ -# SignPath Foundation test signing +# SignPath Foundation signing SignPath Foundation accepted Tailchrome on October 8, 2026. The `tailchrome` project has a `test-signing` policy using **Test certificate 2026**, and -**GitHub.com** is linked as a trusted build system. The `release-signing` -policy's production certificate is still pending. SignPath will review a -working test-signing setup before issuing that certificate. +**GitHub.com** is linked as a trusted build system. The +[test-signing run](https://github.com/dantraynor/tailchrome/actions/runs/37815038448) +passed that day. Production activation requires the Foundation-issued +certificate and the policy checks below; no production publisher subject has +been approved in the repository yet. The manual [SignPath Test Signing workflow](../.github/workflows/signpath-test.yml) builds both Windows helpers, signs them with the test policy, builds the MSI @@ -128,18 +130,55 @@ the MSI uses version `0.0.0`. The workflow removes temporary certificate trust even if subsequent steps fail. Do not install that trust certificate on user machines or distribute these files as signed production releases. -## Production handoff - -After SignPath reviews the test run and imports the production certificate, -record its exact publisher subject in -[WINDOWS_CODE_SIGNING_POLICY.md](WINDOWS_CODE_SIGNING_POLICY.md). A separate -reviewed change must wire `release-signing` into the release candidate -workflow, verify the production certificate through normal Windows trust, -configure `WINDOWS_EXPECTED_SIGNER_SUBJECT`, and remove -`WINDOWS_ALLOW_UNSIGNED_RELEASE`. The existing Defender, Malwarebytes, native -ARM64, and protected publication gates still apply. - -The test workflow does not publish releases or satisfy those production gates. +## Activate production signing + +The [Release Candidate workflow](../.github/workflows/release.yml) uses only +`tailchrome` / `release-signing` for production. It submits the two EXEs with +`windows-executables`, builds the MSI from the signed amd64 EXE, then submits +only the outer MSI with `windows-msi`. Both requests use GitHub artifact IDs +from the same run. There is no policy, certificate, or local-file input. + +Before enabling that path: + +1. Confirm that SignPath has reviewed the test run and attached a production + certificate to `release-signing`. Inspect its issuer, validity, code-signing + usage, and public certificate. It must chain through normal Windows trust; + do not import the test certificate or a private root to make it pass. + Record the exact Windows `X509Certificate2.Subject` value in + [WINDOWS_CODE_SIGNING_POLICY.md](WINDOWS_CODE_SIGNING_POLICY.md). OpenSSL's + displayed subject ordering is not necessarily the Windows string. +2. Require **trusted build system** on `release-signing`, with **GitHub.com** + restricted to this repository. Keep both artifact configurations identical + to the reviewed XML above. Enable explicit approval by the maintainer for + each request, and require RFC 3161 timestamping. Automatic test-policy + approval is not the production policy. +3. Grant the CI submitter access to `release-signing` without granting it + approval rights. Confirm that the GitHub `SIGNPATH_API_TOKEN` secret belongs + to that submitter. If a replacement is needed, transfer it directly from + SignPath into GitHub Secrets; never put it in source, logs, or artifacts. +4. Set `WINDOWS_EXPECTED_SIGNER_SUBJECT` to the verified production subject and + remove `WINDOWS_ALLOW_UNSIGNED_RELEASE` before starting a new candidate. + Keep `SIGNPATH_ORGANIZATION_ID` set to the approved organization above. + The configuration validator rejects conflicting signed/unsigned settings, + missing credentials or SignTool, and production requests from branches, + pull requests, or another repository. +5. Create a new reviewed version and tag. Do not resign or replace a published + release, including v0.1.15. Review each signing request's source SHA and + GitHub provenance in SignPath before approving it. The workflow waits up + to 30 minutes per request and never falls back to unsigned output. + +The final verifier checks normal Windows trust, the exact publisher, SHA-256 +signatures, RFC 3161 timestamps, and byte equality between the raw and embedded +amd64 EXE. `windows-signpath-signing` preserves both request IDs, the source +commit, run/attempt, publisher, and signature report for 90 days. Download that +evidence with the candidate's security records before it expires. + +The existing Defender, Malwarebytes, native ARM64, and protected publication +gates still apply. Complete the +[browser-download and Explorer test](windows-smartscreen-validation.md) on the +exact final MSI as well. A trusted signature establishes publisher identity; +it does not guarantee SmartScreen reputation. The test-signing workflow does +not publish releases or satisfy these production gates. ## References diff --git a/docs/windows-smartscreen-validation.md b/docs/windows-smartscreen-validation.md new file mode 100644 index 0000000..e0618dc --- /dev/null +++ b/docs/windows-smartscreen-validation.md @@ -0,0 +1,138 @@ +# Windows browser-download and SmartScreen validation + +Exercise the download path separately from signature verification, antivirus +scans, and direct `msiexec` installation. Those checks do not establish what +SmartScreen shows when a user opens a downloaded MSI in Explorer. A valid +production signature identifies the publisher; it does not guarantee that a +new file or certificate already has SmartScreen reputation. + +Use a licensed Windows 11 validation machine with active Defender, cloud +protection, and Malwarebytes. Use an interactive standard-user desktop, a +normal supported browser, and an NTFS download directory. Record any reuse of +a machine, account, browser profile, or previously executed artifact: cached +decisions can affect the result. Do not reset a retained validation machine or +erase scanner history to make an investigation appear to be a first run. + +## Identify the bytes and download route + +Record the release tag, source commit, candidate run/attempt (if applicable), +manifest digest, expected MSI SHA-256, and UTC test time. Take the expected hash +from the reviewed manifest before downloading. + +1. In the Windows browser, open the pinned release page and click the + `tailchrome-helper-windows-x64.msi` asset. Record the original URL, browser + name/version, download result, and any browser warning. Keep authentication + and temporary redirect URLs out of shared evidence. +2. Save the download to the standard user's Downloads folder. Do not transfer + the MSI through a shared drive, download it with PowerShell/curl, or use a + previously extracted build artifact for this test. +3. Before opening it, verify its hash and Internet-zone marker in PowerShell + under the same user. Replace the expected hash and select the actual + downloaded filename, including any browser-added suffix: + + ```powershell + $msi = Join-Path $env:USERPROFILE 'Downloads\tailchrome-helper-windows-x64.msi' + $expectedSha256 = '' + $hash = (Get-FileHash -LiteralPath $msi -Algorithm SHA256).Hash.ToLowerInvariant() + if ($hash -ne $expectedSha256.ToLowerInvariant()) { throw 'MSI hash mismatch.' } + $zone = @(Get-Content -LiteralPath $msi -Stream Zone.Identifier -ErrorAction Stop) + if (-not ($zone -match '^ZoneId=3\s*$')) { throw 'Internet-zone marker is missing.' } + [pscustomobject]@{ file = Split-Path -Leaf $msi; sha256 = $hash; zoneId = 3 } + $signature = Get-AuthenticodeSignature -LiteralPath $msi + $signature | Select-Object Status, StatusMessage + $signature.SignerCertificate | Select-Object Subject, Issuer, Thumbprint, NotBefore, NotAfter + $signature.TimeStamperCertificate | Select-Object Subject, Issuer, Thumbprint + ``` + + Keep the original `Zone.Identifier` stream intact. The report only needs + `ZoneId`, not the potentially sensitive redirect URLs in the other fields. + If the browser blocks the download or the marker is absent, preserve that + result; do not manufacture the marker or disable a protection to proceed. + +For an unpublished candidate, use its approved draft download or a documented +HTTPS staging URL for the exact final MSI. Record that origin accurately; +staging does not establish the reputation of the eventual public URL. Repeat +the test from the public release page after publication. Never change a +published asset to investigate a warning. The v0.1.15 MSI remains unsigned; +test any future signed candidate separately, with its own hash and evidence. + +## Record Windows and protection state + +Capture the Windows edition/build, browser version, whether the account is a +standard user or administrator, and whether the launch is elevated. An +unelevated administrator is not a standard-user test. Record whether the +machine is organization-managed or enrolled in MDM. Keep account names and +tenant/device identifiers private unless needed for the investigation. + +These read-only queries provide the OS and Defender versions: + +```powershell +Get-CimInstance Win32_OperatingSystem | Select-Object Caption, Version, BuildNumber, OSArchitecture +Get-ItemProperty 'HKLM:\SOFTWARE\Microsoft\Windows NT\CurrentVersion' | + Select-Object DisplayVersion, CurrentBuild, UBR +Get-MpComputerStatus | Select-Object AMRunningMode, AMProductVersion, + AntivirusSignatureVersion, AntivirusSignatureLastUpdated, AntivirusEnabled, + RealTimeProtectionEnabled, BehaviorMonitorEnabled, IoavProtectionEnabled +Get-MpPreference | Select-Object MAPSReporting, DisableBlockAtFirstSeen, PUAProtection +``` + +Record Malwarebytes' version, definitions, and active protection status as +well. Check **Windows Security → App & browser control → Reputation-based +protection settings**, including **Check apps and files**. Record Smart App +Control if present. Collect effective Group Policy/MDM settings and the +following relevant registry values without changing them: + +| Registry location | Values | +| --- | --- | +| `HKLM\SOFTWARE\Policies\Microsoft\Windows\System` | `EnableSmartScreen`, `ShellSmartScreenLevel` | +| `HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer` | `SmartScreenEnabled` | +| `HKLM\SOFTWARE\Microsoft\PolicyManager\current\device\SmartScreen` | `EnableSmartScreenInShell`, `PreventOverrideForFilesInShell` | +| `HKLM\SOFTWARE\Policies\Microsoft\Edge` (if using Edge) | `SmartScreenEnabled`, `PreventSmartScreenPromptOverride`, `PreventSmartScreenPromptOverrideForFiles` | +| `HKLM` and `HKCU\SOFTWARE\Policies\Google\Chrome` (if using Chrome) | `SafeBrowsingProtectionLevel`, `DownloadRestrictions` | + +Record missing values and permission errors explicitly. Registry absence alone +does not prove that a machine is unmanaged or establish its effective policy. +If an administrator collects additional machine-level evidence, label that +separate context and keep the Explorer launch in the original user session. + +## Launch from Explorer + +1. Open Downloads in Explorer and double-click the verified MSI. Do not use + `msiexec`, an elevated shell, `Unblock-File`, Properties → Unblock, or a + policy/antivirus exclusion as a substitute. +2. Capture the initial dialog. If **More info** is available, open it and + capture the expanded dialog before choosing anything else. Record the + exact message, filename, displayed publisher, and every available button, + including whether **Run anyway** exists. +3. Record whether the installer opens without a prompt, after an available + normal reputation override, or cannot open. Use an override only for the + already hash-verified and scan-cleared validation artifact, with its + expected signing status. Never override a malware/PUA detection or an + invalid signature. Do not weaken policy to create a missing button. +4. If the installer opens, capture that window before continuing the normal + lifecycle checklist. Otherwise preserve the block as the launch result. + Inspect Windows Security Protection history and Malwarebytes reports for + events matching the file and test time. Preserve any detection name and + affected path separately from the reputation dialog. +5. Recheck the file hash and `ZoneId=3` after the observation. Store the + screenshots and results with the exact candidate's security evidence. + +## Interpret the observation + +| Observation | Record | +| --- | --- | +| Installer opens without a warning | No prompt observed on this machine, account, browser, and date; not a universal reputation guarantee | +| Unrecognized app with a valid expected production publisher | Signed unknown-reputation prompt, separately from malware/PUA results | +| Unknown publisher on the intentionally unsigned v0.1.15 MSI | Expected absent signature; not proof of a malware detection | +| No override button | Installation blocked on this path; policy is one possible cause, and needs separate evidence | +| Named malware/PUA or behavioral detection, or invalid signature | Stop release clearance and follow the security investigation procedure | + +A missing screenshot, untested route, missing Internet-zone marker, or policy +block is not a successful Explorer launch. Keep those limitations visible in +the evidence and the [release checklist](RELEASE_CHECKLIST.md). + +References: + +- [Microsoft Defender SmartScreen settings](https://learn.microsoft.com/en-us/windows/security/operating-system-security/virus-and-threat-protection/microsoft-defender-smartscreen/available-settings) +- [MDM PreventOverrideForFilesInShell policy](https://learn.microsoft.com/en-us/windows/client-management/mdm/policy-csp-smartscreen#preventoverrideforfilesinshell) +- [SmartScreen reputation](https://learn.microsoft.com/en-us/windows/apps/package-and-deploy/smartscreen-reputation) diff --git a/package.json b/package.json index f7dbc0b..0f2d6e3 100644 --- a/package.json +++ b/package.json @@ -11,7 +11,7 @@ "lint:firefox": "pnpm --filter @tailchrome/extension lint:firefox", "review:firefox": "pnpm lint:firefox && pnpm zip:firefox && pnpm validate:firefox-publish", "test": "pnpm -r test && pnpm test:e2e-utils && pnpm test:dependencies", - "test:dependencies": "node --test scripts/adbkit-crypto.test.mjs", + "test:dependencies": "node --test scripts/adbkit-crypto.test.mjs scripts/firefox-tooling-dependencies.test.mjs", "test:e2e-utils": "node --test scripts/e2e/*.test.mjs", "test:installer": "bash ./scripts/install.test.sh", "test:homebrew": "node --test scripts/update-homebrew.test.mjs", @@ -31,15 +31,17 @@ "pnpm": { "overrides": { "picomatch": "^4.0.4", - "vite": "^7.3.5", + "vite": "^7.3.7", "postcss": "^8.5.23", - "ws": "^8.20.1", + "ws": "^8.21.3", "tmp": "^0.2.6", - "fast-uri": "^3.1.8", + "fast-uri": "^3.1.9", "defu": "^6.1.5", "brace-expansion@1": "^1.1.21", - "brace-expansion@5": "^5.0.9", - "undici": "^7.29.1", + "brace-expansion@5": "^5.0.12", + "minimatch": "11.0.3", + "undici": "^7.30.1", + "zod@4": "^4.6.6", "esbuild": "^0.28.1", "js-yaml": "^4.3.2", "nanoid@3": "^3.3.17", @@ -49,22 +51,25 @@ "@humanfs/node": "^0.16.8", "node-notifier>uuid": "^11.1.1", "addons-linter>image-size": "-", + "addons-linter>deepmerge": "-", "@devicefarmer/adbkit": "3.3.9", "@devicefarmer/adbkit>node-forge": "-" }, "packageExtensions": { "addons-linter@10.10.0": { "dependencies": { - "probe-image-size": "^7.4.0" + "probe-image-size": "^7.4.0", + "@fastify/deepmerge": "^3.2.4" } } }, "patchedDependencies": { "addons-linter@10.10.0": "patches/addons-linter@10.10.0.patch", + "minimatch@11.0.3": "patches/minimatch@11.0.3.patch", "@devicefarmer/adbkit@3.3.9": "patches/@devicefarmer__adbkit@3.3.9.patch" } }, "devDependencies": { - "puppeteer": "^25.3.0" + "puppeteer": "^25.13.0" } } diff --git a/packages/extension/package.json b/packages/extension/package.json index 114d64c..c7f40a8 100644 --- a/packages/extension/package.json +++ b/packages/extension/package.json @@ -24,7 +24,7 @@ "devDependencies": { "@types/chrome": "^0.2.2", "typescript": "^5.7.0", - "vitest": "^4.1.11", + "vitest": "^4.1.12", "web-ext": "^10.6.0", "wxt": "^0.20.27" } diff --git a/packages/shared/package.json b/packages/shared/package.json index eea4edd..9747fbb 100644 --- a/packages/shared/package.json +++ b/packages/shared/package.json @@ -9,8 +9,8 @@ }, "devDependencies": { "@types/chrome": "^0.2.2", - "happy-dom": "^20.11.1", + "happy-dom": "^21.0.4", "typescript": "^5.7.0", - "vitest": "^4.1.11" + "vitest": "^4.1.12" } } diff --git a/packaging/windows/README.md b/packaging/windows/README.md index c13e6e0..a96c0aa 100644 --- a/packaging/windows/README.md +++ b/packaging/windows/README.md @@ -51,8 +51,10 @@ not eligible for release. ## Release signing SignPath Foundation has accepted the project. Follow the -[SignPath setup guide](../../docs/signpath-setup.md) to configure and run the -separate self-signed test workflow before production certificate issuance. +[SignPath setup guide](../../docs/signpath-setup.md) for the separate self-signed +test workflow and production activation. The Release Candidate workflow fixes +production requests to `tailchrome` / `release-signing` and requires the +verified production publisher before it can use that path. Signed releases follow [WINDOWS_CODE_SIGNING_POLICY.md](../../docs/WINDOWS_CODE_SIGNING_POLICY.md), @@ -74,12 +76,13 @@ The release order is: .\packaging\windows\build-msi.ps1 ` -Version $env:RELEASE_TAG ` -HelperExe .\signed-windows\tailscale-browser-ext-windows-amd64.exe ` - -OutPath .\signed-windows\tailchrome-helper-windows-x64.unsigned.msi ` + -OutPath .\unsigned-msi\tailchrome-helper-windows-x64.msi ` -ExpectedSignerSubject $env:WINDOWS_EXPECTED_SIGNER_SUBJECT ` -SignToolPath $env:WINDOWS_SIGNTOOL_PATH ``` -4. Sign and timestamp the outer MSI with the same publisher. +4. Sign and timestamp the outer MSI with the same publisher, then stage it as + `signed-windows/tailchrome-helper-windows-x64.msi`. 5. Verify both final raw EXEs, the amd64 MSI-embedded EXE, and the outer MSI: ```powershell @@ -145,7 +148,10 @@ Final EXE and MSI hashes are generated only after signing and must match the Defender and Malwarebytes evidence approved for publication. A validly signed SmartScreen unknown-reputation prompt is documented but is not treated as a malware detection; an actual malware, PUA, or behavioral detection blocks the -release. +release. Separately test a +[browser-downloaded MSI launched from Explorer](../../docs/windows-smartscreen-validation.md) +with Mark of the Web intact. A valid signature does not guarantee reputation, +and an absent override button does not by itself identify a Windows policy. ## Architecture diff --git a/patches/README.md b/patches/README.md index 4b2136a..be84721 100644 --- a/patches/README.md +++ b/patches/README.md @@ -1,8 +1,18 @@ # Dependency patches `addons-linter@10.10.0.patch` uses `probe-image-size` for image metadata instead -of the vulnerable `image-size` dependency. Its dependency replacement is declared -in the root pnpm configuration. +of the vulnerable `image-size` dependency. It also replaces `deepmerge` with +`@fastify/deepmerge` to fix [GHSA-gcqx-w48m-w2h4](https://github.com/advisories/GHSA-gcqx-w48m-w2h4), +which has no patched upstream release. A small adapter preserves the linter's +existing array-merge callbacks for manifest schemas. Both dependency replacements +are declared in the root pnpm configuration; the vulnerable packages are removed. + +`minimatch@11.0.3.patch` adds the legacy ES module default export and its type +declaration so `multimatch` and ESLint can use the patched v11 matcher. Version 11 +fixes [GHSA-g3hv-75wg-m249](https://github.com/advisories/GHSA-g3hv-75wg-m249); +the compatibility patch leaves its matching and expansion logic intact. Remove +the patch and version pin once all consumers require a patched matcher and support +its named exports. `@devicefarmer__adbkit@3.3.9.patch` replaces adbkit's uses of `node-forge` with Node.js crypto to address [GHSA-86w9-cpqp-85rv](https://github.com/advisories/GHSA-86w9-cpqp-85rv). @@ -25,5 +35,7 @@ tradeoff. Firefox tooling does not consume those forge-specific APIs. Node.js 22 is already required by this repository. The upstream Apache-2.0 license remains unchanged in the patched package. -Run `pnpm test:dependencies` to exercise the installed patch through both Firefox -tooling dependency paths, including Android authentication and CLI conversions. +Run `pnpm test:dependencies` to exercise the installed patches through both Firefox +tooling dependency paths. The checks cover Android authentication and CLI +conversions, glob filtering, ESLint configuration, prototype-safe merging, and +valid and invalid Firefox manifests and themes. diff --git a/patches/addons-linter@10.10.0.patch b/patches/addons-linter@10.10.0.patch index 5b92958..1167606 100644 --- a/patches/addons-linter@10.10.0.patch +++ b/patches/addons-linter@10.10.0.patch @@ -1,5 +1,5 @@ diff --git a/dist/addons-linter.js b/dist/addons-linter.js -index 1d08d742cc947939861dadd4573e048c700637a8..ecddab4bc28b29b5782645470c022a7b8b678e7c 100644 +index 1d08d742cc947939861dadd4573e048c700637a8..b905559b4c099e339091dc7b2d9f1978dd1bbcf2 100644 --- a/dist/addons-linter.js +++ b/dist/addons-linter.js @@ -3081,12 +3081,19 @@ async function getStreamImageSize(stream) { @@ -27,3 +27,24 @@ index 1d08d742cc947939861dadd4573e048c700637a8..ecddab4bc28b29b5782645470c022a7b @@ -4164 +4171 @@ module.exports = require("@fregante/relaxed-json"); -module.exports = require("image-size"); +module.exports = require("probe-image-size/sync"); +@@ -5130 +5137 @@ exports.deepPatch = deepPatch; +-module.exports = require("deepmerge"); ++module.exports = require("./deepmerge.cjs"); +diff --git a/dist/deepmerge.cjs b/dist/deepmerge.cjs +new file mode 100644 +index 0000000000000000000000000000000000000000..a416d4c713c903d3d5e670263f8559e7cfbaea16 +--- /dev/null ++++ b/dist/deepmerge.cjs +@@ -0,0 +1,12 @@ ++// Adapt the linter's arrayMerge callbacks to the maintained merge implementation. ++const createDeepmerge = require('@fastify/deepmerge'); ++ ++module.exports = (target, source, options = {}) => createDeepmerge({ ++ symbols: true, ++ mergeArray: options.arrayMerge ++ ? ({ isMergeableObject }) => (left, right) => options.arrayMerge(left, right, { ++ ...options, ++ isMergeableObject, ++ }) ++ : undefined, ++})(target, source); diff --git a/patches/minimatch@11.0.3.patch b/patches/minimatch@11.0.3.patch new file mode 100644 index 0000000..5a467fc --- /dev/null +++ b/patches/minimatch@11.0.3.patch @@ -0,0 +1,20 @@ +diff --git a/dist/esm/index.js b/dist/esm/index.js +--- a/dist/esm/index.js ++++ b/dist/esm/index.js +@@ -11,6 +11,7 @@ + } + return cachedMinimatch(pattern, options).match(p); + }; ++export default minimatch; + // The Minimatch objects that minimatch() used most recently. A Map + // keeps its keys in the order they were set, so the first key is the + // one used least recently. +diff --git a/dist/esm/index.d.ts b/dist/esm/index.d.ts +--- a/dist/esm/index.d.ts ++++ b/dist/esm/index.d.ts +@@ -1,4 +1,5 @@ + import { Matcher, type Form } from '@isaacs/nonrecursive-glob-match'; ++export default minimatch; + export type Platform = 'aix' | 'android' | 'darwin' | 'freebsd' | 'haiku' | 'linux' | 'openbsd' | 'sunos' | 'win32' | 'cygwin' | 'netbsd'; + export interface MinimatchOptions { + /** do not expand `{x,y}` style braces */ diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 8f096da..5770295 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -6,15 +6,17 @@ settings: overrides: picomatch: ^4.0.4 - vite: ^7.3.5 + vite: ^7.3.7 postcss: ^8.5.23 - ws: ^8.20.1 + ws: ^8.21.3 tmp: ^0.2.6 - fast-uri: ^3.1.8 + fast-uri: ^3.1.9 defu: ^6.1.5 brace-expansion@1: ^1.1.21 - brace-expansion@5: ^5.0.9 - undici: ^7.29.1 + brace-expansion@5: ^5.0.12 + minimatch: 11.0.3 + undici: ^7.30.1 + zod@4: ^4.6.6 esbuild: ^0.28.1 js-yaml: ^4.3.2 nanoid@3: ^3.3.17 @@ -24,26 +26,30 @@ overrides: '@humanfs/node': ^0.16.8 node-notifier>uuid: ^11.1.1 addons-linter>image-size: '-' + addons-linter>deepmerge: '-' '@devicefarmer/adbkit': 3.3.9 '@devicefarmer/adbkit>node-forge': '-' -packageExtensionsChecksum: sha256-Oi+Gyk7ALxSbbBkCisBJ+JO5YlfS6qsCgApQDmbJaRo= +packageExtensionsChecksum: sha256-vPzfUzMmARF1cH49P3mV0LqsgFH5XcCr/EL/e/oIHhs= patchedDependencies: '@devicefarmer/adbkit@3.3.9': hash: e2865f7e8bf5ea74cbc54d9b7a7c1c368d75d71ed2ab6d05522cf55ada689885 path: patches/@devicefarmer__adbkit@3.3.9.patch addons-linter@10.10.0: - hash: 9976d3cf26612117f223a78b59401c8b1b6f6049f26d577ee30a5d34a9dd95da + hash: 0c0ee1c0a4b0abb4dfef509e85a16b8a6142f04a28628030eb07acce10229510 path: patches/addons-linter@10.10.0.patch + minimatch@11.0.3: + hash: 4b2519785eb3ce44473df07b6ed898976d96dc674e100e7d45d81f8e6b9064eb + path: patches/minimatch@11.0.3.patch importers: .: devDependencies: puppeteer: - specifier: ^25.3.0 - version: 25.3.0(yauzl@3.4.0) + specifier: ^25.13.0 + version: 25.16.0(yauzl@3.4.0) packages/extension: dependencies: @@ -58,8 +64,8 @@ importers: specifier: ^5.7.0 version: 5.9.3 vitest: - specifier: ^4.1.11 - version: 4.1.11(@types/node@25.5.0)(happy-dom@20.11.1)(vite@7.3.6(@types/node@25.5.0)(jiti@2.6.1)) + specifier: ^4.1.12 + version: 4.1.12(@types/node@25.5.0)(happy-dom@21.0.4)(vite@7.3.7(@types/node@25.5.0)(jiti@2.6.1)) web-ext: specifier: ^10.6.0 version: 10.6.0(jiti@2.6.1) @@ -73,14 +79,14 @@ importers: specifier: ^0.2.2 version: 0.2.2 happy-dom: - specifier: ^20.11.1 - version: 20.11.1 + specifier: ^21.0.4 + version: 21.0.4 typescript: specifier: ^5.7.0 version: 5.9.3 vitest: - specifier: ^4.1.11 - version: 4.1.11(@types/node@25.5.0)(happy-dom@20.11.1)(vite@7.3.6(@types/node@25.5.0)(jiti@2.6.1)) + specifier: ^4.1.12 + version: 4.1.12(@types/node@25.5.0)(happy-dom@21.0.4)(vite@7.3.7(@types/node@25.5.0)(jiti@2.6.1)) packages: @@ -332,6 +338,9 @@ packages: resolution: {integrity: sha512-43/qtrDUokr7LJqoF2c3+RInu/t4zfrpYdoSDfYyhg52rwLV6TnOvdG4fXm7IkSB3wErkcmJS9iEhjVtOSEjjA==} engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} + '@fastify/deepmerge@3.2.4': + resolution: {integrity: sha512-kc8GQq5gX9RRhw0rov3DMrN8wS8yRlxJRdDzsYwwdBV/wazuVgc/1K7CKL90tlvu3RlHan6Y0R0aE3nJtBz2eQ==} + '@fluent/syntax@0.19.0': resolution: {integrity: sha512-5D2qVpZrgpjtqU4eNOcWGp1gnUCgjfM+vKGE2y03kKN6z5EBhtx0qdRFbg8QuNNj8wXNoX93KJoYb+NqoxswmQ==} engines: {node: '>=14.0.0', npm: '>=7.0.0'} @@ -360,6 +369,9 @@ packages: resolution: {integrity: sha512-bV0Tgo9K4hfPCek+aMAn81RppFKv2ySDQeMoSZuvTASywNTnVJCArCZE2FWqpvIatKu7VMRLWlR1EazvVhDyhQ==} engines: {node: '>=18.18'} + '@isaacs/nonrecursive-glob-match@1.0.3': + resolution: {integrity: sha512-SI7kyKHq4XXDRozw+r9GlRZkia1ZkFrpLW98r2IC2Bpr8YkFGE3fvjzmxCG0x78A++69HmDNrDvSMYBZmHGpKA==} + '@jridgewell/gen-mapping@0.3.13': resolution: {integrity: sha512-2kkt/7niJ6MgEPxF0bYdQ6etZaA+fQvDcLKckhy1yIQOzaoKjBBjSj63/aLVjYE3qhRt5dvM+uUyfCg6UKCBbA==} @@ -394,8 +406,8 @@ packages: resolution: {integrity: sha512-h104Kh26rR8tm+a3Qkc5S4VLYint3FE48as7+/5oCEcKR2idC/pF1G6AhIXKI+eHPJa/3J9i5z0Al47IeGHPkA==} engines: {node: '>=12'} - '@puppeteer/browsers@3.0.6': - resolution: {integrity: sha512-B/gKoqlFkzhvzsI6jo9K1cZz9o5ypviVv/xu8CwA4grZzyVwN+XfkT+tu8T1zrauuEXv6VhS2oGX+6NL95WcKA==} + '@puppeteer/browsers@3.2.6': + resolution: {integrity: sha512-MJP29gVoHznmqmwhH1tlZqzfeQ3aylTpSSa6WKZXtkwYUH02i9imBmWGTyZrbnAou5paX78SE4jMAUqnEPf8ug==} engines: {node: '>=22.12.0'} hasBin: true peerDependencies: @@ -584,34 +596,34 @@ packages: '@types/ws@8.18.1': resolution: {integrity: sha512-ThVF6DCVhA8kUGy+aazFQ4kXQ7E1Ty7A3ypFOe0IcJV8O/M511G99AW24irKrW56Wt44yG9+ij8FaqoBGkuBXg==} - '@vitest/expect@4.1.11': - resolution: {integrity: sha512-VX2x5vNJXET47KAFzwERI+KRMtTTCSWTfSMKsW7JsUsXV4psq++e3DvZpuTDOpHcxytiDs6p2nhVb2tVDiiUYw==} + '@vitest/expect@4.1.12': + resolution: {integrity: sha512-vFlTt+YEu9WBpNjdGayNmlMVzrWPi1+sv853/7t2FU7hpO5gAFBKHzQmkCq5Xjpr+evegF2994LQT3hF3mRlqQ==} - '@vitest/mocker@4.1.11': - resolution: {integrity: sha512-2XJVD55d1o5AZous5CCGKS74g/riOj9odEt2bQpCVZeblHyHdnMeFl4jl0XjU21stf4mbjUkew2eXQZt65g5CQ==} + '@vitest/mocker@4.1.12': + resolution: {integrity: sha512-fKShNpKZzupWZuY0z7egydvL0sqW4INEZBEExMBMAa6izlENEVHwoXgdaTCaBZ5fwlr4xf2o1wXC83n9RpO+NA==} peerDependencies: msw: ^2.4.9 - vite: ^7.3.5 + vite: ^7.3.7 peerDependenciesMeta: msw: optional: true vite: optional: true - '@vitest/pretty-format@4.1.11': - resolution: {integrity: sha512-yiZzPbGTS9Sr/JpFl8zHrcIkAofNbFV6k21vIgQN/cY/oxZeXhJv5sc/MBJ5jFKWmWs+oJHw0UXLZjmf931+Vw==} + '@vitest/pretty-format@4.1.12': + resolution: {integrity: sha512-XW9O8+Mxx4VpCtkYdMJLZQQwsVryP9wk7cPKDxtXFfwSak6yRh5+2fep/Y0XF/ElBvJHq8bcYdi6aeuai0opZA==} - '@vitest/runner@4.1.11': - resolution: {integrity: sha512-LztvUgdwMNJMIkj3hQnnxiC2Xy1zNxq928W/xhjCLaNCzqTZOudjwbQf6v9IntZGPw132i2Lq2rgTRZHD3JHNw==} + '@vitest/runner@4.1.12': + resolution: {integrity: sha512-NKlVKCr5QnCe8jijdMnmkpHHU+WTqiLFR6G0pHji9uRjXK9xJl1k1nTw6F3pOOj2PDcsDt2GKQMI7wIsaT491w==} - '@vitest/snapshot@4.1.11': - resolution: {integrity: sha512-pN7ikn1ON7h8ee4gIAp4AzyK+zBtJPzVbqOgu5LCEh4VaJVbPQcgYQYJIMGQPXVeJJq1fnfazis7a5pFNPahog==} + '@vitest/snapshot@4.1.12': + resolution: {integrity: sha512-ko1y1Qgb/slzQ9mr+b89Cuqud8WG1TKtsPD8r7ZUBdvVOGt85Af2HwCqHujrhwJq95hs/9RM7fcAPg57o1vlzw==} - '@vitest/spy@4.1.11': - resolution: {integrity: sha512-apNa/prQy2qCeywhnixOHPRCgGNhvg7T4Dapfl1GahLp/R+uhBm5cPyFoNVyqsNd2h1nJxL6BqqdIjiABL60YA==} + '@vitest/spy@4.1.12': + resolution: {integrity: sha512-RGq9x4JNGNTZHEJxvN0oSiJjeSCExm0n2gZKKJZHY9cX5AVA6M7VJILBT3ZJ/tJ/0J9uWT7fETV9/btoi//vSg==} - '@vitest/utils@4.1.11': - resolution: {integrity: sha512-zTCVGpyFsGWBhllOyKlTw/vnr6D9qxsfSDyfbyZmTyjHw5N/VuvzHpHoQjm2ZJzn4RJgx5w4r7V0er69CmLgPQ==} + '@vitest/utils@4.1.12': + resolution: {integrity: sha512-Q3awXrwOfEV+qc3WmO5ONyE0yO7Q1gQ9/oyHxGLZ/pl7N3NO/ZztqQwKLuwMkV+CA1JYSIeO3gkHnRDIo4AVaA==} '@webext-core/fake-browser@1.3.4': resolution: {integrity: sha512-nZcVWr3JpwpS5E6hKpbAwAMBM/AXZShnfW0F76udW8oLd6Kv0nbW6vFS07md4Na/0ntQonk3hFnlQYGYBAlTrA==} @@ -725,8 +737,9 @@ packages: atomically@2.1.1: resolution: {integrity: sha512-P4w9o2dqARji6P7MHprklbfiArZAWvo07yW7qs3pdljb3BWr12FIB7W+p0zJiuiVsUpRO0iZn1kFFcpPegg0tQ==} - balanced-match@1.0.2: - resolution: {integrity: sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw==} + balanced-match@4.0.4: + resolution: {integrity: sha512-BLrgEcRTwX2o6gGxGOCNyMvGSp35YofuYzw9h1IMTRmKqttAZZVU67bdb9Pr2vUHA8+j3i2tJfjO6C6+4myGTA==} + engines: {node: 18 || 20 || >=22} bluebird@3.7.2: resolution: {integrity: sha512-XpNj6GDQzdfW+r2Wnn7xiSAd7TM3jzkxGXBGTtWKuSXv1xUV+azxAm8jdWZN06QTQk+2N2XB9jRDkvbmQmcRtg==} @@ -738,8 +751,9 @@ packages: resolution: {integrity: sha512-F3PH5k5juxom4xktynS7MoFY+NUWH5LC4CnH11YB8NPew+HLpmBLCybSAEyb2F+4pRXhuhWqFesoQd6DAyc2hw==} engines: {node: '>=18'} - brace-expansion@1.1.21: - resolution: {integrity: sha512-9zeA+KLZNNzglF2TPKRQEDyx6Yby7daAkuy8MiPzpXPsYDWi/DRM8jmwUDxokQjYqBpv5DgPiwD4h4ZZSy1Ujw==} + brace-expansion@5.0.12: + resolution: {integrity: sha512-YovQ3rzhaLMIrDjNDMkNS01tea93qhEhG5xy8f6+R0l+dw3Ki+5sCoIoI942iuLZTHWogWktgwVDhU09iNEimQ==} + engines: {node: 20 || >=22} buffer-equal-constant-time@1.0.1: resolution: {integrity: sha512-zRpUiDwd/xk6ADqPMATG8vc9VPrkck7T07OIx0gnjmJAnHnTVXNQG3vfvWNuiZIkwu9KrKdA1iJKfsfTVxE6NA==} @@ -803,8 +817,8 @@ packages: engines: {node: '>=12.13.0'} hasBin: true - chromium-bidi@16.0.1: - resolution: {integrity: sha512-J63PGu/9PpeCwLIcKYyzWP6yaVL5pxuBc0shlYCYM8BaAkmlwiQboXO1iNbOgSDbVklEyYFfNEcHD8oOAWacUA==} + chromium-bidi@157.0.8090-0: + resolution: {integrity: sha512-KJw7IQgqXwxpJgJlEIPg5mr2ZoqA+jkTRtc5EABI7sUJ3bu3cpI7NuEBoj4Gn1AsF78CaT9So5WQWspK3/wYag==} engines: {node: '>=20.19.0 <22.0.0 || >=22.12.0'} peerDependencies: devtools-protocol: '*' @@ -867,9 +881,6 @@ packages: resolution: {integrity: sha512-gk/Z852D2Wtb//0I+kRFNKKE9dIIVirjoqPoA1wJU+XePVXZfGeBpk45+A1rKO4Q43prqWBNY/MiIeRLbPWUaA==} engines: {node: '>=4.0.0'} - concat-map@0.0.1: - resolution: {integrity: sha512-/Srv4dswyQNBfohGpz9o6Yb3Gz3SrUDqBH5rTuhGR7ahtlbYKnVxw2bCFMRljaA7EXHaXZ8wsHdodFvbkhKmqg==} - concat-stream@1.6.2: resolution: {integrity: sha512-27HBghJxjiZtIk3Ycvn/4kbJk/1uZuJFfuPEns6LaEvpvG1f0hTea8lilrouyo9mVc2GWdcEZ8OLoGmSADlrCw==} engines: {'0': node >= 0.8} @@ -963,10 +974,6 @@ packages: deep-is@0.1.4: resolution: {integrity: sha512-oIPzksmTg4/MriiaYGO+okXDT7ztn/w3Eptv/+gSIdMdKsJo0u4CfYNFJPy+4SKMuCqGw2wxnA+URMg3t8a/bQ==} - deepmerge@4.3.1: - resolution: {integrity: sha512-3sUqbMEc77XqpdNO7FRyRog+eW3ph+GYCbj+rK+uYyRMuwsVy0rMiVtPn+QJlKFvWP/1PYpapqYn0Me2knFn+A==} - engines: {node: '>=0.10.0'} - default-browser-id@5.0.1: resolution: {integrity: sha512-x1VCxdX4t+8wVfd1so/9w+vQ4vx7lKd2Qp5tDRutErwmR85OgmfX7RlLRMWafRMY7hbEiXIbudNrjOAPa/hL8Q==} engines: {node: '>=18'} @@ -996,8 +1003,8 @@ packages: destr@2.0.5: resolution: {integrity: sha512-ugFTXCtDZunbzasqBxrK93Ik/DRYsO6S/fedkWEMKqt04xZ4csmnmwGDBAb07QWNaGMAmnTIemsYZCksjATwsA==} - devtools-protocol@0.0.1638949: - resolution: {integrity: sha512-mXwg4Fqnv0WR4iuAT/gYUmctNkjILwXFHyZ+m7Ty1dfr0ezZt2U3gnrrJTfRobJTHoXf+IbuFvFITzLrLFjwJA==} + devtools-protocol@0.0.1704951: + resolution: {integrity: sha512-GQhQOs9u/Mvm1zMtJIH872JS4AskuZdUSsPNPk4ChahtWAUqgz6atEtIsMt+nO7MqF1Ic4HxII/k8Cu36JivNg==} dom-serializer@2.0.0: resolution: {integrity: sha512-wIkAryiqt/nV5EQKqQpo3SToSOV9J0DnbJqwK7Wv/Trc92zIAYZ4FlMu+JPFW1DfGFt81ZTCGgDEabffXeLyJg==} @@ -1178,8 +1185,8 @@ packages: resolution: {integrity: sha512-dwsoQlS7h9hMeYUq1W++23NDcBLV4KqONnITDV9DjfS3q1SgDGVrBdvvTLUotWtPSD7asWDV9/CmsZPy8Hf70A==} engines: {node: '>=6'} - fast-uri@3.1.8: - resolution: {integrity: sha512-GZMtZUTNRpOVIECoXwLNZS5xUGE+mVNbTB8h/7Rwh2TFWcBQiPzTgyZi05BF9UMZKkLJv8XBRJTlU7zg8+ZfMg==} + fast-uri@3.1.9: + resolution: {integrity: sha512-hS/0Wt3Ya043oKXs0sIxrMpKQITXhMLIrVAKKXi4gozGC9v7YRWVnXIZzjNPTO02M9BdxLCWqK1yRXgNziVyJQ==} fdir@6.5.0: resolution: {integrity: sha512-tIbYtZbucOs0BRGqPJkshJUYdL+SDH7dVM8gjy+ERp3WAUjLEFJE+02kanyHtwjWOnwrKYBiwAmM0p4kLJAnXg==} @@ -1290,8 +1297,8 @@ packages: growly@1.3.0: resolution: {integrity: sha512-+xGQY0YyAWCnqy7Cd++hc2JqMYzlm0dG30Jd0beaA64sROr8C4nt8Yc9V5Ro3avlSUDTN0ulqP/VBKi1/lLygw==} - happy-dom@20.11.1: - resolution: {integrity: sha512-XSt8tMzbW9ymE7687xztkO1ckR7qJNQ3LywY9vlYGhGi3zXrGBHuUo2Cl1ztZaICW+1eAGdkLbj6iwVqDT33kg==} + happy-dom@21.0.4: + resolution: {integrity: sha512-tFm+GaLBgo6o0awHnvHaNoraVo27qJ+2tZEtZ+cIa08hXbeitrxAJajLI05hsUy/2/YTKcUjQYzHe5mCcraLBw==} engines: {node: '>=20.0.0'} has-flag@4.0.0: @@ -1618,8 +1625,9 @@ packages: resolution: {integrity: sha512-VP79XUPxV2CigYP3jWwAUFSku2aKqBH7uTAapFWCBqutsbmDo96KY5o8uh6U+/YSIn5OxJnXp73beVkpqMIGhA==} engines: {node: '>=18'} - minimatch@3.1.5: - resolution: {integrity: sha512-VgjWUsnnT6n+NUk6eZq77zeFdpW2LWDzP6zFGrCbHXiYNul5Dzqk2HHQ5uFH2DNW5Xbp8+jVzaeNt94ssEEl4w==} + minimatch@11.0.3: + resolution: {integrity: sha512-iny/40PEGkNJQ5/Pv6z3nm6FbRAby32GeZRjCUJk2WnNDbgPSTcdI+DDvLqsgBdD4cD5sMtMheqPPnehCCa8Nw==} + engines: {node: 18 || 20 || >=22} minimist@1.2.8: resolution: {integrity: sha512-2yyAR8qBkN3YuheJanUpWC5U3bb5osDywNB8RzDVlDwDHbocAJveqqj1u8+SVD7jkWT4yvsHCpWqqWqAxb0zCA==} @@ -1630,8 +1638,8 @@ packages: mlly@1.8.2: resolution: {integrity: sha512-d+ObxMQFmbt10sretNDytwt85VrbkhhUA/JBGm1MPaWJ65Cl4wOgLaB1NYvJSZ0Ef03MMEU/0xpPMXUIQ29UfA==} - modern-tar@0.7.7: - resolution: {integrity: sha512-t9VmxaqrmANnEOBhpSDI6HD192Ge48k8vmWqQQL7hSFEqHEYwZbbsu49+aKLWZeRvFs3j1pMhXOqqF4kPlvjkQ==} + modern-tar@0.8.6: + resolution: {integrity: sha512-LYSks0tNVqbtez/9OB0YFP6qLRSqkdAxJWOQpVaR67lNTbj2zNLyYpowkRMia5lXLCZKzxwoxkxH2MbbBR2aEg==} engines: {node: '>=18.0.0'} ms@2.0.0: @@ -1843,12 +1851,12 @@ packages: resolution: {integrity: sha512-LjgDO2zPtoXP2wJpDjZrGdojii1uqO0cnwKoIoUzkfS98HDmbeiGmYiXo3lXeFlq2xvne1QFQhwYXSUCLKtEuA==} engines: {node: '>=12.20'} - puppeteer-core@25.3.0: - resolution: {integrity: sha512-fm+wpUr2oigH1PXZvwgATrM2tYWHMDG8ASzTEe9uukCye4X5Ldx1K5BTHPFKITrIWvQQAQ256d1NpbEveBcKjA==} + puppeteer-core@25.16.0: + resolution: {integrity: sha512-VA5Pf54N8shfopNkZZXCdiiwfnnY8ZJYAMqFQRhlH5mGUhfwf53Ar770GPtdpTDLUqvQeYpIBtC9/G2Jij2IJw==} engines: {node: '>=22.12.0'} - puppeteer@25.3.0: - resolution: {integrity: sha512-O1tx8S315aw8eI99HZ5ZNcVEzJ9+jKF//eO5UvfZ3cXJ6okZ5sX3Y50u7DJaM+ewEK4LqXP068tBhfRaWikj+g==} + puppeteer@25.16.0: + resolution: {integrity: sha512-LOr3reYnxAYYfQkpopz1fQnL0LdvqhpR5U2Fu+QnwzTX2gpVTHsn91UETo5NNC1md2/oC54Zu1ChBXgZDNSP1A==} engines: {node: '>=22.12.0'} hasBin: true @@ -2127,8 +2135,8 @@ packages: resolution: {integrity: sha512-TeTSQ6H5YHvpqVwBRcnLDCBnDOHWYu7IvGbHT6N8AOymcr9PJGjc1GTtiWZTYg0NCgYwvnYWEkVChQAr9bjfwA==} engines: {node: '>=16'} - typed-query-selector@2.12.2: - resolution: {integrity: sha512-EOPFbyIub4ngnEdqi2yOcNeDLaX/0jcE1JoAXQDDMIthap7FoN795lc/SHfIq2d416VufXpM8z/lD+WRm2gfOQ==} + typed-query-selector@2.12.3: + resolution: {integrity: sha512-/dtuMZyutHLlrxWhhC1uib00ELUr2dZ8C9B8YzZYsJmeE3V56OxRblrSM2UaF142pcMtak7ehZ6+poWGeehNIg==} typedarray@0.0.6: resolution: {integrity: sha512-/aCDEGatGvZ2BIk+HmLf4ifCJFwvKFNb9/JeZPMulfgFracn9QFcAf5GO8B/mweUjSoblS5In0cWhqpfs/5PQA==} @@ -2147,8 +2155,8 @@ packages: undici-types@7.18.2: resolution: {integrity: sha512-AsuCzffGHJybSaRrmr5eHr81mwJU3kjw6M+uprWvCXiNeN9SOGwQ3Jn8jb8m3Z6izVgknn1R0FTCEAP2QrLY/w==} - undici@7.30.0: - resolution: {integrity: sha512-dkrQXeHSaoamnItlYbmzG0wFYrM0ZwDxCIg0A7aKjTyyhh9svRzCNFEzV+Vm05/yehjCzjDZ31KXfGEjYSztDQ==} + undici@7.30.1: + resolution: {integrity: sha512-03KrMbjIFDWQR5RNPrSw3bd1r12JpyFQl9/yxjUbJtqkjmllqC5lFjZh6ujeuJCKr8EOQvRW872Oy/az+nLYxg==} engines: {node: '>=20.18.1'} unimport@6.0.2: @@ -2194,8 +2202,8 @@ packages: engines: {node: ^18.0.0 || ^20.0.0 || >=22.0.0} hasBin: true - vite@7.3.6: - resolution: {integrity: sha512-4XP60spRGjSZFf1qYH+dJIkK2znL3zQfl9KkOV9MkkRR/3Dls0dxaBsQPTloEc5BLXWPL9vsOxopxyKoMmDueg==} + vite@7.3.7: + resolution: {integrity: sha512-AHEzTORMbi7/7aXp7w7KZ5+DCUdSeLsJz0grY8xHpc9DHdYb0vQu6DqJfm2tOw3gDExNgPgnJTXxM6syYFHaCA==} engines: {node: ^20.19.0 || >=22.12.0} hasBin: true peerDependencies: @@ -2234,23 +2242,23 @@ packages: yaml: optional: true - vitest@4.1.11: - resolution: {integrity: sha512-fhACrNXUidIbGSBr5FlbuBkO7VWC1ZyLl0DO4CU2DrQoAPxX84Ysxs+HeGQpii5lZWV1Q4gBZTTu49mF+A6Edw==} + vitest@4.1.12: + resolution: {integrity: sha512-5eWdz2yb3ajxWF3C8C4TjkXl7FGm3n2E/VlazALrQHzK7nYMSGFnCZto0bbPNl77AwkOZVLk0YnBAejUu0NiWA==} engines: {node: ^20.0.0 || ^22.0.0 || >=24.0.0} hasBin: true peerDependencies: '@edge-runtime/vm': '*' '@opentelemetry/api': ^1.9.0 '@types/node': ^20.0.0 || ^22.0.0 || >=24.0.0 - '@vitest/browser-playwright': 4.1.11 - '@vitest/browser-preview': 4.1.11 - '@vitest/browser-webdriverio': 4.1.11 - '@vitest/coverage-istanbul': 4.1.11 - '@vitest/coverage-v8': 4.1.11 - '@vitest/ui': 4.1.11 + '@vitest/browser-playwright': 4.1.12 + '@vitest/browser-preview': 4.1.12 + '@vitest/browser-webdriverio': ^4.1.11 + '@vitest/coverage-istanbul': 4.1.12 + '@vitest/coverage-v8': 4.1.12 + '@vitest/ui': 4.1.12 happy-dom: '*' jsdom: '*' - vite: ^7.3.5 + vite: ^7.3.7 peerDependenciesMeta: '@edge-runtime/vm': optional: true @@ -2295,8 +2303,8 @@ packages: engines: {node: '>=20.0.0', npm: '>=8.0.0'} hasBin: true - webdriver-bidi-protocol@0.4.2: - resolution: {integrity: sha512-VSV+fzfChirL3e7jay2yUC7B4HQCGtEWEg/MSSQbK+qWbqeGlRLlXTzPpYr3XGUvbpDHumWZBJxgesg4N7dbtA==} + webdriver-bidi-protocol@1.0.1: + resolution: {integrity: sha512-WXWs/aXF2a6Al1Z2/V/7Gp2oPZOAAmHjJOTmv4KCXRJ122IMj3tSSMc6a4q3K4QOmhQbse/Ahr+oTVJOU2dUiw==} webpack-virtual-modules@0.6.2: resolution: {integrity: sha512-66/V2i5hQanC51vBQKPH4aI8NMAcBW59FVBs+rC7eGHupMyfn34q7rZIE+ETlJ+XTevqfUhVVBgSUNSW2flEUQ==} @@ -2362,8 +2370,8 @@ packages: resolution: {integrity: sha512-42AtmgqjV+X1VpdOfyTGOYRi0/zsoLqtXQckTmqTeybT+BDIbM/Guxo7x3pE2vtpr1ok6xRqM9OpBe+Jyoqyww==} engines: {node: '>=18'} - ws@8.21.0: - resolution: {integrity: sha512-Vsp28b7DRcimFQvrqu2Wek3z1iYxDCWqHYB8Qsnk/S4RfaCQzPGPyBNuVjJV3cd6UiKtUtp6sNM77gWvzcCH+g==} + ws@8.22.1: + resolution: {integrity: sha512-oyL6OPYme/CmiFvNuGzeoxCJ4nOrZE2O1FwM9MWM1AsGri6nLXB2pg+lNA8aLeXMSav0J6eIVS1j6vUPzUtK9g==} engines: {node: '>=10.0.0'} peerDependencies: bufferutil: ^4.0.1 @@ -2431,11 +2439,8 @@ packages: zip-dir@2.0.0: resolution: {integrity: sha512-uhlsJZWz26FLYXOD6WVuq+fIcZ3aBPGo/cFdiLlv3KNwpa52IF3ISV8fLhQLiqVu5No3VhlqlgthN6gehil1Dg==} - zod@3.25.76: - resolution: {integrity: sha512-gzUt/qt81nXsFGKIFcC3YnfEAx5NkunCfnDlvuBSSFS02bcXu4Lmea0AFIUwbLWxWPx3d9p8S5QoaujKcNQxcQ==} - - zod@4.3.6: - resolution: {integrity: sha512-rftlrkhHZOcjDwkGlnUtZZkvaPHCsDATp4pGpuOOMDaTdDDXF91wuVDJoWoPsKX/3YPQ5fHuF3STjcYyKr+Qhg==} + zod@4.6.7: + resolution: {integrity: sha512-g8W2D2kU6a8untc053fX1uVBKzM7yqAxW/3zwk83+6RyF2+SKOuV+c0wBDhUwzV1PaGapmZH+rmcUzPf+3CGwg==} snapshots: @@ -2580,7 +2585,7 @@ snapshots: dependencies: '@eslint/object-schema': 2.1.7 debug: 4.4.3 - minimatch: 3.1.5 + minimatch: 11.0.3(patch_hash=4b2519785eb3ce44473df07b6ed898976d96dc674e100e7d45d81f8e6b9064eb) transitivePeerDependencies: - supports-color @@ -2601,7 +2606,7 @@ snapshots: ignore: 5.3.2 import-fresh: 3.3.1 js-yaml: 4.3.2 - minimatch: 3.1.5 + minimatch: 11.0.3(patch_hash=4b2519785eb3ce44473df07b6ed898976d96dc674e100e7d45d81f8e6b9064eb) strip-json-comments: 3.1.1 transitivePeerDependencies: - supports-color @@ -2615,6 +2620,8 @@ snapshots: '@eslint/core': 0.17.0 levn: 0.4.1 + '@fastify/deepmerge@3.2.4': {} + '@fluent/syntax@0.19.0': {} '@fregante/relaxed-json@2.0.0': {} @@ -2635,6 +2642,8 @@ snapshots: '@humanwhocodes/retry@0.4.3': {} + '@isaacs/nonrecursive-glob-match@1.0.3': {} + '@jridgewell/gen-mapping@0.3.13': dependencies: '@jridgewell/sourcemap-codec': 1.5.5 @@ -2670,9 +2679,9 @@ snapshots: '@pnpm/network.ca-file': 1.0.2 config-chain: 1.1.13 - '@puppeteer/browsers@3.0.6(yauzl@3.4.0)': + '@puppeteer/browsers@3.2.6(yauzl@3.4.0)': dependencies: - modern-tar: 0.7.7 + modern-tar: 0.8.6 yargs: 18.0.0 optionalDependencies: yauzl: 3.4.0 @@ -2790,44 +2799,44 @@ snapshots: dependencies: '@types/node': 25.5.0 - '@vitest/expect@4.1.11': + '@vitest/expect@4.1.12': dependencies: '@standard-schema/spec': 1.1.0 '@types/chai': 5.2.3 - '@vitest/spy': 4.1.11 - '@vitest/utils': 4.1.11 + '@vitest/spy': 4.1.12 + '@vitest/utils': 4.1.12 chai: 6.2.2 tinyrainbow: 3.1.0 - '@vitest/mocker@4.1.11(vite@7.3.6(@types/node@25.5.0)(jiti@2.6.1))': + '@vitest/mocker@4.1.12(vite@7.3.7(@types/node@25.5.0)(jiti@2.6.1))': dependencies: - '@vitest/spy': 4.1.11 + '@vitest/spy': 4.1.12 estree-walker: 3.0.3 magic-string: 0.30.21 optionalDependencies: - vite: 7.3.6(@types/node@25.5.0)(jiti@2.6.1) + vite: 7.3.7(@types/node@25.5.0)(jiti@2.6.1) - '@vitest/pretty-format@4.1.11': + '@vitest/pretty-format@4.1.12': dependencies: tinyrainbow: 3.1.0 - '@vitest/runner@4.1.11': + '@vitest/runner@4.1.12': dependencies: - '@vitest/utils': 4.1.11 + '@vitest/utils': 4.1.12 pathe: 2.0.3 - '@vitest/snapshot@4.1.11': + '@vitest/snapshot@4.1.12': dependencies: - '@vitest/pretty-format': 4.1.11 - '@vitest/utils': 4.1.11 + '@vitest/pretty-format': 4.1.12 + '@vitest/utils': 4.1.12 magic-string: 0.30.21 pathe: 2.0.3 - '@vitest/spy@4.1.11': {} + '@vitest/spy@4.1.12': {} - '@vitest/utils@4.1.11': + '@vitest/utils@4.1.12': dependencies: - '@vitest/pretty-format': 4.1.11 + '@vitest/pretty-format': 4.1.12 convert-source-map: 2.0.0 tinyrainbow: 3.1.0 @@ -2863,8 +2872,9 @@ snapshots: acorn@8.16.0: {} - addons-linter@10.10.0(patch_hash=9976d3cf26612117f223a78b59401c8b1b6f6049f26d577ee30a5d34a9dd95da)(jiti@2.6.1): + addons-linter@10.10.0(patch_hash=0c0ee1c0a4b0abb4dfef509e85a16b8a6142f04a28628030eb07acce10229510)(jiti@2.6.1): dependencies: + '@fastify/deepmerge': 3.2.4 '@fluent/syntax': 0.19.0 '@fregante/relaxed-json': 2.0.0 '@mdn/browser-compat-data': 8.0.8 @@ -2875,7 +2885,6 @@ snapshots: columnify: 1.6.0 common-tags: 1.8.2 css-tree: 3.2.1 - deepmerge: 4.3.1 eslint: 9.39.4(jiti@2.6.1) eslint-plugin-no-unsanitized: 4.1.5(eslint@9.39.4(jiti@2.6.1)) eslint-visitor-keys: 5.0.1 @@ -2921,7 +2930,7 @@ snapshots: ajv@8.20.0: dependencies: fast-deep-equal: 3.1.3 - fast-uri: 3.1.8 + fast-uri: 3.1.9 json-schema-traverse: 1.0.0 require-from-string: 2.0.2 @@ -2964,7 +2973,7 @@ snapshots: stubborn-fs: 2.0.0 when-exit: 2.1.5 - balanced-match@1.0.2: {} + balanced-match@4.0.4: {} bluebird@3.7.2: {} @@ -2981,10 +2990,9 @@ snapshots: widest-line: 5.0.0 wrap-ansi: 9.0.2 - brace-expansion@1.1.21: + brace-expansion@5.0.12: dependencies: - balanced-match: 1.0.2 - concat-map: 0.0.1 + balanced-match: 4.0.4 buffer-equal-constant-time@1.0.1: {} @@ -3050,7 +3058,7 @@ snapshots: parse5: 7.3.0 parse5-htmlparser2-tree-adapter: 7.1.0 parse5-parser-stream: 7.1.2 - undici: 7.30.0 + undici: 7.30.1 whatwg-mimetype: 4.0.0 chokidar@5.0.0: @@ -3066,11 +3074,11 @@ snapshots: transitivePeerDependencies: - supports-color - chromium-bidi@16.0.1(devtools-protocol@0.0.1638949): + chromium-bidi@157.0.8090-0(devtools-protocol@0.0.1704951): dependencies: - devtools-protocol: 0.0.1638949 + devtools-protocol: 0.0.1704951 mitt: 3.0.1 - zod: 3.25.76 + zod: 4.6.7 ci-info@4.4.0: {} @@ -3122,8 +3130,6 @@ snapshots: common-tags@1.8.2: {} - concat-map@0.0.1: {} - concat-stream@1.6.2: dependencies: buffer-from: 1.1.2 @@ -3200,8 +3206,6 @@ snapshots: deep-is@0.1.4: {} - deepmerge@4.3.1: {} - default-browser-id@5.0.1: {} default-browser@5.5.0: @@ -3223,7 +3227,7 @@ snapshots: destr@2.0.5: {} - devtools-protocol@0.0.1638949: {} + devtools-protocol@0.0.1704951: {} dom-serializer@2.0.0: dependencies: @@ -3371,7 +3375,7 @@ snapshots: is-glob: 4.0.3 json-stable-stringify-without-jsonify: 1.0.1 lodash.merge: 4.6.2 - minimatch: 3.1.5 + minimatch: 11.0.3(patch_hash=4b2519785eb3ce44473df07b6ed898976d96dc674e100e7d45d81f8e6b9064eb) natural-compare: 1.4.0 optionator: 0.9.4 optionalDependencies: @@ -3425,7 +3429,7 @@ snapshots: fast-redact@3.5.0: {} - fast-uri@3.1.8: {} + fast-uri@3.1.9: {} fdir@6.5.0(picomatch@4.0.4): optionalDependencies: @@ -3524,7 +3528,7 @@ snapshots: growly@1.3.0: {} - happy-dom@20.11.1: + happy-dom@21.0.4: dependencies: '@types/node': 25.5.0 '@types/whatwg-mimetype': 3.0.2 @@ -3532,7 +3536,7 @@ snapshots: buffer-image-size: 0.6.4 entities: 7.0.1 whatwg-mimetype: 3.0.0 - ws: 8.21.0 + ws: 8.22.1 transitivePeerDependencies: - bufferutil - utf-8-validate @@ -3824,9 +3828,10 @@ snapshots: mimic-function@5.0.1: {} - minimatch@3.1.5: + minimatch@11.0.3(patch_hash=4b2519785eb3ce44473df07b6ed898976d96dc674e100e7d45d81f8e6b9064eb): dependencies: - brace-expansion: 1.1.21 + '@isaacs/nonrecursive-glob-match': 1.0.3 + brace-expansion: 5.0.12 minimist@1.2.8: {} @@ -3839,7 +3844,7 @@ snapshots: pkg-types: 1.3.1 ufo: 1.6.3 - modern-tar@0.7.7: {} + modern-tar@0.8.6: {} ms@2.0.0: {} @@ -3850,7 +3855,7 @@ snapshots: '@types/minimatch': 3.0.5 array-differ: 4.0.0 array-union: 3.0.1 - minimatch: 3.1.5 + minimatch: 11.0.3(patch_hash=4b2519785eb3ce44473df07b6ed898976d96dc674e100e7d45d81f8e6b9064eb) nano-spawn@2.1.0: {} @@ -4090,7 +4095,7 @@ snapshots: jsonwebtoken: 9.0.3 listr2: 10.2.1 ofetch: 1.5.1 - zod: 4.3.6 + zod: 4.6.7 punycode@2.3.1: {} @@ -4098,28 +4103,28 @@ snapshots: dependencies: escape-goat: 4.0.0 - puppeteer-core@25.3.0(yauzl@3.4.0): + puppeteer-core@25.16.0(yauzl@3.4.0): dependencies: - '@puppeteer/browsers': 3.0.6(yauzl@3.4.0) - chromium-bidi: 16.0.1(devtools-protocol@0.0.1638949) - devtools-protocol: 0.0.1638949 - typed-query-selector: 2.12.2 - webdriver-bidi-protocol: 0.4.2 - ws: 8.21.0 + '@puppeteer/browsers': 3.2.6(yauzl@3.4.0) + chromium-bidi: 157.0.8090-0(devtools-protocol@0.0.1704951) + devtools-protocol: 0.0.1704951 + typed-query-selector: 2.12.3 + webdriver-bidi-protocol: 1.0.1 + ws: 8.22.1 transitivePeerDependencies: - bufferutil - proxy-agent - utf-8-validate - yauzl - puppeteer@25.3.0(yauzl@3.4.0): + puppeteer@25.16.0(yauzl@3.4.0): dependencies: - '@puppeteer/browsers': 3.0.6(yauzl@3.4.0) - chromium-bidi: 16.0.1(devtools-protocol@0.0.1638949) - devtools-protocol: 0.0.1638949 + '@puppeteer/browsers': 3.2.6(yauzl@3.4.0) + chromium-bidi: 157.0.8090-0(devtools-protocol@0.0.1704951) + devtools-protocol: 0.0.1704951 lilconfig: 3.1.3 - puppeteer-core: 25.3.0(yauzl@3.4.0) - typed-query-selector: 2.12.2 + puppeteer-core: 25.16.0(yauzl@3.4.0) + typed-query-selector: 2.12.3 transitivePeerDependencies: - bufferutil - proxy-agent @@ -4390,7 +4395,7 @@ snapshots: type-fest@4.41.0: {} - typed-query-selector@2.12.2: {} + typed-query-selector@2.12.3: {} typedarray@0.0.6: {} @@ -4402,7 +4407,7 @@ snapshots: undici-types@7.18.2: {} - undici@7.30.0: {} + undici@7.30.1: {} unimport@6.0.2: dependencies: @@ -4465,7 +4470,7 @@ snapshots: debug: 4.4.3 es-module-lexer: 1.7.0 pathe: 2.0.3 - vite: 7.3.6(@types/node@25.5.0)(jiti@2.6.1) + vite: 7.3.7(@types/node@25.5.0)(jiti@2.6.1) transitivePeerDependencies: - '@types/node' - jiti @@ -4480,7 +4485,7 @@ snapshots: - tsx - yaml - vite@7.3.6(@types/node@25.5.0)(jiti@2.6.1): + vite@7.3.7(@types/node@25.5.0)(jiti@2.6.1): dependencies: esbuild: 0.28.1 fdir: 6.5.0(picomatch@4.0.4) @@ -4493,15 +4498,15 @@ snapshots: fsevents: 2.3.3 jiti: 2.6.1 - vitest@4.1.11(@types/node@25.5.0)(happy-dom@20.11.1)(vite@7.3.6(@types/node@25.5.0)(jiti@2.6.1)): + vitest@4.1.12(@types/node@25.5.0)(happy-dom@21.0.4)(vite@7.3.7(@types/node@25.5.0)(jiti@2.6.1)): dependencies: - '@vitest/expect': 4.1.11 - '@vitest/mocker': 4.1.11(vite@7.3.6(@types/node@25.5.0)(jiti@2.6.1)) - '@vitest/pretty-format': 4.1.11 - '@vitest/runner': 4.1.11 - '@vitest/snapshot': 4.1.11 - '@vitest/spy': 4.1.11 - '@vitest/utils': 4.1.11 + '@vitest/expect': 4.1.12 + '@vitest/mocker': 4.1.12(vite@7.3.7(@types/node@25.5.0)(jiti@2.6.1)) + '@vitest/pretty-format': 4.1.12 + '@vitest/runner': 4.1.12 + '@vitest/snapshot': 4.1.12 + '@vitest/spy': 4.1.12 + '@vitest/utils': 4.1.12 es-module-lexer: 2.1.0 expect-type: 1.3.0 magic-string: 0.30.21 @@ -4513,11 +4518,11 @@ snapshots: tinyexec: 1.0.4 tinyglobby: 0.2.17 tinyrainbow: 3.1.0 - vite: 7.3.6(@types/node@25.5.0)(jiti@2.6.1) + vite: 7.3.7(@types/node@25.5.0)(jiti@2.6.1) why-is-node-running: 2.3.0 optionalDependencies: '@types/node': 25.5.0 - happy-dom: 20.11.1 + happy-dom: 21.0.4 transitivePeerDependencies: - msw @@ -4563,7 +4568,7 @@ snapshots: dependencies: '@babel/runtime': 8.0.0 '@devicefarmer/adbkit': 3.3.9(patch_hash=e2865f7e8bf5ea74cbc54d9b7a7c1c368d75d71ed2ab6d05522cf55ada689885) - addons-linter: 10.10.0(patch_hash=9976d3cf26612117f223a78b59401c8b1b6f6049f26d577ee30a5d34a9dd95da)(jiti@2.6.1) + addons-linter: 10.10.0(patch_hash=0c0ee1c0a4b0abb4dfef509e85a16b8a6142f04a28628030eb07acce10229510)(jiti@2.6.1) camelcase: 8.0.0 chrome-launcher: 1.2.0 debounce: 1.2.1 @@ -4593,7 +4598,7 @@ snapshots: - safe-compare - supports-color - webdriver-bidi-protocol@0.4.2: {} + webdriver-bidi-protocol@1.0.1: {} webpack-virtual-modules@0.6.2: {} @@ -4653,7 +4658,7 @@ snapshots: string-width: 7.2.0 strip-ansi: 7.2.0 - ws@8.21.0: {} + ws@8.22.1: {} wsl-utils@0.3.1: dependencies: @@ -4701,7 +4706,7 @@ snapshots: scule: 1.3.0 tinyglobby: 0.2.17 unimport: 6.0.2 - vite: 7.3.6(@types/node@25.5.0)(jiti@2.6.1) + vite: 7.3.7(@types/node@25.5.0)(jiti@2.6.1) vite-node: 3.2.4(@types/node@25.5.0)(jiti@2.6.1) web-ext-run: 0.2.4 optionalDependencies: @@ -4767,6 +4772,4 @@ snapshots: async: 3.2.6 jszip: 3.10.1 - zod@3.25.76: {} - - zod@4.3.6: {} + zod@4.6.7: {} diff --git a/scripts/firefox-tooling-dependencies.test.mjs b/scripts/firefox-tooling-dependencies.test.mjs new file mode 100644 index 0000000..3b7b15f --- /dev/null +++ b/scripts/firefox-tooling-dependencies.test.mjs @@ -0,0 +1,98 @@ +import assert from 'node:assert/strict'; +import { mkdtempSync, rmSync, writeFileSync } from 'node:fs'; +import { createRequire } from 'node:module'; +import { tmpdir } from 'node:os'; +import { join } from 'node:path'; +import test from 'node:test'; + +const extensionRequire = createRequire(new URL('../packages/extension/package.json', import.meta.url)); +const webExtRequire = createRequire(extensionRequire.resolve('web-ext')); +const wxtRequire = createRequire(extensionRequire.resolve('wxt')); +const webExtRunRequire = createRequire(wxtRequire.resolve('web-ext-run')); +const addonRequire = createRequire(webExtRequire.resolve('addons-linter')); +const merge = addonRequire('./deepmerge.cjs'); +const { createInstance } = addonRequire('addons-linter'); +const { loadESLint } = addonRequire('eslint'); + +for (const [name, requireFrom] of [['web-ext', webExtRequire], ['web-ext-run', webExtRunRequire]]) { + test(`${name} filters extension files with the patched glob matcher`, async () => { + const { default: multimatch } = await import(requireFrom.resolve('multimatch')); + const files = ['src/background.js', 'src/background.test.js', 'src/popup.css', '.hidden.js', 'manifest.json']; + assert.deepEqual( + multimatch(files, ['**/*.{js,css}', '!**/*.test.js'], { dot: true }), + ['src/background.js', 'src/popup.css', '.hidden.js'], + ); + assert.deepEqual(multimatch(files, '*.JS', { matchBase: true, nocase: true }), [ + 'src/background.js', 'src/background.test.js', + ]); + }); +} + +for (const useFlatConfig of [true, false]) { + test(`ESLint ${useFlatConfig ? 'flat' : 'legacy'} config keeps file overrides and exclusions`, async () => { + const ESLint = await loadESLint({ useFlatConfig }); + const rules = { 'no-eval': 'error' }; + const eslint = new ESLint(useFlatConfig ? { + overrideConfigFile: true, + overrideConfig: [{ files: ['**/*.js'], ignores: ['**/skip.js'], rules }], + } : { + useEslintrc: false, + overrideConfig: { overrides: [{ files: ['**/*.js'], excludedFiles: ['**/skip.js'], rules }] }, + }); + const [checked] = await eslint.lintText('eval("1 + 1");', { filePath: 'scripts/checked.js' }); + const [excluded] = await eslint.lintText('eval("1 + 1");', { filePath: 'scripts/skip.js' }); + assert.deepEqual(checked.messages.map(message => message.ruleId), ['no-eval']); + assert.deepEqual(excluded.messages, []); + }); +} + +for (const side of ['target', 'source']) { + test(`schema merging rejects prototype keys in the ${side} without mutating input`, () => { + const payload = JSON.parse(`{ + "__proto__": {"poisoned": true}, + "constructor": {"prototype": {"poisoned": true}}, + "nested": {"__proto__": {"poisoned": true}, "value": 1}, + "items": [{"__proto__": {"poisoned": true}, "value": 2}] + }`); + const original = JSON.stringify(payload); + const result = side === 'target' ? merge(payload, { safe: true }) : merge({ safe: true }, payload); + assert.deepEqual(result, { nested: { value: 1 }, items: [{ value: 2 }], safe: true }); + for (const object of [result, result.nested, result.items[0]]) { + assert.equal(Object.getPrototypeOf(object), Object.prototype); + assert.equal(object.poisoned, undefined); + assert.equal(Object.hasOwn(object, '__proto__'), false); + } + assert.notEqual(result.nested, payload.nested); + assert.notEqual(result.items[0], payload.items[0]); + assert.equal(JSON.stringify(payload), original); + assert.equal({}.poisoned, undefined); + }); +} + +const manifests = [ + ['Manifest V2', {}, true], + ['Manifest V3 permissions', { manifest_version: 3, permissions: ['storage', 'alarms'] }, true], + ['static theme', { theme: { colors: { frame: '#000000', tab_background_text: '#ffffff' } } }, true], + ['unsupported manifest version', { manifest_version: 1 }, false], + ['invalid base field', { name: 12 }, false], + ['invalid theme color', { theme: { colors: { frame: 12 } } }, false], +]; + +for (const [name, overrides, valid] of manifests) { + test(`patched Firefox linter ${valid ? 'accepts' : 'rejects'} ${name}`, async (t) => { + const directory = mkdtempSync(join(tmpdir(), 'tailchrome-linter-dependencies-')); + t.after(() => rmSync(directory, { recursive: true, force: true })); + writeFileSync(join(directory, 'manifest.json'), JSON.stringify({ + manifest_version: 2, + name: 'Dependency regression fixture', + version: '1.0', + browser_specific_settings: { gecko: { id: 'dependency-fixture@tailchrome.invalid' } }, + ...overrides, + })); + const linter = createInstance({ + config: { _: [directory], logLevel: 'fatal', metadata: true, boring: true }, + }); + const output = await linter.run({ _console: { log() {}, warn() {}, error() {} } }); + assert.equal(output.errors.length === 0, valid, JSON.stringify(output.errors)); + }); +} diff --git a/scripts/validate-windows-signing-config.ps1 b/scripts/validate-windows-signing-config.ps1 new file mode 100644 index 0000000..d199063 --- /dev/null +++ b/scripts/validate-windows-signing-config.ps1 @@ -0,0 +1,48 @@ +[CmdletBinding()] +param( + [string]$AllowUnsigned = $env:WINDOWS_ALLOW_UNSIGNED_RELEASE, + [string]$ExpectedSignerSubject = $env:WINDOWS_EXPECTED_SIGNER_SUBJECT, + [string]$OrganizationId = $env:SIGNPATH_ORGANIZATION_ID, + [string]$ApiToken = $env:SIGNPATH_API_TOKEN, + [string]$SignToolPath = $env:WINDOWS_SIGNTOOL_PATH, + [string]$Repository = $env:GITHUB_REPOSITORY, + [string]$ReleaseRef = $env:GITHUB_REF +) + +Set-StrictMode -Version Latest +$ErrorActionPreference = "Stop" + +if ($AllowUnsigned -cnotin @("", "false", "true")) { + throw "WINDOWS_ALLOW_UNSIGNED_RELEASE must be unset, false, or true." +} +if ($AllowUnsigned -ceq "true") { + if (-not [string]::IsNullOrWhiteSpace($ExpectedSignerSubject)) { + throw "Unsigned mode cannot be combined with WINDOWS_EXPECTED_SIGNER_SUBJECT." + } + Write-Warning "This candidate ships UNSIGNED Windows binaries." + return +} + +if ($Repository -cne "dantraynor/tailchrome") { + throw "Production signing is restricted to dantraynor/tailchrome." +} +if ($ReleaseRef -cnotmatch '^refs/tags/v[0-9]+\.[0-9]+\.[0-9]+$') { + throw "Production signing requires a version tag; branch and pull-request builds are not eligible." +} +if ([string]::IsNullOrWhiteSpace($ExpectedSignerSubject)) { + throw "WINDOWS_EXPECTED_SIGNER_SUBJECT must contain the exact production publisher subject." +} +$organization = [Guid]::Empty +if (-not [Guid]::TryParseExact($OrganizationId, "D", [ref]$organization) -or + $organization -eq [Guid]::Empty) { + throw "SIGNPATH_ORGANIZATION_ID must identify the approved SignPath organization." +} +if ([string]::IsNullOrWhiteSpace($ApiToken)) { + throw "SIGNPATH_API_TOKEN must authorize tailchrome/release-signing." +} +if ([string]::IsNullOrWhiteSpace($SignToolPath) -or + -not (Test-Path -LiteralPath $SignToolPath -PathType Leaf)) { + throw "The pinned Windows SDK SignTool is required for production signing." +} + +Write-Host "Production signing configuration is present for tailchrome/release-signing." diff --git a/scripts/validate-windows-signing-config.test.ps1 b/scripts/validate-windows-signing-config.test.ps1 new file mode 100644 index 0000000..20cc456 --- /dev/null +++ b/scripts/validate-windows-signing-config.test.ps1 @@ -0,0 +1,80 @@ +Set-StrictMode -Version Latest +$ErrorActionPreference = "Stop" +$validator = Join-Path $PSScriptRoot "validate-windows-signing-config.ps1" +$fixture = [System.IO.Path]::GetTempFileName() +$passed = 0 + +# This file is only a configuration-validation fixture. It is never executed +# and cannot stand in for the signature verifier's real Windows SDK tool. +$valid = @{ + AllowUnsigned = "false" + ExpectedSignerSubject = "CN=Configuration test fixture" + OrganizationId = "00000000-0000-0000-0000-000000000001" + ApiToken = "configuration-test-fixture" + SignToolPath = $fixture + Repository = "dantraynor/tailchrome" + ReleaseRef = "refs/tags/v0.1.16" +} + +function Test-Configuration { + param([string]$Name, [hashtable]$Overrides, [string]$ExpectedError = "") + $arguments = $valid.Clone() + foreach ($key in $Overrides.Keys) { $arguments[$key] = $Overrides[$key] } + $failure = $null + try { & $validator @arguments -WarningAction SilentlyContinue } + catch { $failure = $_.Exception.Message } + if ($ExpectedError) { + if ($null -eq $failure -or -not $failure.Contains($ExpectedError)) { + throw "$Name did not reject the configuration as expected: $failure" + } + if ($failure.Contains($valid.ApiToken)) { + throw "$Name leaked the signing token in its error." + } + } elseif ($null -ne $failure) { + throw "$Name rejected a valid configuration: $failure" + } + $script:passed++ + Write-Host "PASS: $Name" +} + +try { + Test-Configuration "configured production release" @{} + Test-Configuration "signed mode is the default" @{ AllowUnsigned = "" } + Test-Configuration "explicit unsigned release needs no signing credentials" @{ + AllowUnsigned = "true"; ExpectedSignerSubject = ""; OrganizationId = "" + ApiToken = ""; SignToolPath = ""; Repository = ""; ReleaseRef = "" + } + Test-Configuration "unsigned and signed settings conflict" @{ + AllowUnsigned = "true" + } "Unsigned mode cannot be combined" + Test-Configuration "invalid unsigned opt-in is rejected" @{ + AllowUnsigned = "yes" + } "must be unset, false, or true" + Test-Configuration "another repository cannot request production signing" @{ + Repository = "someone/tailchrome" + } "restricted to dantraynor/tailchrome" + Test-Configuration "branch builds cannot request production signing" @{ + ReleaseRef = "refs/heads/main" + } "requires a version tag" + Test-Configuration "pull requests cannot request production signing" @{ + ReleaseRef = "refs/pull/133/merge" + } "requires a version tag" + Test-Configuration "missing publisher is rejected" @{ + ExpectedSignerSubject = " " + } "exact production publisher" + Test-Configuration "invalid organization is rejected" @{ + OrganizationId = "not-an-organization" + } "approved SignPath organization" + Test-Configuration "empty organization is rejected" @{ + OrganizationId = [Guid]::Empty.ToString() + } "approved SignPath organization" + Test-Configuration "missing signing token is rejected" @{ + ApiToken = " " + } "must authorize tailchrome/release-signing" + Test-Configuration "missing verification tool is rejected" @{ + SignToolPath = "$fixture.absent" + } "pinned Windows SDK SignTool" + Write-Host "$passed signing-configuration checks passed." +} finally { + Remove-Item -LiteralPath $fixture -Force +}