Workflow labels.yml grants pull-requests: read that no step uses
Mantenedores costumam responder em até 1 dia
Ninguém assumiu esta issue ainda.
Avaliação
- Dificuldade
- 1/5
- Tempo estimado
- Menos de uma hora
- Facilidade para iniciantes
- 88/100
Direção de pesquisa
A mudança está no bloco permissions: de .github/workflows/labels.yml. Verifique a etapa actions/github-script para confirmar que ela lê apenas context.payload.pull_request.labels e não faz nenhuma chamada à API. Depois, remova a linha pull-requests: read, para que sobre apenas contents: read. Está pronto quando o bloco lista somente contents: read e o workflow ainda executa a etapa de rótulos em um evento de pull request.
Escrita pelo modelo de indexação a partir do texto da issue.
Descrição
Prerequisites
- Write a descriptive title.
- Make sure you are able to repro it on the latest released version
- Search the existing issues.
- Refer to the FAQ.
- Refer to Differences between Windows PowerShell 5.1 and PowerShell.
Steps to reproduce
In .github/workflows/labels.yml
Finding
pull-requests: read has no consumer.
| step | demand | basis |
|---|---|---|
actions/checkout@3d3c42e |
contents: read |
documented requirement |
actions/github-script@3a2844b |
none | the inline script makes no API call |
The script reads context.payload.pull_request.labels. The labels are already in the webhook payload the runner receives; reading them does not touch the REST API, so no permission authorises anything here. pull-requests: read would only be needed if the script called something like pulls.get or issues.listLabelsOnIssue to fetch the labels instead, it does not.
Minimal sufficient set: contents: read.
Expected behavior
The `permissions:` block lists only the scopes a step actually uses. Here that is
`contents: read`, for `actions/checkout`.
Actual behavior
pull-requests: read is also granted, and nothing consumes it. The script reads the labels out of context.payload, which is the webhook payload the runner already holds — no REST call is made, so no permission authorises it. The scope would only be needed if the labels were fetched through the API instead.
Suggested change:
permissions:
contents: read
- pull-requests: read
Error details
Environment data
N/A
Visuals
No response
- Linguagem predominante
- C#
- Estrelas
- 55.7k
- Forks
- 8.5k
- Merge médio
- 1d 19h
- PRs com merge (30d)
- 107
Preparar o ambiente
Inicia o contêiner de desenvolvimento do projeto no navegador, com a sua própria conta do GitHub.
- Sem Dockerfile nem arquivo Docker Compose
- Tem um modelo de pull request
- Ler o guia de contribuição
Primeiros passos
- Leia a issue inteira e depois o guia de contribuição do projeto.
- Comente na issue dizendo que vai assumir — evita que duas pessoas façam o mesmo trabalho.
- Faça um fork do repositório e trabalhe em uma branch.
- Abra um pull request que referencie o número da issue.
Mais de PowerShell/PowerShell
-
Review - Maintainer WG-Maintainers-Build
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 62/100
PowerShell/PowerShell#28220 · 1 comentário ·
Mantenedores costumam responder em até 1 dia
-
Issue-Enhancement Needs-Triage
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 74/100
PowerShell/PowerShell#28138 ·
Mantenedores costumam responder em até 1 dia
-
PowerShell can crash on startup when displaying the update notification under zh-Hans due to negative PadRight widthTalvez já em andamento @Kentarohakase assumiu há 5 dias. AbertaNeeds-Triage
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 88/100
PowerShell/PowerShell#28131 · 8 comentários · 13 reações ·
Mantenedores costumam responder em até 1 dia
-
Add support for WebRequestMethod QUERYTalvez já em andamento @soroshsabz assumiu há 24 dias. AbertaIssue-Enhancement Up-for-Grabs WG-Cmdlets WG-Reviewed
Dificuldade 1/5 Menos de uma hora Facilidade para iniciantes 86/100
PowerShell/PowerShell#28061 · 3 comentários · 3 reações ·
Mantenedores costumam responder em até 1 dia
-
Dificuldade 1/5 Menos de uma hora Facilidade para iniciantes 90/100
PowerShell/PowerShell#28037 ·
Mantenedores costumam responder em até 1 dia
Todas as issues de PowerShell/PowerShell
Issues semelhantes
-
bug priority: P2
Dificuldade 1/5 1-3 horas Facilidade para iniciantes 84/100
Mantenedores costumam responder em até 1 dia
-
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 77/100
Mantenedores costumam responder em até 1 dia
-
WebullFeeModel charges SPXW options the SPX exchange feeTalvez já em andamento @Amadeus-22 assumiu hoje. Aberta
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 75/100
QuantConnect/Lean#9922 ·
Mantenedores costumam responder em até 1 dia
-
[Docs] README/PRIVACY still name AppCenter although v1.5.6.0+ uses the Microsoft Store Services SDKAberta
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 78/100
-
needs-triage
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 72/100
Azure/azure-sdk-tools#17317 ·
Mantenedores costumam responder em até 1 dia