Repository navigation
Cover NuGet and npm in Dependabot, and use the CodeQL security-extended suite - #728
Conversation
…ed suite Dependabot version updates were configured for github-actions only, so the shipped NuGet and npm dependencies never got update PRs. The npm bumps that have landed came from Dependabot security updates, which run without a config entry and only fire once an advisory exists. Also request the security-extended CodeQL query suite. The workflow analyzes csharp, javascript-typescript, c-cpp, and actions but was running the default suite.
There was a problem hiding this comment.
Pull request overview
Adds proactive dependency updates for shipped NuGet/npm components and broadens CodeQL security analysis.
Changes:
- Adds weekly grouped NuGet and npm Dependabot updates.
- Enables CodeQL’s
security-extendedquery suite.
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
.github/dependabot.yml |
Configures NuGet and npm version updates. |
.github/codeql/codeql-config.yml |
Enables extended security queries. |
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
Build Metrics ReportBinary Sizes
Test Results✅ 4549 passed, 5 skipped out of 4554 tests in 587.7s (-57.5s vs. baseline) Test Coverage✅ 89.1% line coverage, 82.4% branch coverage · ✅ no change vs. baseline CLI Startup Time44ms median (x64, Try This BuildInstalls the MSIX for your architecture, replacing any previously installed build. Needs the GitHub CLI — the command offers to install it and sign you in if it is missing. & ([scriptblock]::Create((irm https://raw.githubusercontent.com/microsoft/winappCli/main/scripts/winapp-pr.ps1))) 728Switching between builds often?Put the tool on your PATH once: & ([scriptblock]::Create((irm https://raw.githubusercontent.com/microsoft/winappCli/main/scripts/winapp-pr.ps1))) -AddToPathThen this build is just: winapp-pr 728Run Updated 2026-08-11 22:31:25 UTC · commit |
…ions Two gaps in the previous commit: paths was limited to src, so the actions extractor had nothing to analyze -- the six extra actions queries security-extended enables could never fire, since workflows live under .github. Add .github to paths. (paths/paths-ignore only affect interpreted languages, so csharp and c-cpp extraction is unchanged.) The github-actions entry used directory: "/", which per the Dependabot options reference searches only /.github/workflows plus a root-level action.yml. The two composite actions under .github/actions pin their dependencies by SHA and were never going to be updated. Switch to directories with a glob, which is the only form that supports wildcards.
## Description SkiaSharp 2.88.9 bundles libexpat 2.6.4, affected by [CVE-2025-59375](https://nvd.nist.gov/vuln/detail/CVE-2025-59375) (memory-exhaustion DoS). `libSkiaSharp.dll` already ships in the CLI, and #799 makes SkiaSharp a public dependency of the Recording package, so the exposure reaches package consumers too. Worth saying up front: **the 2.88.9 pin was never a deliberate choice.** #326 added `Svg.Skia 3.4.1` and SkiaSharp came in transitively. #363 bumped to Svg.Skia 3.7.0, which was the newest stable at the time (4.0.0 shipped ten days later). #799 wrote the first explicit `SkiaSharp 2.88.9` line into `Directory.Packages.props` only because Central Package Management demands a `PackageVersion` once Recording referenced it directly, so it recorded what already resolved. No comment, doc, or issue ever justified the version. **The two must move together.** Svg.Skia is compiled against a specific SkiaSharp major but depends on it only by *minimum* version, so lifting SkiaSharp alone resolves, restores, and compiles cleanly, then fails the first time an SVG is rasterized. This goes to the latest stable of both: SkiaSharp 4.152.0 and Svg.Skia 5.2.3. SkiaSharp 4.x promoted the legacy members to errors, so six call sites move to the modern API. Both were migrated to the overloads that are non-obsolete in 3.x *and* 4.x, so the next major is not blocked on this again: - `UiScreenshotCommand` composite labels use `SKTypeface`/`SKFont` and the `SKTextAlign` `DrawText` overload, and `DrawImage` instead of `DrawBitmap`. - `UiRecordingService.ProcessFrame` passes `SKSamplingOptions(Linear, Mipmap.Linear)`, which is SkiaSharp's own mapping for the `SKFilterQuality.Medium` it replaces, so resample quality is unchanged by construction rather than by eyeball. ### One regression found and fixed Svg.Skia 5.x clamps a sizeless SVG to a 1x1 picture instead of reporting 0x0. That silently disabled the "invalid dimensions" guard, because the rasterized bounds can no longer tell "declares no size" from "is genuinely one pixel": ``` winapp manifest update-assets empty.svg before: error, "SVG image has invalid dimensions (0x0) ... valid viewBox or width/height" after (unfixed): exit 0, and 44 blank icons written ``` The guard now reads the declared `viewBox`/`width`/`height` off the document rather than the rasterizer's clamped bounds, which is both correct and no longer coupled to a rendering implementation detail. A `viewBox` alone is sufficient; failing that, width and height must be positive and absolute, since a percentage has no meaning when generating a fixed-size icon. ## Usage Example No CLI surface change; `docs/cli-schema.json` regenerates byte-identical. Behavior at the boundary is preserved, verified against the published NativeAOT binary: ```bash # viewBox-only SVG (no width/height) still works winapp manifest update-assets .\viewboxonly.svg # exit 0 # sizeless SVG still fails loudly instead of writing blank assets winapp manifest update-assets .\empty.svg # Error updating assets: SVG image has no usable dimensions: ...\empty.svg. # Ensure the SVG has a valid viewBox or width/height attributes. # exit 1 ``` ## Related Issue Fixes: #805 ## Type of Change - 🐛 Bug fix - 🔧 Config/build ## Checklist - [x] New tests added for new functionality (if applicable) - [x] Tested locally on Windows ## Screenshots / Demo The acceptance bar for a graphics-library major bump is "output visually unchanged", so this compares the three rendering paths this PR touches against a 2.88.9 build. The difference column is amplified 8x to make anything at all visible.  | Path | Identical pixels | Worst block drift | |---|---|---| | Screenshot label bar | **100%** (byte-identical) | 0.000 / 255 | | SVG icon 256px | 99.21% | 0.046 / 255 | | Recording frame (1024x768 to 320x240) | 3.66% | 0.319 / 255 | The recording frame is a deliberately adversarial case: a 7px checkerboard, which is the worst possible input for a resampler. Almost every pixel moves, but no channel moves more than 21/255 and the 30x30 block-average drift is 0.13%, so it is the resampler's kernel differing in the low bits, not a structural change. ## Additional Notes Two things reviewers should know: **`libHarfBuzzSharp.dll` now ships (~2 MB per architecture).** Svg.Skia 5.x takes a new dependency on HarfBuzzSharp for text shaping. Every packaging path copies by wildcard, so no script changes were needed, and it does **not** leak into either published NuGet package (Svg.Skia is CLI-only; Recording's nuspec was checked and declares only `SkiaSharp 4.152.0`). It will most likely need a new binskim entry in `.config/guardian/.gdnbaselines` alongside the existing `libSkiaSharp.dll` ones, and those signatures can only be produced by the Official pipeline, so expect one baseline follow-up after the first run. `libSkiaSharp.dll` itself grows from ~9 MB to ~13 MB; the two docs that quote that number are updated. **Dependabot is not currently offering these bumps at all.** The `skia` group added here is review hygiene, not a safety net: it keeps a Skia major out of a 20-package batch PR, since it needs hand migration. It would not have caught this. Open PR #855 bumps only `Microsoft.Windows.CsWin32` even though Svg.Skia 5.2.3 shipped Aug 27, well past the 7-day cooldown, and NuGet coverage only landed 2026-08-11 in #728, which is why 3.7.0 sat untouched since March. The thing that actually protects against a mismatched pair is `ImageAssetServiceTests` rasterizing a real SVG, which is why the new test covers the viewBox-only case the fixed guard could plausibly have broken. **Test results.** Release build is 0 warnings / 0 errors, which is the real proof the obsolete-API migration is complete since `TreatWarningsAsErrors` is Release-only. 6,455 CLI + 402 UI Automation + 63 analyzer + 62 NuGet Pester tests. The 14 failures are all environmental and none are in a Skia path: 11 `NugetServiceTests` need `api.nuget.org` (all 28 pass against the internal mirror), 1 tries to launch the arm64 `winapp.exe` on x64, and 2 are foreground-dependent. One of those, `RecordAsync_FirstScreenFrame_AcceptsAModalDialogTheTargetOwns`, was reproduced on unmodified `origin/main` and is pre-existing. ## AI Description <!-- ai-description-start --> _This section is auto-generated by AI when the PR is opened or updated. To opt out, delete this entire section including the marker comments._ <!-- ai-description-end --> --------- Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> Copilot-Session: 9ab36938-7aa7-42c8-8173-ab0cf51ac113
Dependabot
dependabot.ymlconfigured version updates forgithub-actionsonly. The shipped NuGet and npm dependencies were never getting update PRs.Worth noting why that was easy to miss: npm bumps have been landing (#708, #722). Those came from Dependabot security updates, which run without a config entry — but only once an advisory exists for a package you already depend on. Version updates, which keep dependencies current before an advisory lands, need the config entry that was missing.
This adds two entries, matching the grouping and cooldown of the existing one:
nugetat/src/winapp-CLI— picks upDirectory.Packages.propsnpmat/src/winapp-npm— the shipped npm packageCodeQL
codeql.ymlanalyzescsharp,javascript-typescript,c-cpp, andactions, but the config requested no query suite, so all four ran the default set. This addssecurity-extended.Expect more findings on the first run after this merges — that is the point, but it does mean the initial triage pass will be larger than usual.
Open question for the reviewer
There are currently 12 open Dependabot alerts on
main, and every one is in an ecosystem this config does not cover:Those live in
samples/(samples/electron,samples/tauri-app,samples/rust-app), not in shipped code. I deliberately left samples out of this PR: adding npm and cargo version updates across every sample directory would generate a steady stream of PRs against demo code, and security updates already cover the vulnerable cases.If you would rather have the samples tracked too, say the word and I will add
cargoplus sample directories in a follow-up — it is a config-only change either way.