block / block/agent-skills

[Bug] Fork pull request workflows cannot check out skill submissions

Open
#59 1 comment 0 reactions 0 assignees View on GitHub
Dominant language
Python
Stars
24
Forks
49
PR merge metrics
No merged PRs in 30d

Description

**Describe the bug**

Both fork-facing validation workflows fail at the checkout step before inspecting the submitted skill. actions/checkout now refuses to check out fork code from a pull_request_target workflow unless the workflow explicitly opts into the risk.

**To Reproduce:**

1. Open a pull request from a fork, for example #58.
2. Wait for Validate Skills and Skills Security Scan.
3. Open either failed run.
4. The 'Checkout PR head into ./pr (untrusted)' step stops with: 'Refusing to check out fork pull request code from a pull_request_target workflow.'

**Expected behavior:**

Fork submissions should be checked out in a safe, read-only context and validated by trusted base-repository code, with results reported on the PR.

**Supporting Material**

- Validate Skills failure: https://github.com/block/agent-skills/actions/runs/29828148825
- Skills Security Scan failure: https://github.com/block/agent-skills/actions/runs/29828148853
- Example fork submission: https://github.com/block/agent-skills/pull/58

The exact submitted commit independently passes the repository's structure validator on an LF checkout, and the security scanner report is PASS with zero failures and zero warnings. The hosted workflows fail before either result can be produced.

**Environment**

- OS: GitHub-hosted Ubuntu runner
- Workflow trigger: pull_request_target
- Checkout action: actions/checkout@v4

**Additional context**

The validation workflow currently executes scripts/validate-skills.mjs from the fork checkout because its working directory is pr. A fix should retain the security boundary and avoid executing fork-modified validator code with the base repository token; merely bypassing the checkout safeguard without restructuring would preserve the pwn-request risk.

Contributor guide

Open the contributing guide

Research direction

Inspect the Validate Skills and Skills Security Scan workflow definitions and reproduce the failure with pull request #58. Read scripts/validate-skills.mjs and the checkout step first; done means fork submissions are validated and scanned in a safe read-only context using trusted base-repository code, with results reported on the pull request.

Written by the indexing model from the issue text.

Assessment

Tech stack
github-actions, javascript
Domain
ci-cd, security
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
48/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.