Skip to content

[ci] Add DevSkim banned-API analysis to CI and PR builds - #26957

Open
rolfbjarne wants to merge 28 commits into
mainfrom
dev/rolf/devskim-ci-integration
Open

rolfbjarne wants to merge 28 commits into
mainfrom
dev/rolf/devskim-ci-integration

Conversation

@rolfbjarne

Copy link
Copy Markdown
Member

Add explicit DevSkim coverage to the branch and PR pipelines so banned-API findings are visible and blocking, rather than relying on implicit governance configuration. This supports the quoted Microsoft.Security.SystemsADM.10082 requirement; running the scanner alone does not establish compliance.

Approach

  • Run pinned DevSkim 1.0.100 in an independent Linux stage, without Xcode or a product build. Scan production sources, build tooling, templates, vendored headers, and recursively checked-out MacDev sources.
  • Evaluate the API.DangerousAPI.BannedFunction result tag at every severity and confidence, including moderate, best-practice, and manual-review findings. Disable inline suppressions and add no baselines or blanket exceptions.
  • Fail on scanner errors or missing/malformed expected reports. Publish SARIF and scanner logs even when the gate fails, using the existing 1ES artifact helper.

Initial rollout is intentionally blocking: the local scan found 145 banned-function findings: 121 in the runtime and 24 in tooling/vendored headers (139 Moderate, five Important, one BestPractice). These require remediation or narrowly scoped security-owner approval; they are not claims of exploitable vulnerabilities. Tests, documentation, translations, and dependencies downloaded/generated by later build jobs are outside this source scan.

CodeQL configuration and the existing native-symbol/P/Invoke checks are unchanged.

Validation

  • Ten report-gate regression tests pass, covering all severity levels, suppression handling, multiple runs/reports, execution errors, malformed reports, and missing expected reports.
  • Executed the CI scan command locally across all nine source trees and verified all SARIF/log outputs plus the expected failing gate.
  • Verified clean and banned fixtures, scanner-error propagation through tee/pipefail, YAML syntax, and pipeline wiring/artifact conditions.
  • Two distinct-model code reviews completed; the missing-report warning was fixed and both follow-up reviews found no remaining errors or warnings.
  • A live Azure Pipelines run and server-side 1ES template expansion have not yet been performed.

Note

This pull request description and implementation were generated with GitHub Copilot.

🤖 Pull request created by Copilot

rolfbjarne and others added 2 commits October 21, 2026 15:46
Run the pinned DevSkim 1.0.100 CLI in an independent Linux stage, covering production sources, build tooling, templates, and checked-out dependencies without requiring an Apple build. Publish SARIF reports and scanner logs even when findings fail the job.

Evaluate the banned-function result tag at every severity and confidence, including moderate findings, rather than relying on the CLI's default success exit code. Keep scanner errors distinct from findings, disable inline suppressions, and add regression coverage and local reproduction instructions.

Existing runtime and vendored-header findings intentionally remain visible and blocking pending security-owner triage; this change adds no baseline or blanket exceptions and leaves CodeQL and symbol checks unchanged.

Co-authored-by: Copilot App <[email protected]>
Pass the expected SARIF paths explicitly instead of expanding only the reports that exist. This keeps a missing source-tree report from silently disappearing from the compliance gate when other reports are present.

Add regression coverage for a missing report alongside a valid clean report and keep the documented local reproduction command consistent with CI.

Co-authored-by: Copilot App <[email protected]>
@rolfbjarne
rolfbjarne requested a review from dalexsoto as a code owner October 21, 2026 14:12
Copilot AI balanced review requested due to automatic review settings October 21, 2026 14:12

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟡 Changes recommended

Incorrect working directories prevent scanning, and publication paths do not require DevSkim success.

2 open issues
What changed in this PR

Adds explicit DevSkim banned-API scanning to the Apple platform CI and PR pipelines.

Changes:

  • Adds a pinned, independent Linux scan stage with report publication.
  • Adds a SARIF gate and ten regression tests.
  • Documents scan scope, blocking rollout, and local reproduction.
File Description
tools/​devops/​README.md Documents scanning and rollout.
tools/​devops/​automation/​templates/​governance/​devskim.yml Defines scanning, gating, and artifact publication.
tools/​devops/​automation/​scripts/​test_devskim.py Tests report validation and gate behavior.
tools/​devops/​automation/​scripts/​check_devskim.py Rejects banned findings and invalid reports.
tools/​devops/​automation/​build-pull-request.yml Includes scanning in PR builds.
tools/​devops/​automation/​build-pipeline.yml Includes scanning in branch builds.

Review effort: Balanced

@vs-mobiletools-engineering-service2

This comment has been minimized.

@vs-mobiletools-engineering-service2

This comment has been minimized.

@vs-mobiletools-engineering-service2

This comment has been minimized.

rolfbjarne and others added 2 commits October 28, 2026 20:24
Use a dedicated NuGet configuration that clears inherited package sources and selects only dotnet-public. The isolated CI agent cannot load api.nuget.org, while the Azure Artifacts mirror contains the pinned DevSkim 1.0.100 package.

Initialize the artifact directory before provisioning and capture installation output with pipefail enabled. Installation failures now retain diagnostics without triggering a secondary missing-artifact-directory error. Update the local reproduction instructions to use the same source configuration.

Co-authored-by: Copilot App <[email protected]>
Pass the top-level NuGet.config explicitly when installing the pinned CLI. Its existing dotnet-public source provides DevSkim, and its clear element excludes inherited nuget.org sources without duplicating feed configuration.

Remove the dedicated DevSkim NuGet configuration and update local reproduction instructions. Preserve installation diagnostics and the pre-provisioning artifact directory.

Co-authored-by: Copilot App <[email protected]>
Copilot AI balanced review requested due to automatic review settings October 28, 2026 19:49

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟡 Changes recommended

The checkout path is duplicated in the installation path and scan working directories, causing NuGet.config lookup to fail and preventing the scan from running.

3 open issues

Review effort: Balanced

@vs-mobiletools-engineering-service2

This comment has been minimized.

@vs-mobiletools-engineering-service2

This comment has been minimized.

System.DefaultWorkingDirectory already points to s/macios in the DevSkim job, so appending the repository title produces s/macios/macios and prevents NuGet.config from being found. Anchor the configuration path to Pipeline.Workspace and the explicit s/<repository> checkout path instead.

Correct the test and scan working directories at the same time so both steps run from the actual checkout once installation succeeds.

Co-authored-by: Copilot App <[email protected]>
Copilot AI balanced review requested due to automatic review settings October 29, 2026 07:38

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🔵 Needs a closer look

DevSkim failures do not block either release-publishing path, and scanner installation can fail on clean checkouts because an enabled local NuGet feed is absent.

1 open issue
1 previously missed issue

In code that hasn't changed since last review

Medium severity Prevent missing local feed from breaking scanner installation

tools/​devops/​automation/​templates/​governance/​devskim.yml:43

❌ The top-level NuGet.config enables local-tests-feed at tests/.nuget/packages, which is git-ignored and absent from a clean checkout, so tool installation can fail before scanning even when dotnet-public is reachable. Add --ignore-failed-sources or use a mirror-only scanner config. Apply the same change to the local installation command in tools/devops/README.md:157.

2 resolved since last review

Review effort: Balanced

@vs-mobiletools-engineering-service2

This comment has been minimized.

@vs-mobiletools-engineering-service2

This comment has been minimized.

rolfbjarne and others added 7 commits October 29, 2026 11:16
Render SARIF into a self-contained searchable HTML report with blocking and non-blocking counts, severity/category filters, source links at the scanned revision, excerpts, and rule guidance. Escape scanner-provided content and show missing or invalid reports as incomplete coverage rather than success.

Generate the report even after scanner failures and include it in the existing DevSkim artifact. A separate Windows job publishes the report and diagnostics to VSDrops using the existing Artifact Services Drop task, then posts a PR comment only for banned findings or scan errors. Clean scans and branch builds do not create PR comments, and publication failures are not swallowed.

Add regression coverage for rendering, untrusted SARIF, incomplete scans, report summaries, failure links, and the clean-run no-comment path. Document the report and local rendering workflow.

Co-authored-by: Copilot App <[email protected]>
Read path exclusions from a shared DevSkim options file and exclude imported tools/sharpie/clang/include headers, while retaining the existing Git metadata exclusions. Use the same options in CI and documented local scans; previously generated SARIF is not retroactively filtered.

Append the matched function name from SARIF excerpts to generic banned-API messages so reviewers can identify the API without expanding guidance. Preserve messages that already name the function and add regression coverage for bare names, calls, and missing excerpts.

Co-authored-by: Copilot App <[email protected]>
Parse Objective-C array lengths with strtoul and validate the numeric prefix, range, alignment, and final size multiplication before using the result. Invalid encodings now fail explicitly instead of producing wrapped sizes.

Add native runtime regression cases for zero, multi-digit, and nested array encodings.

Co-authored-by: Copilot App <[email protected]>
Search protocol wrapper and assembly location maps with bounded half-open ranges and overflow-safe midpoint calculations. Validate map counts and storage, preserve not-found results, and compare protocol tokens without casting packed records to integer pointers.

Co-authored-by: Copilot App <[email protected]>
Validate registration map counts and storage before sorting, handle sort failure explicitly, and publish the map only after sorting succeeds.

Replace pointer subtraction in the comparator with relational comparisons. Keep signed pointer ordering to match Class.FindMapIndex in managed code, including handles with the high bit set.

Co-authored-by: Copilot App <[email protected]>
Use the Darwin strerror_r contract with per-call value storage instead of shared error-description pointers. Preserve errno and retain a numeric diagnostic if description conversion fails.

Share the pure-C helper with the spawner, capture error codes before Objective-C message evaluation, and cover normal and unknown errors in native runtime tests.

Co-authored-by: Copilot App <[email protected]>
Read the optional bundle configuration through Foundation with explicit I/O and decoding diagnostics, then parse complete lines instead of 127-byte chunks. Preserve settings precedence and duplicate-host handling.

Validate numeric port and timeout values, including range and trailing data, before applying them. Missing optional files remain expected.

Co-authored-by: Copilot App <[email protected]>
@vs-mobiletools-engineering-service2

Copy link
Copy Markdown
Collaborator

DevSkim source analysis failed

1 banned-API finding(s) and 0 scan error(s) require attention.

Detailed results (gist) | Pipeline logs | HTML report on VSDrops

The gist includes findings, file/line links, excerpts, and rule guidance. Findings are not proof of exploitable vulnerabilities.

Note

This CI report comment was generated by GitHub Copilot automation.

CI build 16056025 detected the intentional printf call, uploaded its HTML report to VSDrops, created the detailed gist, and posted the PR comment successfully. Remove the compiled-out call now that the failure path has been exercised.

Co-authored-by: Copilot App <[email protected]>
Copilot AI balanced review requested due to automatic review settings November 17, 2026 14:51

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🔵 Needs a closer look

Retrying a failed scan republishes the same non-overwritable artifact name, causing publication to fail and allowing downstream jobs to consume stale reports instead of the retry’s results.

3 open issues
1 resolved since last review

Review effort: Balanced

Allow gist publication only from the public CI and PR pipelines after confirming repository visibility with GitHub. Private, MSRC, and unknown builds retain their reports in authenticated artifacts and VSDrops.

Validate the SARIF fields consumed by the gate and renderers. Parse each report independently so malformed input becomes an explicit scan error without losing valid reports or failure-report outputs.

Qualify pipeline artifacts with the scan job attempt and pass that producer output to both download jobs, regardless of their own retry counts.

Co-authored-by: Copilot App <[email protected]>
Copilot AI balanced review requested due to automatic review settings November 17, 2026 15:03
@vs-mobiletools-engineering-service2

This comment has been minimized.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🔵 Needs a closer look

Human assessment is needed because unpublished findings include a critical native-linkage mismatch that prevents interop resolution, plus runtime-selection, scan-reporting, and assembly-lookup risks.

No open issues 🎉

3 resolved since last review

Review effort: Balanced

@vs-mobiletools-engineering-service2

This comment has been minimized.

@vs-mobiletools-engineering-service2

This comment has been minimized.

@vs-mobiletools-engineering-service2

Copy link
Copy Markdown
Collaborator

✅ API diff for current PR / commit

NET (empty diffs)

✅ API diff vs stable

NET (empty diffs)

ℹ️ Generator diff

Generator Diff: vsdrops (html) vsdrops (raw diff) gist (raw diff) - Please review changes)

Pipeline on Agent
Hash: c1bb12b7a09e8a8f3d0ed11c12705aff37f158c8 [PR build]

@vs-mobiletools-engineering-service2

This comment has been minimized.

@vs-mobiletools-engineering-service2

Copy link
Copy Markdown
Collaborator

🔥 [PR Build #c1bb12b] Build failed (Build macOS tests) 🔥

Build failed for the job 'Build macOS tests' (with job status 'Failed')

Pipeline on Agent
Hash: c1bb12b7a09e8a8f3d0ed11c12705aff37f158c8 [PR build]

@vs-mobiletools-engineering-service2

This comment has been minimized.

@vs-mobiletools-engineering-service2

This comment has been minimized.

@vs-mobiletools-engineering-service2

This comment has been minimized.

@vs-mobiletools-engineering-service2

This comment has been minimized.

@vs-mobiletools-engineering-service2

Copy link
Copy Markdown
Collaborator

🔥 [CI Build #c1bb12b] Test results 🔥

Test results

❌ Tests failed on VSTS: test results

4 tests crashed, 81 tests failed, 96 tests passed.

Failures

❌ dotnettests tests (iOS)

1 tests failed, 0 tests passed.

Failed tests

  • DotNet tests: Failed (Execution failed with exit code 1)
    • Xamarin.Tests.AppSizeTest.CoreCLR_Interpreter(iOS,"ios-arm64",Tr...: App size changed significantly (+16,520 bytes (16.1 KB = 0.0 MB) different > tolerance of +-10,240 bytes (10.0 KB = 0.0 MB)). Ex...
    • Xamarin.Tests.AppSizeTest.CoreCLR_R2R(iOS,"ios-arm64",True): App size changed significantly (+15,984 bytes (15.6 KB = 0.0 MB) different > tolerance of +-10,240 bytes (10.0 KB = 0.0 MB)). Ex...
    • Xamarin.Tests.AppSizeTest.NativeAOT(iOS,"ios-arm64"): App size changed significantly (+16,608 bytes (16.2 KB = 0.0 MB) different > tolerance of +-10,240 bytes (10.0 KB = 0.0 MB)). Ex...
    • ... and 1 more

Html Report (VSDrops) Download

❌ dotnettests tests (MacCatalyst)

1 tests failed, 0 tests passed.

Failed tests

  • DotNet tests: Failed (Execution failed with exit code 1)
    • Xamarin.Tests.AppSizeTest.NativeAOT(MacCatalyst,"maccatalyst-arm...: App size changed significantly (+16,737 bytes (16.3 KB = 0.0 MB) different > tolerance of +-10,240 bytes (10.0 KB = 0.0 MB)). Ex...
    • Xamarin.Tests.DotNetProjectTest.BuildFatMonoTouchTest(MacCatalys...: 'dotnet build' failed with exit code 1
      Full command: /Users/cloudtest/vss/_work/1/s/macios/builds/downloads/dotnet-sdk-12.0.100-...
    • Xamarin.Tests.DotNetProjectTest.PublishAotMonoTouchTest_NoIL2009...: 'dotnet build' failed with exit code 1
      Full command: /Users/cloudtest/vss/_work/1/s/macios/builds/downloads/dotnet-sdk-12.0.100-...

Html Report (VSDrops) Download

❌ dotnettests tests (macOS)

1 tests failed, 0 tests passed.

Failed tests

  • DotNet tests: Failed (Execution failed with exit code 1)
    • Xamarin.Tests.AppSizeTest.CoreCLR_Interpreter(MacOSX,"osx-arm64;...: App size changed significantly (+17,168 bytes (16.8 KB = 0.0 MB) different > tolerance of +-10,240 bytes (10.0 KB = 0.0 MB)). Ex...
    • Xamarin.Tests.AppSizeTest.CoreCLR_R2R(MacOSX,"osx-arm64;osx-x64"...: App size changed significantly (+16,656 bytes (16.3 KB = 0.0 MB) different > tolerance of +-10,240 bytes (10.0 KB = 0.0 MB)). Ex...
    • Xamarin.Tests.AppSizeTest.NativeAOT(MacOSX,"osx-arm64;osx-x64"): App size changed significantly (+16,833 bytes (16.4 KB = 0.0 MB) different > tolerance of +-10,240 bytes (10.0 KB = 0.0 MB)). Ex...
    • ... and 2 more

Html Report (VSDrops) Download

❌ dotnettests tests (tvOS)

1 tests failed, 0 tests passed.

Failed tests

  • DotNet tests: Failed (Execution failed with exit code 1)
    • Xamarin.Tests.AppSizeTest.CoreCLR_Interpreter(TVOS,"tvos-arm64",...: App size changed significantly (+16,542 bytes (16.2 KB = 0.0 MB) different > tolerance of +-10,240 bytes (10.0 KB = 0.0 MB)). Ex...
    • Xamarin.Tests.AppSizeTest.CoreCLR_R2R(TVOS,"tvos-arm64",True): App size changed significantly (+16,007 bytes (15.6 KB = 0.0 MB) different > tolerance of +-10,240 bytes (10.0 KB = 0.0 MB)). Ex...
    • Xamarin.Tests.DotNetProjectTest.PublishAotMonoTouchTest_NoIL2009...: 'dotnet build' failed with exit code 1
      Full command: /Users/cloudtest/vss/_work/1/s/macios/builds/downloads/dotnet-sdk-12.0.100-...

Html Report (VSDrops) Download

❌ monotouch tests (iOS)

19 tests failed, 0 tests passed.

Failed tests

  • monotouch-test/iOS - simulator/Debug: BuildFailure
  • monotouch-test/iOS - simulator/Release (link sdk): BuildFailure
  • monotouch-test/iOS - simulator/Release (link all): BuildFailure
  • monotouch-test/iOS - simulator/Debug (Trimmable Static Registrar, link sdk): BuildFailure
  • monotouch-test/iOS - simulator/Debug (LinkSdk): BuildFailure
  • monotouch-test/iOS - simulator/Debug (static registrar): BuildFailure
  • monotouch-test/iOS - simulator/Release (all optimizations): BuildFailure ( (failed to parse the logs: The Writer is closed or in error state.))
  • monotouch-test/iOS - simulator/Release (NativeAOT): BuildFailure
  • monotouch-test/iOS - simulator/Release (trimmable static registrar, NativeAOT): BuildFailure ( (failed to parse the logs: The Writer is closed or in error state.))
  • monotouch-test/iOS - simulator/Debug (managed static registrar): BuildFailure ( (failed to parse the logs: The Writer is closed or in error state.))
  • monotouch-test/iOS - simulator/Debug (trimmable static registrar): BuildFailure ( (failed to parse the logs: The Writer is closed or in error state.))
  • monotouch-test/iOS - simulator/Release (managed static registrar, all optimizations): BuildFailure
  • monotouch-test/iOS - simulator/Debug (trimmable static registrar, all optimizations): BuildFailure
  • monotouch-test/iOS - simulator/Release (trimmable static registrar, all optimizations): BuildFailure ( (failed to parse the logs: The Writer is closed or in error state.))
  • monotouch-test/iOS - simulator/Release (compat inline Class.GetHandle): BuildFailure ( (failed to parse the logs: The Writer is closed or in error state.))
  • monotouch-test/iOS - simulator/Release (strict inline Class.GetHandle): BuildFailure
  • monotouch-test/iOS - simulator/Release (compat inline dlfcn): BuildFailure
  • monotouch-test/iOS - simulator/Release (strict inline dlfcn, link sdk): BuildFailure ( (failed to parse the logs: The Writer is closed or in error state.))
  • monotouch-test/iOS - simulator/Release (NativeAOT, .NET 11 defaults): BuildFailure ( (failed to parse the logs: The Writer is closed or in error state.))

Html Report (VSDrops) Download

❌ monotouch tests (MacCatalyst)

19 tests failed, 0 tests passed.

Failed tests

  • monotouch-test/Mac Catalyst/Debug: BuildFailure
  • monotouch-test/Mac Catalyst/Release (link sdk): BuildFailure
  • monotouch-test/Mac Catalyst/Release (link all): BuildFailure
  • monotouch-test/Mac Catalyst/Debug (Trimmable Static Registrar, link sdk): BuildFailure ( (failed to parse the logs: The Writer is closed or in error state.))
  • monotouch-test/Mac Catalyst/Debug (managed static registrar): BuildFailure ( (failed to parse the logs: The Writer is closed or in error state.))
  • monotouch-test/Mac Catalyst/Debug (trimmable static registrar): BuildFailure ( (failed to parse the logs: The Writer is closed or in error state.))
  • monotouch-test/Mac Catalyst/Debug (static registrar): BuildFailure ( (failed to parse the logs: The Writer is closed or in error state.))
  • monotouch-test/Mac Catalyst/Release (managed static registrar): BuildFailure ( (failed to parse the logs: The Writer is closed or in error state.))
  • monotouch-test/Mac Catalyst/Release (trimmable static registrar): BuildFailure ( (failed to parse the logs: The Writer is closed or in error state.))
  • monotouch-test/Mac Catalyst/Release (managed static registrar, all optimizations): BuildFailure
  • monotouch-test/Mac Catalyst/Debug (trimmable static registrar, all optimizations): BuildFailure
  • monotouch-test/Mac Catalyst/Release (trimmable static registrar, all optimizations): BuildFailure
  • monotouch-test/Mac Catalyst/Release (NativeAOT): BuildFailure ( (failed to parse the logs: The Writer is closed or in error state.))
  • monotouch-test/Mac Catalyst/Release (NativeAOT, .NET 11 defaults): BuildFailure
  • monotouch-test/Mac Catalyst/Release (trimmable static registrar, NativeAOT): BuildFailure ( (failed to parse the logs: The Writer is closed or in error state.))
  • monotouch-test/Mac Catalyst/Release (static registrar): BuildFailure ( (failed to parse the logs: The Writer is closed or in error state.))
  • monotouch-test/Mac Catalyst/Release (static registrar, all optimizations): BuildFailure ( (failed to parse the logs: The Writer is closed or in error state.))
  • monotouch-test/Mac Catalyst/Release (compat inline dlfcn): BuildFailure ( (failed to parse the logs: The Writer is closed or in error state.))
  • monotouch-test/Mac Catalyst/Release (strict inline dlfcn, link sdk): BuildFailure

Html Report (VSDrops) Download

❌ monotouch tests (macOS)

19 tests failed, 0 tests passed.

Failed tests

  • monotouch-test/macOS/Debug: BuildFailure
  • monotouch-test/macOS/Release (link sdk): BuildFailure ( (failed to parse the logs: The Writer is closed or in error state.))
  • monotouch-test/macOS/Release (link all): BuildFailure
  • monotouch-test/macOS/Debug (Trimmable Static Registrar, link sdk): BuildFailure
  • monotouch-test/macOS/Debug (managed static registrar): BuildFailure
  • monotouch-test/macOS/Debug (trimmable static registrar): BuildFailure ( (failed to parse the logs: The Writer is closed or in error state.))
  • monotouch-test/macOS/Debug (static registrar): BuildFailure ( (failed to parse the logs: The Writer is closed or in error state.))
  • monotouch-test/macOS/Release (managed static registrar): BuildFailure
  • monotouch-test/macOS/Release (trimmable static registrar): BuildFailure
  • monotouch-test/macOS/Release (managed static registrar, all optimizations): BuildFailure ( (failed to parse the logs: The Writer is closed or in error state.))
  • monotouch-test/macOS/Debug (trimmable static registrar, all optimizations): BuildFailure ( (failed to parse the logs: The Writer is closed or in error state.))
  • monotouch-test/macOS/Release (trimmable static registrar, all optimizations): BuildFailure ( (failed to parse the logs: The Writer is closed or in error state.))
  • monotouch-test/macOS/Release (NativeAOT): BuildFailure ( (failed to parse the logs: The Writer is closed or in error state.))
  • monotouch-test/macOS/Release (NativeAOT, .NET 11 defaults): BuildFailure ( (failed to parse the logs: The Writer is closed or in error state.))
  • monotouch-test/macOS/Release (trimmable static registrar, NativeAOT): BuildFailure
  • monotouch-test/macOS/Release (static registrar): BuildFailure ( (failed to parse the logs: The Writer is closed or in error state.))
  • monotouch-test/macOS/Release (static registrar, all optimizations): BuildFailure ( (failed to parse the logs: The Writer is closed or in error state.))
  • monotouch-test/macOS/Release (compat inline dlfcn): BuildFailure ( (failed to parse the logs: The Writer is closed or in error state.))
  • monotouch-test/macOS/Release (strict inline dlfcn, link sdk): BuildFailure

Html Report (VSDrops) Download

❌ monotouch tests (tvOS)

19 tests failed, 0 tests passed.

Failed tests

  • monotouch-test/tvOS - simulator/Debug: BuildFailure
  • monotouch-test/tvOS - simulator/Release (link sdk): BuildFailure
  • monotouch-test/tvOS - simulator/Release (link all): BuildFailure
  • monotouch-test/tvOS - simulator/Debug (Trimmable Static Registrar, link sdk): BuildFailure
  • monotouch-test/tvOS - simulator/Debug (LinkSdk): BuildFailure
  • monotouch-test/tvOS - simulator/Debug (static registrar): BuildFailure ( (failed to parse the logs: The Writer is closed or in error state.))
  • monotouch-test/tvOS - simulator/Release (all optimizations): BuildFailure ( (failed to parse the logs: The Writer is closed or in error state.))
  • monotouch-test/tvOS - simulator/Release (NativeAOT): BuildFailure
  • monotouch-test/tvOS - simulator/Release (trimmable static registrar, NativeAOT): BuildFailure ( (failed to parse the logs: The Writer is closed or in error state.))
  • monotouch-test/tvOS - simulator/Debug (managed static registrar): BuildFailure ( (failed to parse the logs: The Writer is closed or in error state.))
  • monotouch-test/tvOS - simulator/Debug (trimmable static registrar): BuildFailure
  • monotouch-test/tvOS - simulator/Release (managed static registrar, all optimizations): BuildFailure
  • monotouch-test/tvOS - simulator/Debug (trimmable static registrar, all optimizations): BuildFailure
  • monotouch-test/tvOS - simulator/Release (trimmable static registrar, all optimizations): BuildFailure ( (failed to parse the logs: The Writer is closed or in error state.))
  • monotouch-test/tvOS - simulator/Release (compat inline Class.GetHandle): BuildFailure
  • monotouch-test/tvOS - simulator/Release (strict inline Class.GetHandle): BuildFailure ( (failed to parse the logs: The Writer is closed or in error state.))
  • monotouch-test/tvOS - simulator/Release (compat inline dlfcn): BuildFailure
  • monotouch-test/tvOS - simulator/Release (strict inline dlfcn, link sdk): BuildFailure
  • monotouch-test/tvOS - simulator/Release (NativeAOT, .NET 11 defaults): BuildFailure

Html Report (VSDrops) Download

❌ xtro tests

1 tests failed, 0 tests passed.

Failed tests

  • Xtro: Failed (Execution failed with exit code 1)
    • Xamarin.Tests.Xtro.RunTest: ExitCode
      Assert.That(rv, Is.EqualTo (0))
      Expected: 0
      But was: 2

Html Report (VSDrops) Download

❌ Tests on macOS Sonoma (14) tests

⚠️ Tests did not run because the Build macOS tests job failed.

Html Report (VSDrops) Download

❌ Tests on macOS Sequoia (15) tests

⚠️ Tests did not run because the Build macOS tests job failed.

Html Report (VSDrops) Download

❌ Tests on macOS Tahoe (26) tests

⚠️ Tests did not run because the Build macOS tests job failed.

Html Report (VSDrops) Download

❌ Tests on macOS Golden Gate (27) tests

⚠️ Tests did not run because the Build macOS tests job failed.

Html Report (VSDrops) Download

Successes

✅ assembly-processing: All 1 tests passed. Html Report (VSDrops) Download
✅ cecil: All 1 tests passed. Html Report (VSDrops) Download
✅ dotnettests (Multiple platforms): All 1 tests passed. Html Report (VSDrops) Download
✅ framework: All 2 tests passed. Html Report (VSDrops) Download
✅ fsharp: All 4 tests passed. Html Report (VSDrops) Download
✅ generator: All 1 tests passed. Html Report (VSDrops) Download
✅ interdependent-binding-projects: All 4 tests passed. Html Report (VSDrops) Download
✅ introspection: All 4 tests passed. Html Report (VSDrops) Download
✅ linker (iOS): All 17 tests passed. Html Report (VSDrops) Download
✅ linker (MacCatalyst): All 17 tests passed. Html Report (VSDrops) Download
✅ linker (macOS): All 17 tests passed. Html Report (VSDrops) Download
✅ linker (tvOS): All 17 tests passed. Html Report (VSDrops) Download
✅ msbuild: All 2 tests passed. Html Report (VSDrops) Download
✅ sharpie: All 1 tests passed. Html Report (VSDrops) Download
✅ windows: All 3 tests passed. Html Report (VSDrops) Download
✅ xcframework: All 4 tests passed. Html Report (VSDrops) Download

macOS tests

Linux Build Verification

✅ Linux build succeeded

Pipeline on Agent
Hash: c1bb12b7a09e8a8f3d0ed11c12705aff37f158c8 [PR build]

@vs-mobiletools-engineering-service2

Copy link
Copy Markdown
Collaborator

⚠️ AppSizeTest expected files changed ⚠️

The AppSizeTest detected changes in the expected app size files.

To update the expected files, add a comment with the following command:

/apply-gist https://gist.github.com/vs-mobiletools-engineering-service2/e7e522e7e4dbf0bcff9b4318d0ef425f
Updated files
  • iOS-CoreCLR-Interpreter-size.txt
  • iOS-CoreCLR-R2R-size.txt
  • iOS-NativeAOT-size.txt
  • MacCatalyst-NativeAOT-size.txt
  • MacOSX-CoreCLR-Interpreter-size.txt
  • MacOSX-CoreCLR-R2R-size.txt
  • MacOSX-NativeAOT-size.txt
  • TVOS-CoreCLR-Interpreter-size.txt
  • TVOS-CoreCLR-R2R-size.txt

Pipeline on Agent
Hash: c1bb12b7a09e8a8f3d0ed11c12705aff37f158c8 [PR build]

@rolfbjarne

Copy link
Copy Markdown
Member Author

@dalexsoto review

Comment thread runtime/coreclr-bridge.m Resolved
Comment thread runtime/coreclr-bridge.m Resolved
Comment thread runtime/coreclr-bridge.m Resolved
Comment thread tools/devops/README.md Resolved
Comment thread runtime/trampolines-invoke.m Resolved
rolfbjarne and others added 2 commits November 19, 2026 19:45
Return best-effort stack traces and report debugger port formatting failures without terminating the process. Use managed exceptions for invalid trampoline signatures, allocation failures, array encodings, and protocol wrapper maps.

Keep fatal checks needed before the managed runtime is initialized, and document the distinction.

Co-authored-by: Copilot App <[email protected]>
Run the shared DevSkim scan stage in the test pipelines and make simulator tests depend on it. Keep VSDrops and GitHub reporting in the main CI and PR pipelines to avoid duplicate publications.

Move production scripts into scripts/devskim, update their paths and repository-root lookup, and remove the script tests and their CI step as requested in review.

Co-authored-by: Copilot App <[email protected]>
Copilot AI balanced review requested due to automatic review settings November 19, 2026 18:45

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟡 Changes recommended

Unresolved defects can hide incomplete scans, bypass native exception cleanup, and prevent new test helpers from resolving.

5 open issues

Review effort: Balanced

Comment on lines +89 to +90
if scan_status != "Succeeded" and not errors and not banned_count:
errors.append(f"The scan job status was {scan_status}. Inspect the pipeline and scanner logs.")
Comment thread runtime/runtime.m
char *message = xamarin_strdup_printf ("%s: %s", error_message, original_type);
GCHandle exception_gchandle = xamarin_create_product_exception (8040, message);
xamarin_free (message);
xamarin_process_managed_exception_gchandle (exception_gchandle);
Comment thread runtime/runtime.m
// arch-specific extension
if (snprintf (path, pathlen, "%s/%s.%s", root, resource, xamarin_arch_name) < 0) {
LOG (PRODUCT ": Failed to construct path for resource: %s (4): %s", resource, strerror (errno));
if (!xamarin_copy_path ([NSString stringWithFormat: @"%s/%s.%s", root, resource, xamarin_arch_name], path, pathlen)) {
Comment thread tests/Makefile

.PHONY: devskim
devskim:
$(Q) python3 $(TOP)/tools/devops/automation/scripts/devskim/run_devskim.py --dotnet "$(DOTNET)"
#include "libtest.h"
#include "../../runtime/native-support.h"

int

@dalexsoto dalexsoto left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I found two remaining blockers, both already described in the existing threads:

  1. Native test helpers need C linkage: tests/test-libraries/libtest.m is compiled as Objective-C++, but the new x_test_* definitions lack extern "C". The __Internal imports expect unmangled symbols, so the test application cannot resolve them. Declare both helpers with C linkage.
  2. Preserve UTF-8 in resource paths: runtime/runtime.m formats UTF-8 path components using NSString %s, which uses the system default encoding. Non-ASCII bundle or resource paths can be changed and assembly lookup can fail on CoreCLR. Decode explicitly as UTF-8 and use %@, or retain byte-preserving path construction with truncation checks.

The linked threads contain the relevant locations and proposed fixes.

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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants