Skip to content

Commit b62bbca

Browse files
committed
Merge branch 'main' into pythongh-302
2 parents b1914b2 + 38c243c commit b62bbca

31 files changed

+1537
-220
lines changed

.github/SECURITY.md

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
# Security Policy
2+
3+
## Reporting a Vulnerability
4+
5+
Please use [GitHub Security Advisories](https://github.com/python/pymanager/security/advisories) to report potential issues to this project.
6+
7+
Alternatively, follow [the main security page](https://www.python.org/dev/security/) for alternate ways to report,
8+
bearing in mind that eventually we will create a report using GHSA if needed.
9+
10+
## Threat Model
11+
12+
Our threat model for the Python install manager makes the following assumptions:
13+
14+
* users are using the default index from python.org
15+
* TLS/HTTPS connections are secure and are not intercepted or tampered with
16+
* users are using the default configured directory structure
17+
* users are running with a reasonable privilege level for their environment
18+
* all reconfigured settings are intentional, including environment variables
19+
* all configuration from outside of the install manager is intentional
20+
* our code-signing infrastructure is not compromised
21+
22+
Any reported vulnerability that requires any of these assumptions to be broken will be closed and treated as a regular bug or a non-issue.
23+
24+
Notably, an index is considered to include a trustworthy set of install instructions,
25+
and so can arbitrarily modify a user's machine by design.
26+
Once a user is installing from a non-default feed,
27+
whether through modified configuration (file or environment variable) or intercepted network traffic,
28+
we cannot treat issues arising from the contents of that feed as security critical.

.github/dependabot.yml

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
version: 2
2+
updates:
3+
- package-ecosystem: github-actions
4+
cooldown:
5+
default-days: 7
6+
directory: /
7+
schedule:
8+
interval: weekly
9+
groups:
10+
github-actions:
11+
patterns:
12+
- "*"

.github/workflows/build.yml

Lines changed: 11 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -12,13 +12,16 @@ env:
1212
PIP_VERBOSE: true
1313
PYMSBUILD_VERBOSE: true
1414

15+
permissions: {}
1516

1617
jobs:
1718
build:
1819
runs-on: windows-latest
1920

2021
steps:
21-
- uses: actions/checkout@v4
22+
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
23+
with:
24+
persist-credentials: false
2225

2326
- name: 'Remove existing PyManager install'
2427
run: |
@@ -38,25 +41,25 @@ jobs:
3841
# We move faster than GitHub's Python runtimes, so use NuGet instead
3942
# One day we can use ourselves to download Python, but not yet...
4043
- name: Set up NuGet
41-
uses: nuget/setup-nuget@v2.0.1
44+
uses: nuget/setup-nuget@12c57947e9458a5b976961b08ea0706a17dd71ae # v3.0.0
4245

43-
- name: Set up Python 3.14.3
46+
- name: Set up Python 3.14.4
4447
run: |
45-
nuget install python -Version 3.14.3 -x -o .
48+
nuget install python -Version 3.14.4 -x -o .
4649
$py = Get-Item python\tools
4750
Write-Host "Adding $py to PATH"
4851
"$py" | Out-File $env:GITHUB_PATH -Encoding UTF8 -Append
4952
working-directory: ${{ runner.temp }}
5053

51-
- name: Check Python version is 3.14.3
54+
- name: Check Python version is 3.14.4
5255
run: >
5356
python -c "import sys;
5457
print(sys.version);
5558
print(sys.executable);
56-
sys.exit(0 if sys.version_info[:5] == (3, 14, 3, 'final', 0) else 1)"
59+
sys.exit(0 if sys.version_info[:5] == (3, 14, 4, 'final', 0) else 1)"
5760
5861
- name: Install build dependencies
59-
run: python -m pip install "pymsbuild>=1.2.0b1"
62+
run: python -m pip install "pymsbuild==1.2.2"
6063

6164
- name: 'Install test runner'
6265
run: python -m pip install pytest pytest-cov
@@ -74,7 +77,7 @@ jobs:
7477
--cov-report xml
7578
7679
- name: 'Upload coverage'
77-
uses: codecov/codecov-action@v5
80+
uses: codecov/codecov-action@57e3a136b779b570ffcdbf80b3bdc90e7fab3de2 # v6.0.0
7881
with:
7982
token: ${{ secrets.CODECOV_ORG_TOKEN }}
8083

_msbuild.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -58,6 +58,9 @@ class ResourceFile(CSourceFile):
5858
VersionInfo(FileDescription="Native helper functions for PyManager"),
5959
PyFile('__init__.py'),
6060
CPP_SETTINGS,
61+
ItemDefinition("Link",
62+
AdditionalDependencies=Prepend("wintrust.lib;"),
63+
),
6164
IncludeFile('*.h'),
6265
CSourceFile('*.cpp'),
6366
CFunction('coinitialize'),
@@ -89,6 +92,7 @@ class ResourceFile(CSourceFile):
8992
CFunction('read_alias_package'),
9093
CFunction('broadcast_settings_change'),
9194
CFunction('get_processor_architecture'),
95+
CFunction('verify_trust'),
9296
source='src/_native',
9397
RootNamespace='_native',
9498
)

_msbuild_test.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,9 @@
2323
PreprocessorDefinitions=Prepend("ERROR_LOCATIONS=1;BITS_INJECT_ERROR=1;"),
2424
LanguageStandard="stdcpp20",
2525
),
26+
ItemDefinition("Link",
27+
AdditionalDependencies=Prepend("wintrust.lib;"),
28+
),
2629
IncludeFile('*.h'),
2730
CSourceFile('*.cpp'),
2831
CFunction('coinitialize'),
@@ -55,6 +58,7 @@
5558
CFunction('read_alias_package'),
5659
CFunction('broadcast_settings_change'),
5760
CFunction('get_processor_architecture'),
61+
CFunction('verify_trust'),
5862
source='src/_native',
5963
),
6064
DllPackage('_shellext_test',

0 commit comments

Comments
 (0)