Skip to content

Remove API Scan from Python API pipeline - #26308

Merged
Stella Huang (StellaHuang95) merged 1 commit into
microsoft:mainfrom
StellaHuang95:stellahuang95-api-cfs-cleanup
Nov 20, 2026
Merged

Stella Huang (StellaHuang95) merged 1 commit into
microsoft:mainfrom
StellaHuang95:stellahuang95-api-cfs-cleanup

Conversation

@StellaHuang95

@StellaHuang95 Stella Huang (StellaHuang95) commented Nov 20, 2026 •

Copy link
Copy Markdown

Summary

  • remove the runAPIScan parameter, validation job, API Scan stage/tasks, TSA upload, service-connection dependency, and conditional publish dependency
  • authenticate every build/package npm restore through the DevDiv_PublicPackages CFS feed using the shared customNPMRegistry setup
  • override and verify the checked-in @types registry at runtime so scoped packages and nested installs cannot fall back to registry.npmjs.org
  • gate publication on both the completed Build stage and the 1ES-injected SDLSources stage

Security rationale

API Scan checks shipped Windows binaries for undocumented HVP API calls. @vscode/python-extension@1.0.6 contains only out/main.js, out/main.d.ts, package.json, and documentation/license files; it ships no .exe, .dll, or native .node binary. The documented API/interoperability policy still applies to JavaScript; this change classifies the binary scanner as not applicable to the current artifact, not the policy itself. API Scan must be revisited if a future package adds native or executable Windows content.

The governed 1ES Official Publish pipeline remains responsible for the applicable controls: production-readiness policy, CodeQL, secure source/binary supply-chain analysis, source/binary AntiMalware, explicit CredScan and PoliCheck, JavaScript/TypeScript ESLint, SPMI secret scanning, PSScriptAnalyzer, ARMory, Component Governance/Detection, SBoM generation and validation, TSA routing, publish authorization, release provenance/artifact validation, human ManualValidation, ESRP npm publication, and GitHub release creation. The explicit CFS, TSA, SBoM/release-job, and approval configuration remains in this pipeline; 1ES is not treated as zero-configuration.

Validation

  • Azure definition 28954 previewRun with a local YAML override and publishPythonApi=false compiled successfully.
  • The expansion contains no API Scan stage/task or VSEng-APIScanSC reference.
  • Publish depends on Build and injected SDLSources; its publication condition expands false for the validation.
  • All four npm-installing build/package jobs contain authenticated temporary npm config, lockfile registry rewriting, and explicit default/@types CFS verification before installs.
  • The retained 1ES security, TSA, SBoM, production-readiness, ManualValidation, ESRP, and release-provenance controls remain in the expansion.
  • Non-publishing run 16099224 used refs/pull/26308/merge with publishPythonApi=false. The macOS job succeeded: npm authentication completed, both root and nested lockfiles were rewritten, default and @types resolution both verified DevDiv_PublicPackages, and the root plus nested package installs/build passed.
  • Linux, Windows, and SDLSources failed before user steps in the injected 1ES PT pre-job while accessing Guardian1ESPTUpstreamOrgFeed; their CFS steps did not run. Package and Publish were skipped, so this is an infrastructure/fork-access validation limitation rather than a pipeline-step failure.
  • npx prettier --check build/azure-pipelines/devdiv/python-extension-api.yml
  • PyYAML parse and git diff --check
  • Published-package dry run confirmed six JS/declaration/metadata/doc files and zero native binaries.

No publishing parameter was enabled, the release stage did not run, and nothing was published.

Tracking: microsoft/pyrx#10073

Route npm dependency restores through DevDiv_PublicPackages while retaining the governed 1ES publishing controls.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
@StellaHuang95 Stella Huang (StellaHuang95) added the no-changelog No news entry required label Nov 20, 2026
@rchiodo

Copy link
Copy Markdown

🔒 Automated review in progress — Rich Chiodo (@rchiodo) is auto-reviewing this PR.

@rchiodo

Copy link
Copy Markdown

Reviewed commit: b50b75a602c09d4e8737c8b41aecb1bd2136ea53

Result: 🔴 could-not-verify

Verification details

Verification: Automated verification is best effort. The PR author remains responsible for testing.

Summary: [unavailable] Container verification could not start and local execution was not authorized for this PR HEAD: C:\Users\rchiodo\AppData\Local\Programs\Podman\podman.EXE --connection pyrx-automation failed: stderr: Error: unable to start container "1d5ed24a06b96f85619476655a23e8ca0a9878660822710cd106492cc21e7db9": crun: open `memory.max` for writing: No such file or directory: OCI runtime attempted to invoke a command that was not found

Test runs: none recorded.

@rchiodo Rich Chiodo (rchiodo) left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Approved via Review Center.

@rchiodo Rich Chiodo (rchiodo) added the review-auto:approved Automated review: no blocking findings (approval posted). label Nov 20, 2026
@StellaHuang95
Stella Huang (StellaHuang95) merged commit 8de146b into microsoft:main Nov 20, 2026
109 of 110 checks passed
@StellaHuang95
Stella Huang (StellaHuang95) deleted the stellahuang95-api-cfs-cleanup branch November 20, 2026 19:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

no-changelog No news entry required review-auto:approved Automated review: no blocking findings (approval posted).

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants