Do not assume public artifacts have prefix public/
@petemoore đang làm issue này rồi.
Từ ngày 7/5/2026.
Đánh giá
Issue này chưa được đánh giá.
Mô tả
Scanning the taskgraph codebase, there are several pieces of code that check whether an artifact name has prefix public/ to determine whether scopes are required to fetch it. Unfortunately this is not the correct way to determine whether an API call to fetch the artifact requires scopes.
The anonymous role determines the set of scopes that all calls are granted. Typically this includes queue:get-artifact:public/* but that is not a requirement, and in locked down taskcluster deployments this scope may not be included in the anonymous role. Furthermore, the anonymous role may include other scopes with prefix queue:get-artifact: meaning that not only public/* artifacts are public.
The bottom line is: the correct way to check whether an artifact is public is to see if an unauthorized request satisfies the scope queue:get-artifact:<artifact-name> e.g. by calling authorize (node.js) or e.g. scopes.Satisfies (go) or alternatively just fetch the artifact with an unauthorized HEAD request and check for a 200 http status code response.
In python, it looks like you can either expand the scopes of the anonymous role, or make an unauthorised call to auth.currentScopes to fetch anonymous scopes. Then call scopeMatch to see if the anonymous role satisfies the scope queue:get-artifact:<artifact-name> for the artifact name you are interested in.
Note, you should not try to parse the anonymous scopes yourself, but instead rely on one of these libraries to take care of the delicate matters of scope/role expansion, * matching, handling parameterized roles, etc.
- Ngôn ngữ chính
- Python
- Star
- 26
- Fork
- 55
- Merge trung bình
- 2 ngày 6 phút
- Pull request đã merge (30 ngày)
- 15
Hướng dẫn đóng góp
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của taskcluster/taskgraph
-
Dependency Dashboard Đang mở
Độ khó 5/5 Hơn một tuần Mức phù hợp với người mới 20/100
taskcluster/taskgraph#952 ·
-
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 35/100
taskcluster/taskgraph#915 ·
-
feature
Độ khó 3/5 1-2 ngày Mức phù hợp với người mới 35/100
taskcluster/taskgraph#911 · 1 bình luận ·
-
Độ khó 3/5 1-2 ngày Mức phù hợp với người mới 45/100
taskcluster/taskgraph#882 ·
-
Further optimize Git clones Đang mở
Độ khó 5/5 Hơn một tuần Mức phù hợp với người mới 35/100
taskcluster/taskgraph#865 · 1 bình luận ·
Tất cả issue của taskcluster/taskgraph
Issue tương tự
-
bug confirmed issue
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 75/100
open-webui/open-webui#30750 · 1 bình luận ·
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 75/100
-
enhancement
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 75/100
OpenwaterHealth/openmotion-bloodflow-app#604 · 1 bình luận ·
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 70/100
-
good first issue
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 90/100