Skip to content

Fix recurring TSA onboarding failure in release builds - #41167

Merged
Ben Hillis (benhillis) merged 1 commit into
masterfrom
user/benhill/fix-tsa-codebase-name
Jul 24, 2026
Merged

Fix recurring TSA onboarding failure in release builds#41167
Ben Hillis (benhillis) merged 1 commit into
masterfrom
user/benhill/fix-tsa-codebase-name

Conversation

@benhillis

Copy link
Copy Markdown
Member

Problem

Every release build (which extends the 1ES Official governed template v2/Microsoft.Official.yml@templates) fails the SDL compliance leg with:

TsaOnboardCodebaseFailedException: ... codebase: microsoft_Microsoft.WSL_microsoft/WSL
TSA Response: Codebase Name microsoft_Microsoft.WSL_microsoft/WSL invalid. Cannot contain any of " % & ` ] [ ~ ^ / \ | } { .
Error: Guardian exited with an error exit code: 1

The Official template force-runs the TSA onboard/upload step even though globalSdl.tsa.enabled was false (that flag only suppresses bug-filing, not onboarding). With no tsaoptions.json, TSA auto-derives the codebase name microsoft_Microsoft.WSL_microsoft/WSL, which contains the illegal characters . (from Microsoft.WSL) and / (from the microsoft/WSL repo slug). Onboarding therefore fails deterministically and breaks/degrades every release build.

Fix

  • Add .config/tsaoptions.json with an explicit, sanitized codebaseName (microsoft_WSL) and TSA routing (OS project, WSL area path).
  • Point the release pipeline's globalSdl.tsa at it via configFile and set enabled: true so the config is consumed.

Nightly and PR pipelines extend v2/Microsoft.NonOfficial.yml which does not force TSA onboarding, so they are left unchanged.

The 1ES Official governed template (v2/Microsoft.Official.yml) force-runs the
TSA onboard/upload step even though globalSdl.tsa.enabled was false. With no
tsaoptions.json, TSA auto-derives the codebase name
'microsoft_Microsoft.WSL_microsoft/WSL', which contains the illegal characters
'.' and '/'. Onboarding therefore fails with PreconditionFailed and
'Guardian exited with an error exit code: 1' on every release build.

Add .config/tsaoptions.json with an explicit, sanitized codebase name and wire
the release pipeline's globalSdl.tsa to consume it via configFile. Bugs are
routed to the WSL area path in the OS project.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot-Session: aa582972-8aa3-43c9-9fe3-6a9ff2bc1ab2
@benhillis
Ben Hillis (benhillis) requested a review from a team as a code owner July 24, 2026 16:50
Copilot AI review requested due to automatic review settings July 24, 2026 16:50

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.

Pull request overview

This PR fixes deterministic TSA onboarding failures in the release OneBranch pipeline by providing an explicit TSA codebase configuration (with a sanitized codebase name) and wiring the release pipeline to consume it.

Changes:

  • Enable globalSdl.tsa in the release pipeline and point it at a repo-checked-in TSA options file.
  • Add .config/tsaoptions.json defining the TSA codebaseName and routing metadata so onboarding/upload doesn’t rely on auto-derived (invalid) names.

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.

File Description
.pipelines/wsl-build-release-onebranch.yml Enables TSA for official release builds and supplies configFile so onboarding uses an explicit codebase config.
.config/tsaoptions.json Adds the TSA options needed to avoid invalid auto-derived codebase names and route TSA results correctly.

@benhillis
Ben Hillis (benhillis) enabled auto-merge (squash) July 24, 2026 17:54
@benhillis
Ben Hillis (benhillis) merged commit e351f32 into master Jul 24, 2026
12 checks passed
@benhillis
Ben Hillis (benhillis) deleted the user/benhill/fix-tsa-codebase-name branch July 24, 2026 18:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants