Hacktoberfest 2026: as issues que os mantenedores marcaram para outubro, abertas e boas para iniciantes. Ver issues do Hacktoberfest

permission_check fails on fork PRs before it checks anything (checkout v7 refuses the head ref)

Aberta
#72 0 comentários 0 reações 0 responsáveis Ver no GitHub

Ninguém assumiu esta issue ainda.

Avaliação

Dificuldade
4/5
Tempo estimado
3-5 dias
Facilidade para iniciantes
70/100
Tipo de issue
Bug
Clareza
Claramente especificada
Status de atividade
Ativa
Stack de tecnologia
github-actions
Domínio
ci-cd, security

Direção de pesquisa

Leia init-svc-executable-permissions.yml primeiro e depois compare a etapa checkout em docker-mod-builder.yml. Rastreie a verificação de permissões e a abordagem da git trees API descritas no issue; considera-se concluído quando as verificações de permissões de fork-head funcionarem sem checkout inseguro nem alterações na segurança de pull_request_target, incluindo os casos de fork e internos documentados.

Escrita pelo modelo de indexação a partir do texto da issue.

Descrição

init-svc-executable-permissions.yml fails on a fork pull request that touches run, finish, check or root/migrations/*. The job stops before any file is read, because actions/checkout@v7.0.1 refuses pull_request.head.sha in a pull_request_target workflow.

PR #190 shows it: https://github.com/linuxserver/docker-baseimage-selkies/actions/runs/33459741080/job/99707212121
The checkout step ends with:

##[error]Refusing to check out fork pull request code from a 'pull_request_target' workflow. This workflow runs with the base repository's GITHUB_TOKEN, secrets, default-branch cache scope, and runner access. Fetching and executing a fork's code in that trusted context commonly leads to "pwn request" vulnerabilities. To opt in, review the risks at https://gh.io/securely-using-pull_request_target and set 'allow-unsafe-pr-checkout: true' on the actions/checkout step.

"Check Permissions" is then skipped and the job fails. On that head SHA (a5272e08) all 13 run/finish files are 100755, so the check would have passed.

The switch to checkout 7 reached v1 with 6c9815b8 on 2026-07-03; the first fork run after that is from 2026-07-06. Since then 45 fork-head runs across linuxserver have failed and 7 internal-head runs have passed. After the switch and before that first fork run, docker-sabnzbd run 28709064096 (2026-07-04) passed: **** All perms look good ****. Twelve open fork pull requests carry a red permission_check; three more are green from before the switch.

f3577570 pinned the step to the head SHA because the check needs the PR's own files. The file modes can be read without a checkout: the git trees API on the base repository reaches the fork head through refs/pull/N/head, so the job can flag any matching blob that is not 100755 without fetching fork code. At a5272e08 it returns truncated: false, 151 entries, 13 of them run/finish blobs, all 100755. That leaves pull_request_target and the pinned ref untouched, with no allow-unsafe-pr-checkout. The same checkout step sits in docker-mod-builder.yml, which handles CR_PAT and DOCKERPASS.

Linguagem predominante
Sem dados de linguagem
Estrelas
6
Forks
1
Merge médio
11h 55min
PRs com merge (30d)
3

Guia de contribuição

Abrir o guia de contribuição

Primeiros passos

  1. Leia a issue inteira e depois o guia de contribuição do projeto.
  2. Comente na issue dizendo que vai assumir — evita que duas pessoas façam o mesmo trabalho.
  3. Faça um fork do repositório e trabalhe em uma branch.
  4. Abra um pull request que referencie o número da issue.

Issues semelhantes

Mais issues de DevOps

Receba novas issues na sua caixa de entrada

Um resumo curto de issues do GitHub para quem está começando.