Skip to content

POC#353

Closed
rossnoah wants to merge 1 commit into
oddlama:mainfrom
rossnoah:main
Closed

POC#353
rossnoah wants to merge 1 commit into
oddlama:mainfrom
rossnoah:main

Conversation

@rossnoah

Copy link
Copy Markdown

No description provided.

@github-actions

Copy link
Copy Markdown

Proof of concept — pull_request_target RCE

This comment was posted from a fork PR via the lint-commit.yml workflow:

  1. The workflow uses on: pull_request_target and checks out the fork-controlled PR head SHA.
  2. It then runs yarn add ..., which invokes scripts.preinstall from the checked-out package.json before validating arguments or contacting the registry.
  3. A malicious scripts.preinstall runs arbitrary code on the runner.
  4. GITHUB_TOKEN is recovered from the step wrapper script in /home/runner/work/_temp and used to authenticate this comment.

The payload is benign. Recommended fix: change the trigger from pull_request_target to pull_request — commit-message linting does not require write-scoped access to the base repository.

@rossnoah rossnoah changed the title test POC May 23, 2026
@rossnoah rossnoah closed this May 23, 2026
@oddlama

oddlama commented May 23, 2026

Copy link
Copy Markdown
Owner

Thank you very much! I've applied a fix to the workflow on main

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants