Skip to content

Sign Django and Web template JS/TTF files with 3PartyScriptsSHA2#8485

Open
jesuszarate wants to merge 1 commit intomicrosoft:mainfrom
jesuszarate:dev/jezarat/sign-django-template-files
Open

Sign Django and Web template JS/TTF files with 3PartyScriptsSHA2#8485
jesuszarate wants to merge 1 commit intomicrosoft:mainfrom
jesuszarate:dev/jezarat/sign-django-template-files

Conversation

@jesuszarate
Copy link
Copy Markdown
Member

@jesuszarate jesuszarate commented Apr 20, 2026

Summary

The VS signing scan flags unsigned files in two PTVS template payloads:

  • mspythontoolsdjangotemplatesvsix170260206neutral: 15 files (14 JS + 1 TTF)
  • mspythontoolswebtemplatesvsix170260206neutral: 45 files (42 JS + 3 TTF)

All are 3rd-party OSS files (jQuery 1.10.2, Bootstrap 3.x, Modernizr 2.6.2, Respond.js, Glyphicons) in the StarterDjangoProject and Bottle/Flask web project templates.

Root Cause

Python/Setup/signlayout.proj signs Pylance JS via _AddPylanceFiles but does not cover the Django or Web template directories. The swixprojs source from Python/Templates/Django/ and Python/Templates/Web/ respectively, so these files flow into the VSIXes unsigned.

Fix

Add 3 MSBuild targets to signlayout.proj:

  1. _StageTemplateFiles - globs JS/TTF from Python/Templates/ (preserving Django/Web subdirectory structure) and copies to a signing staging area
  2. _AddTemplateFiles - registers them for MicroBuild signing with 3PartyScriptsSHA2 certificate
  3. _CopySignedTemplateFiles - copies signed files back to the source tree for SWIX packaging

Verification

After merge + insertion, both payloads should show 0 unsigned files in the VS signing scan (60 files resolved total).

Related

  • AzDO bug 2949498 (Django templates - 15 files)
  • AzDO bug 2951790 (Web templates - 45 files)

The VS signing scan flags unsigned files in two PTVS template payloads:
- mspythontoolsdjangotemplatesvsix170260206neutral: 15 files (14 JS + 1 TTF)
- mspythontoolswebtemplatesvsix170260206neutral: 45 files (42 JS + 3 TTF)

All are 3rd-party OSS files (jQuery, Bootstrap, Modernizr, Respond.js,
Glyphicons) in the StarterDjangoProject and various Bottle/Flask web
project templates.

The existing signlayout.proj signs Pylance JS files but does not cover
the Django or Web template directories.

This change:
- Stages all JS/TTF files from Python/Templates/ to a signing area
- Signs them with 3PartyScriptsSHA2 (3rd-party scripts cert)
- Copies signed files back to the source tree before SWIX packaging

Fixes 60 unsigned files total across both payloads.

AzDO bugs: 2949498, 2951790
@jesuszarate jesuszarate force-pushed the dev/jezarat/sign-django-template-files branch from 1f4ee22 to 5dd58bc Compare April 20, 2026 21:59
@jesuszarate jesuszarate changed the title Sign Django template JS and TTF files with 3PartyScriptsSHA2 Sign Django and Web template JS/TTF files with 3PartyScriptsSHA2 Apr 20, 2026
@jesuszarate jesuszarate marked this pull request as ready for review April 21, 2026 21:39
@jesuszarate jesuszarate requested a review from a team as a code owner April 21, 2026 21:39
@rchiodo
Copy link
Copy Markdown
Contributor

rchiodo commented Apr 23, 2026

/azp run

@azure-pipelines
Copy link
Copy Markdown

Azure Pipelines successfully started running 1 pipeline(s).

@jesuszarate
Copy link
Copy Markdown
Member Author

/azp run

@azure-pipelines
Copy link
Copy Markdown

Commenter does not have sufficient privileges for PR 8485 in repo microsoft/PTVS

@StellaHuang95
Copy link
Copy Markdown
Contributor

/azp run

@azure-pipelines
Copy link
Copy Markdown

Pull request is closed

@StellaHuang95
Copy link
Copy Markdown
Contributor

/azp run

@azure-pipelines
Copy link
Copy Markdown

Azure Pipelines successfully started running 1 pipeline(s).

@sonarqubecloud
Copy link
Copy Markdown

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