Skip to content

Integrate dnceng TSA work items into security audits - #4785

Open
mattleibow wants to merge 3 commits into
mainfrom
mattleibow-security-audit-tsa
Open

mattleibow wants to merge 3 commits into
mainfrom
mattleibow-security-audit-tsa

Conversation

@mattleibow

@mattleibow mattleibow commented Aug 13, 2026

Copy link
Copy Markdown
Collaborator

Description

Extends the read-only security-audit skill so every audit queries the existing TSA codebase skiasharp.skiasharp_main from its authoritative post-migration location: https://dev.azure.com/dnceng, project internal, area internal\Dotnet-Core-Engineering, iteration internal.

The collector uses the narrow TSA-skiasharp.skiasharp_main tag, hydrates complete Azure Boards records, preserves active and historical evidence, derives tool/rule/category and impacted-file metadata, and correlates records with security findings and Component Governance alerts without dropping unmatched items. Known terminal states are historical; unfamiliar or custom states remain actionable so the audit does not hide work.

A genuine zero-row dnceng response is explicit successful evidence (emptyResult: true). Authentication, WIQL, malformed-response, or incomplete-hydration failures remain errors, replace stale successful cache data, and fail semantic validation. Obsolete DevDiv history is not merged into the authoritative result. TSA remains retained legacy infrastructure; this PR does not migrate it to WiM.

Component Governance and TSA each render once in a dedicated HTML/Markdown panel. The dependency overview contains only audited product dependencies, and validation rejects synthetic operational findings that would duplicate those panels.

Related issues

None.

Required skia PR

None.

Areas affected

  • Managed API (binding/)
  • Native / C API (externals/skia/src/c, include/c)
  • Generated P/Invoke bindings
  • Native dependency or Skia update (libpng, HarfBuzz, FreeType, zlib, milestone bump, …)
  • Views & integrations (MAUI, Uno, WPF, WinUI, Blazor, …)
  • Rendering output / visual behavior
  • Performance
  • Tests
  • Build, packaging, or CI
  • Documentation or samples

Changes

None — security-audit tooling and reports only; no public API or application behavior changes.

Testing

  • python3 -m unittest discover -s .agents/skills/security-audit/tests -p 'test_*.py' — 11 tests passed
  • JSON Schema, eval fixtures, Python compilation, and diff checks passed
  • Live dnceng/internal WIQL query completed successfully on 2026-09-02 and returned 0 active / 0 historical records with emptyResult: true
  • Live result correlated into a representative report, passed schema and semantic validation, and rendered successfully to HTML and Markdown
  • Mocked non-empty Azure Boards query proved complete batch hydration and raw-field retention
  • Regression coverage verifies actionable custom states, occurrence-level deduplication, evidence-aware correlation, stale-success replacement, renderer escaping, and dedicated TSA/CG panels
  • Two read-only full-diff review passes completed; the final pass found no significant issues

No CI pipelines were run or modified.

Checklist

  • Tests added or updated
  • Changes above lists all public API and behavioral changes (None)
  • New/changed public API? N/A — no public API changes
  • Native change? N/A — no native changes

@github-actions

Copy link
Copy Markdown
Contributor

📦 Try the packages from this PR

Warning

Do not run these scripts without first reviewing the code in this PR.

Step 1 — Download the packages

bash / macOS / Linux:

curl -fsSL https://raw.githubusercontent.com/mono/SkiaSharp/main/scripts/get-skiasharp-pr.sh | bash -s -- 4785

PowerShell / Windows:

iex "& { $(irm https://raw.githubusercontent.com/mono/SkiaSharp/main/scripts/get-skiasharp-pr.ps1) } 4785"

Step 2 — Add the local NuGet source

dotnet nuget add source ~/.skiasharp/hives/pr-4785/packages --name skiasharp-pr-4785
More options
Option Description
--successful-only / -SuccessfulOnly Only use successful builds
--force / -Force Overwrite previously downloaded packages
--list / -List List available artifacts without downloading
--build-id ID / -BuildId ID Download from a specific build

Or download manually from Azure Pipelines — look for the nuget artifact on the build for this PR.

Remove the source when you're done:

dotnet nuget remove source skiasharp-pr-4785

@github-actions

github-actions Bot commented Aug 13, 2026

Copy link
Copy Markdown
Contributor

📊 SkiaSharp benchmarks — PR #4785

this PR (full source build) vs 🌙 nightly · Linux · Windows · macOS

Informational only — this never blocks the PR. 🟢 faster / less allocation · 🔴 slower / more allocation; moves under 5% are hidden as noise.

⏱️ Times are raw BenchmarkDotNet means, and the ⭐ PR and baseline legs run on separate CI runners, so microbenchmarks can swing run-to-run — treat small time deltas as noise. Allocations are deterministic and the reliable signal. The interactive perf-dashboard (linked below) applies smoothing for the trend view.

Highlights

⏱️ Time — 🔴 14 slower · 🟢 49 faster

  • 🟢 BitmapDrawBenchmark.DrawUnscaledTiles(Tiles: 256) · Windows · 2.46 ms → 948.31 µs (-61%)
  • 🟢 ColorMathBenchmark.ToColor(Colors: 4096) · Linux · 15.36 µs → 9.06 µs (-41%)
  • 🟢 MatrixMapPointsBenchmark.MapPoints(Points: 4096) · Linux · 3.07 µs → 1.94 µs (-37%)
  • 🔴 RasterImageLifecycleBenchmark.CreateDataWithReleaseProc(Count: 256) · Windows · 93.16 µs → 125.71 µs (+35%)
  • 🔴 ColorMathBenchmark.ToColor(Colors: 4096) · Windows · 11.76 µs → 15.66 µs (+33%)
  • …and 58 more (see details below)
Full per-OS benchmark deltas

Linux

⏱️ Time (vs 🌙 nightly 4.152.0-nightly.26431.1)

Benchmark baseline this PR Δ
ColorMathBenchmark.ToColor(Colors: 4096) 15.36 µs 9.06 µs 🟢 -41%
MatrixMapPointsBenchmark.MapPoints(Points: 4096) 3.07 µs 1.94 µs 🟢 -37%
MatrixMapPointsBenchmark.MapPoints(Points: 256) 221.8 ns 164.4 ns 🟢 -26%
RasterImageLifecycleBenchmark.CreateRasterImage(Count: 256) 264.96 µs 197.58 µs 🟢 -25%
LargeImageScaleBenchmark.UpscaleOpaque(Size: 1024) 759.86 µs 571.62 µs 🟢 -25%
LargeImageScaleBenchmark.UpscaleOpaque(Size: 2048) 2.93 ms 2.22 ms 🟢 -24%
PathBoundsBenchmark.TightBounds(Points: 64) 1.04 µs 785.9 ns 🟢 -24%
LargeImageScaleBenchmark.UpscaleCrossfade(Size: 1024) 2.08 ms 1.60 ms 🟢 -23%
ColorParseBenchmark.Parse(Iterations: 1000) 77.06 µs 59.52 µs 🟢 -23%
RasterImageLifecycleBenchmark.CreateDataWithReleaseProc(Count: 256) 97.98 µs 76.74 µs 🟢 -22%
LargeImageScaleBenchmark.UpscaleCrossfade(Size: 2048) 7.95 ms 6.25 ms 🟢 -21%
BitmapDrawBenchmark.DrawUnscaledTiles(Tiles: 256) 961.53 µs 766.18 µs 🟢 -20%
SceneRenderBenchmark.RenderFrame(Complexity: 1) 3.95 ms 3.20 ms 🟢 -19%
BitmapDrawBenchmark.DrawScaledTiles(Tiles: 64) 358.39 µs 290.77 µs 🟢 -19%
SceneRenderBenchmark.RenderFrame(Complexity: 4) 18.09 ms 14.70 ms 🟢 -19%
BitmapDrawBenchmark.DrawUnscaledTiles(Tiles: 64) 254.95 µs 207.62 µs 🟢 -19%
CanvasDrawBenchmark.Draw(Shapes: 64) 4.16 ms 3.39 ms 🟢 -18%
CanvasDrawBenchmark.Draw(Shapes: 512) 33.24 ms 27.12 ms 🟢 -18%
BitmapDrawBenchmark.DrawScaledTiles(Tiles: 256) 1.34 ms 1.10 ms 🟢 -18%
MatrixMapPointsBenchmark.MapRadius(Points: 256) 14.31 µs 11.74 µs 🟢 -18%
RuntimeEffectShaderBenchmark.DrawFrame 2.85 ms 2.35 ms 🟢 -18%
ColorMathBenchmark.ToColorF(Colors: 4096) 13.12 µs 10.94 µs 🟢 -17%
PathBoundsBenchmark.TightBounds(Points: 1024) 10.57 µs 8.90 µs 🟢 -16%
MatrixMapPointsBenchmark.MapVector(Points: 256) 10.97 µs 9.27 µs 🟢 -15%
MatrixMapPointsBenchmark.MapPoint(Points: 256) 4.62 µs 3.96 µs 🟢 -14%
…and 9 more

Windows

⏱️ Time (vs 🌙 nightly 4.152.0-nightly.26431.1)

Benchmark baseline this PR Δ
BitmapDrawBenchmark.DrawUnscaledTiles(Tiles: 256) 2.46 ms 948.31 µs 🟢 -61%
RasterImageLifecycleBenchmark.CreateDataWithReleaseProc(Count: 256) 93.16 µs 125.71 µs 🔴 +35%
ColorMathBenchmark.ToColor(Colors: 4096) 11.76 µs 15.66 µs 🔴 +33%
PathBoundsBenchmark.TightBounds(Points: 64) 1.53 µs 1.90 µs 🔴 +24%
RasterImageLifecycleBenchmark.CreateRasterImage(Count: 256) 240.69 µs 292.38 µs 🔴 +21%
PathBoundsBenchmark.TightBounds(Points: 1024) 16.64 µs 20.13 µs 🔴 +21%
MatrixMapPointsBenchmark.MapRect(Points: 256) 8.03 µs 9.23 µs 🔴 +15%
LargeImageScaleBenchmark.UpscaleOpaque(Size: 2048) 3.24 ms 2.86 ms 🟢 -12%
CanvasDrawBenchmark.Draw(Shapes: 512) 20.68 ms 22.87 ms 🔴 +11%
CanvasDrawBenchmark.Draw(Shapes: 64) 2.59 ms 2.86 ms 🔴 +10%
LargeImageScaleBenchmark.UpscaleOpaque(Size: 1024) 816.93 µs 736.37 µs 🟢 -10%
ColorMathBenchmark.PreMultiply(Colors: 4096) 14.71 µs 13.27 µs 🟢 -10%
LargeImageScaleBenchmark.UpscaleCrossfade(Size: 1024) 2.83 ms 2.56 ms 🟢 -9%
LargeImageScaleBenchmark.UpscaleCrossfade(Size: 2048) 11.23 ms 10.20 ms 🟢 -9%
MatrixMapPointsBenchmark.MapPoint(Points: 256) 5.36 µs 4.97 µs 🟢 -7%
MatrixMapPointsBenchmark.MapRadius(Points: 4096) 154.52 µs 165.52 µs 🔴 +7%
MatrixOpsBenchmark.Invert(Count: 4096) 148.59 µs 138.21 µs 🟢 -7%
MatrixMapPointsBenchmark.MapPoint(Points: 4096) 85.83 µs 79.92 µs 🟢 -7%
ColorParseBenchmark.Parse(Iterations: 1000) 78.89 µs 83.63 µs 🔴 +6%
MatrixMapPointsBenchmark.MapPoints(Points: 256) 165.5 ns 174.4 ns 🔴 +5%
ColorMathBenchmark.ToColorF(Colors: 4096) 14.10 µs 13.35 µs 🟢 -5%
RuntimeEffectShaderBenchmark.DrawFrame 1.21 ms 1.14 ms 🟢 -5%

macOS

⏱️ Time (vs 🌙 nightly 4.152.0-nightly.26431.1)

Benchmark baseline this PR Δ
MatrixMapPointsBenchmark.MapVector(Points: 256) 2.93 µs 2.47 µs 🟢 -16%
MatrixMapPointsBenchmark.MapPoint(Points: 4096) 19.78 µs 18.24 µs 🟢 -8%
CanvasDrawBenchmark.Draw(Shapes: 64) 1.44 ms 1.55 ms 🔴 +8%
BitmapDrawBenchmark.DrawUnscaledTiles(Tiles: 64) 170.37 µs 181.75 µs 🔴 +7%
BitmapDrawBenchmark.DrawScaledTiles(Tiles: 256) 782.34 µs 731.27 µs 🟢 -7%
RasterImageLifecycleBenchmark.CreateDataWithReleaseProc(Count: 256) 67.19 µs 70.84 µs 🔴 +5%
MatrixMapPointsBenchmark.MapVector(Points: 4096) 40.07 µs 38.06 µs 🟢 -5%

📈 Full interactive perf-dashboard & run details →

@github-actions

github-actions Bot commented Aug 13, 2026

Copy link
Copy Markdown
Contributor

📦 Artifact size report

Packages from this PR (build 1577887) vs the latest nightly baseline 4.152.0-nightly.47 (observed 2026-09-01).

Total .nupkg size: 569.6 MB → 569.0 MB (−638.0 KB, -0.1%)

Packages

⚠️ marks growth over 500.0 KB or 2%. Changes under 50.0 KB are treated as noise.

Package baseline this PR Δ Δ%
SkiaSharp.NativeAssets.WinUI 109.1 MB 108.3 MB 🟢 −769.7 KB -0.7%
SkiaSharp.NativeAssets.WebAssembly 69.7 MB 69.7 MB 🔴 +56.9 KB +0.1%

+39 package(s) unchanged (< 50.0 KB).

Per-file changes

SkiaSharp.NativeAssets.WinUI

File Size
runtimes/win-arm64/native/libGLESv2.pdb 64.5 MB → 64.4 MB (🟢 −112.0 KB)
runtimes/win-x64/native/libGLESv2.pdb 66.6 MB → 66.5 MB (🟢 −112.0 KB)
runtimes/win-x86/native/libGLESv2.pdb 67.3 MB → 67.2 MB (🟢 −96.0 KB)

Informational only — this never blocks the PR. Native binaries are labelled by os/arch.

Copilot AI added 3 commits September 2, 2026 02:51
Query the existing SkiaSharp TSA codebase from DevDiv Azure Boards, retain active and resolved evidence, correlate records with audit findings and CG alerts, and render the complete results in JSON, HTML, and Markdown. Fail validation when TSA evidence is unavailable or incomplete.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Keep Component Governance and TSA evidence in their dedicated report panels instead of repeating them in the dependency overview or synthetic findings. Validate this separation so future audits preserve a single source of truth.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>

Copilot-Session: b64fc483-d1cd-4de8-9b09-69477710c3ee
Query the authoritative dnceng/internal TSA work items, hydrate complete evidence, and make successful empty results explicit while preserving fail-closed behavior. Strengthen occurrence grouping, correlation, validation, rendering, and focused test coverage.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>

Copilot-Session: b64fc483-d1cd-4de8-9b09-69477710c3ee
@mattleibow
mattleibow force-pushed the mattleibow-security-audit-tsa branch from 80b29e0 to 71abfd5 Compare September 2, 2026 01:38
@mattleibow mattleibow changed the title Integrate TSA work items into security audits Integrate dnceng TSA work items into security audits Sep 2, 2026

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: No status

Development

Successfully merging this pull request may close these issues.

2 participants