Skip to content

Commit 7e38c57

Browse files
authored
Add additional unchecked GitLab claims (#18650)
* Add additional unchecked GitLab claims * Update comment
1 parent 8545b13 commit 7e38c57

File tree

2 files changed

+9
-1
lines changed

2 files changed

+9
-1
lines changed

tests/unit/oidc/models/test_gitlab.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -218,6 +218,10 @@ def test_gitlab_publisher_all_known_claims(self):
218218
"project_visibility",
219219
"user_access_level",
220220
"groups_direct",
221+
"job_namespace_id",
222+
"job_namespace_path",
223+
"job_project_id",
224+
"job_project_path",
221225
}
222226

223227
def test_gitlab_publisher_computed_properties(self):

warehouse/oidc/models/gitlab.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -154,7 +154,7 @@ class GitLabPublisherMixin:
154154

155155
__unchecked_claims__ = {
156156
# We are not currently verifying project_id or namespace_id to protect against
157-
# resurrection attacks: https://github.com/pypi/warehouse/issues/13575
157+
# resurrection attacks: https://github.com/pypi/warehouse/issues/15643
158158
"project_id",
159159
"namespace_id",
160160
"namespace_path",
@@ -177,6 +177,10 @@ class GitLabPublisherMixin:
177177
"project_visibility",
178178
"user_access_level",
179179
"groups_direct",
180+
"job_namespace_id",
181+
"job_namespace_path",
182+
"job_project_id",
183+
"job_project_path",
180184
}
181185

182186
# Get the most specific publisher from a list of publishers,

0 commit comments

Comments
 (0)