René's URL Explorer Experiment


Title: Security: Branch name injection in `pr-auto-commit.yaml` — actively exploited by hackerbot-claw · Issue #7311 · RustPython/RustPython · GitHub

Open Graph Title: Security: Branch name injection in `pr-auto-commit.yaml` — actively exploited by hackerbot-claw · Issue #7311 · RustPython/RustPython

X Title: Security: Branch name injection in `pr-auto-commit.yaml` — actively exploited by hackerbot-claw · Issue #7311 · RustPython/RustPython

Description: Summary The pr-auto-commit.yaml workflow is vulnerable to shell command injection via branch names. The ${{ github.event.pull_request.head.ref }} expression is interpolated directly into run: blocks without sanitization, allowing an atta...

Open Graph Description: Summary The pr-auto-commit.yaml workflow is vulnerable to shell command injection via branch names. The ${{ github.event.pull_request.head.ref }} expression is interpolated directly into run: block...

X Description: Summary The pr-auto-commit.yaml workflow is vulnerable to shell command injection via branch names. The ${{ github.event.pull_request.head.ref }} expression is interpolated directly into run: block...

Opengraph URL: https://github.com/RustPython/RustPython/issues/7311

X: @github

direct link

Domain: github.com


Hey, it has json ld scripts:
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Security: Branch name injection in `pr-auto-commit.yaml` — actively exploited by hackerbot-claw","articleBody":"## Summary\n\nThe `pr-auto-commit.yaml` workflow is vulnerable to **shell command injection via branch names**. The `${{ github.event.pull_request.head.ref }}` expression is interpolated directly into `run:` blocks without sanitization, allowing an attacker to execute arbitrary commands on the GitHub Actions runner with access to repository secrets (including `AUTO_COMMIT_PAT`).\n\n**This vulnerability has already been exploited.** On March 2, 2026, the account [`hackerbot-claw`](https://github.com/hackerbot-claw) — an autonomous bot that has been [attacking CI/CD pipelines across major open source projects](https://www.stepsecurity.io/blog/hackerbot-claw-github-actions-exploitation) — opened two PRs ([#7308](https://github.com/RustPython/RustPython/pull/7308), [#7309](https://github.com/RustPython/RustPython/pull/7309)) with a malicious branch name designed to trigger code execution. The payload partially executed on the CI runner but failed due to a base64 encoding issue — not because of any security control.\n\n## Vulnerable Code\n\n**File:** `.github/workflows/pr-auto-commit.yaml`\n\n**Primary injection point — \"Push formatting changes\" step (line ~97):**\n\n```yaml\n- name: Push formatting changes\n  if: steps.check-changes.outputs.has_changes == 'true'\n  run: |\n    git push origin HEAD:${{ github.event.pull_request.head.ref }}\n```\n\n**Secondary injection point — \"Comment on PR\" step (line ~119):**\n\n```yaml\ngit pull origin ${{ github.event.pull_request.head.ref }}\n```\n\nBecause the workflow uses `pull_request_target`, it runs in the context of the base repository with access to secrets and write permissions. The attacker controls the branch name (`head.ref`) via their fork.\n\n### Evidence from workflow runs\n\n- **[Run 22563211110](https://github.com/RustPython/RustPython/actions/runs/22563211110)** (PR #7308): The injection step was **skipped** because `has_changes` was `false` — the trivial change to `bench.sh` didn't trigger formatting differences.\n\n- **[Run 22563415110](https://github.com/RustPython/RustPython/actions/runs/22563415110)** (PR #7309): The injection step **executed**. The build log shows `base64: invalid input`, confirming the shell evaluated the command substitution. The full payload failed due to an encoding issue in the branch name, but the `base64 -d` command did run on the runner.\n\n## Impact\n\nIf the payload had succeeded, the attacker would have had access to:\n\n- **`AUTO_COMMIT_PAT`** — a Personal Access Token available as a secret in this workflow, which could be used to push commits, modify code, or potentially take over the repository (similar to [what happened to aquasecurity/trivy](https://www.stepsecurity.io/blog/hackerbot-claw-github-actions-exploitation#attack-6-aquasecuritytrivy--full-repository-compromise) in the same campaign)\n- **`GITHUB_TOKEN`** with `contents: write` and `pull-requests: write` permissions\n\n## Context\n\nhttps://www.stepsecurity.io/blog/hackerbot-claw-github-actions-exploitation\n","author":{"url":"https://github.com/varunsh-coder","@type":"Person","name":"varunsh-coder"},"datePublished":"2026-03-02T06:43:37.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":7},"url":"https://github.com/7311/RustPython/issues/7311"}

route-pattern/_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format)
route-controllervoltron_issues_fragments
route-actionissue_layout
fetch-noncev2:9bc7e69b-8129-fce9-b6c0-938d3755893c
current-catalog-service-hash81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114
request-idC68A:15BB49:181C068:1FBD61B:6A5C703A
html-safe-nonceb4a927068f0e37b5f898192eb41572136b0dbfd980359069356d8847ce484f17
visitor-payloadeyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJDNjhBOjE1QkI0OToxODFDMDY4OjFGQkQ2MUI6NkE1QzcwM0EiLCJ2aXNpdG9yX2lkIjoiNDU0ODExMDUzMTMxNjk2OTUzMCIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9
visitor-hmac8a2b46703cd52a4ea84dc0a8e3fae5be390e1dd91d489ab637e2236fe9cdee52
hovercard-subject-tagissue:4009601667
github-keyboard-shortcutsrepository,issues,copilot
google-site-verificationApib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I
octolytics-urlhttps://collector.github.com/github/collect
analytics-location///voltron/issues_fragments/issue_layout
fb:app_id1401488693436528
apple-itunes-appapp-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/RustPython/RustPython/7311/issue_layout
twitter:imagehttps://opengraph.githubassets.com/1b690ab139e6a6806046c648b179400e64bc9fac9b2236f40c465af96a424338/RustPython/RustPython/issues/7311
twitter:cardsummary_large_image
og:imagehttps://opengraph.githubassets.com/1b690ab139e6a6806046c648b179400e64bc9fac9b2236f40c465af96a424338/RustPython/RustPython/issues/7311
og:image:altSummary The pr-auto-commit.yaml workflow is vulnerable to shell command injection via branch names. The ${{ github.event.pull_request.head.ref }} expression is interpolated directly into run: block...
og:image:width1200
og:image:height600
og:site_nameGitHub
og:typeobject
og:author:usernamevarunsh-coder
hostnamegithub.com
expected-hostnamegithub.com
None5290d7e14309ad1e76106a9c4237bd1041517e83ea182c8ab756752cb0c6940b
turbo-cache-controlno-preview
go-importgithub.com/RustPython/RustPython git https://github.com/RustPython/RustPython.git
octolytics-dimension-user_id39710557
octolytics-dimension-user_loginRustPython
octolytics-dimension-repository_id135201145
octolytics-dimension-repository_nwoRustPython/RustPython
octolytics-dimension-repository_publictrue
octolytics-dimension-repository_is_forkfalse
octolytics-dimension-repository_network_root_id135201145
octolytics-dimension-repository_network_root_nwoRustPython/RustPython
turbo-body-classeslogged-out env-production page-responsive
disable-turbofalse
browser-stats-urlhttps://api.github.com/_private/browser/stats
browser-errors-urlhttps://api.github.com/_private/browser/errors
release9c975978430e9ad293956f2bbdaf153b1bd84a99
ui-targetfull
theme-color#1e2327
color-schemelight dark

Links:

Skip to contenthttps://github.com/RustPython/RustPython/issues/7311#start-of-content
https://github.com/
Sign in https://github.com/login?return_to=https%3A%2F%2Fgithub.com%2FRustPython%2FRustPython%2Fissues%2F7311
GitHub CopilotWrite better code with AIhttps://github.com/features/copilot
GitHub Copilot appDirect agents from issue to mergehttps://github.com/features/ai/github-app
MCP RegistryNewIntegrate external toolshttps://github.com/mcp
ActionsAutomate any workflowhttps://github.com/features/actions
CodespacesInstant dev environmentshttps://github.com/features/codespaces
IssuesPlan and track workhttps://github.com/features/issues
Code ReviewManage code changeshttps://github.com/features/code-review
GitHub Advanced SecurityFind and fix vulnerabilitieshttps://github.com/security/advanced-security
Code securitySecure your code as you buildhttps://github.com/security/advanced-security/code-security
Secret protectionStop leaks before they starthttps://github.com/security/advanced-security/secret-protection
Why GitHubhttps://github.com/why-github
Documentationhttps://docs.github.com
Bloghttps://github.blog
Changeloghttps://github.blog/changelog
Marketplacehttps://github.com/marketplace
View all featureshttps://github.com/features
Enterpriseshttps://github.com/enterprise
Small and medium teamshttps://github.com/team
Startupshttps://github.com/enterprise/startups
Nonprofitshttps://github.com/solutions/industry/nonprofits
App Modernizationhttps://github.com/solutions/use-case/app-modernization
DevSecOpshttps://github.com/solutions/use-case/devsecops
DevOpshttps://github.com/solutions/use-case/devops
CI/CDhttps://github.com/solutions/use-case/ci-cd
View all use caseshttps://github.com/solutions/use-case
Healthcarehttps://github.com/solutions/industry/healthcare
Financial serviceshttps://github.com/solutions/industry/financial-services
Manufacturinghttps://github.com/solutions/industry/manufacturing
Governmenthttps://github.com/solutions/industry/government
View all industrieshttps://github.com/solutions/industry
View all solutionshttps://github.com/solutions
AIhttps://github.com/resources/articles?topic=ai
Software Developmenthttps://github.com/resources/articles?topic=software-development
DevOpshttps://github.com/resources/articles?topic=devops
Securityhttps://github.com/resources/articles?topic=security
View all topicshttps://github.com/resources/articles
Customer storieshttps://github.com/customer-stories
Events & webinarshttps://github.com/resources/events
Ebooks & reportshttps://github.com/resources/whitepapers
Business insightshttps://github.com/solutions/executive-insights
GitHub Skillshttps://skills.github.com
Documentationhttps://docs.github.com
Customer supporthttps://support.github.com
Community forumhttps://github.com/orgs/community/discussions
Trust centerhttps://github.com/trust-center
Partnershttps://github.com/partners
View all resourceshttps://github.com/resources
GitHub SponsorsFund open source developershttps://github.com/open-source/sponsors
Security Labhttps://securitylab.github.com
Maintainer Communityhttps://maintainers.github.com
Acceleratorhttps://github.com/open-source/accelerator
GitHub Starshttps://stars.github.com
Archive Programhttps://archiveprogram.github.com
Topicshttps://github.com/topics
Trendinghttps://github.com/trending
Collectionshttps://github.com/collections
Enterprise platformAI-powered developer platformhttps://github.com/enterprise
GitHub Advanced SecurityEnterprise-grade security featureshttps://github.com/security/advanced-security
Copilot for BusinessEnterprise-grade AI featureshttps://github.com/features/copilot/copilot-business
Premium SupportEnterprise-grade 24/7 supporthttps://github.com/enterprise/premium-support
Pricinghttps://github.com/pricing
Search syntax tipshttps://docs.github.com/search-github/github-code-search/understanding-github-code-search-syntax
documentationhttps://docs.github.com/search-github/github-code-search/understanding-github-code-search-syntax
Sign in https://github.com/login?return_to=https%3A%2F%2Fgithub.com%2FRustPython%2FRustPython%2Fissues%2F7311
Sign up https://github.com/signup?ref_cta=Sign+up&ref_loc=header+logged+out&ref_page=%2F%3Cuser-name%3E%2F%3Crepo-name%3E%2Fvoltron%2Fissues_fragments%2Fissue_layout&source=header-repo&source_repo=RustPython%2FRustPython
Reloadhttps://github.com/RustPython/RustPython/issues/7311
Reloadhttps://github.com/RustPython/RustPython/issues/7311
Reloadhttps://github.com/RustPython/RustPython/issues/7311
Please reload this pagehttps://github.com/RustPython/RustPython/issues/7311
RustPython https://github.com/RustPython
RustPythonhttps://github.com/RustPython/RustPython
Notifications https://github.com/login?return_to=%2FRustPython%2FRustPython
Fork 1.5k https://github.com/login?return_to=%2FRustPython%2FRustPython
Star 22.2k https://github.com/login?return_to=%2FRustPython%2FRustPython
Code https://github.com/RustPython/RustPython
Issues 290 https://github.com/RustPython/RustPython/issues
Pull requests 100 https://github.com/RustPython/RustPython/pulls
Discussions https://github.com/RustPython/RustPython/discussions
Actions https://github.com/RustPython/RustPython/actions
Projects https://github.com/RustPython/RustPython/projects
Models https://github.com/RustPython/RustPython/models
Wiki https://github.com/RustPython/RustPython/wiki
Security and quality 0 https://github.com/RustPython/RustPython/security
Insights https://github.com/RustPython/RustPython/pulse
Code https://github.com/RustPython/RustPython
Issues https://github.com/RustPython/RustPython/issues
Pull requests https://github.com/RustPython/RustPython/pulls
Discussions https://github.com/RustPython/RustPython/discussions
Actions https://github.com/RustPython/RustPython/actions
Projects https://github.com/RustPython/RustPython/projects
Models https://github.com/RustPython/RustPython/models
Wiki https://github.com/RustPython/RustPython/wiki
Security and quality https://github.com/RustPython/RustPython/security
Insights https://github.com/RustPython/RustPython/pulse
#7375https://github.com/RustPython/RustPython/pull/7375
Security: Branch name injection in pr-auto-commit.yaml — actively exploited by hackerbot-clawhttps://github.com/RustPython/RustPython/issues/7311#top
#7375https://github.com/RustPython/RustPython/pull/7375
https://github.com/youknowone
https://github.com/copilot-swe-agent
https://github.com/varunsh-coder
varunsh-coderhttps://github.com/varunsh-coder
on Mar 2, 2026https://github.com/RustPython/RustPython/issues/7311#issue-4009601667
hackerbot-clawhttps://github.com/hackerbot-claw
attacking CI/CD pipelines across major open source projectshttps://www.stepsecurity.io/blog/hackerbot-claw-github-actions-exploitation
#7308https://github.com/RustPython/RustPython/pull/7308
#7309https://github.com/RustPython/RustPython/pull/7309
Run 22563211110https://github.com/RustPython/RustPython/actions/runs/22563211110
Update bench.sh #7308https://github.com/RustPython/RustPython/pull/7308
Run 22563415110https://github.com/RustPython/RustPython/actions/runs/22563415110
Update execution.rs #7309https://github.com/RustPython/RustPython/pull/7309
what happened to aquasecurity/trivyhttps://www.stepsecurity.io/blog/hackerbot-claw-github-actions-exploitation#attack-6-aquasecuritytrivy--full-repository-compromise
https://www.stepsecurity.io/blog/hackerbot-claw-github-actions-exploitationhttps://www.stepsecurity.io/blog/hackerbot-claw-github-actions-exploitation
Copilothttps://github.com/apps/copilot-swe-agent
youknowonehttps://github.com/youknowone
https://github.com
Termshttps://docs.github.com/site-policy/github-terms/github-terms-of-service
Privacyhttps://docs.github.com/site-policy/privacy-policies/github-privacy-statement
Securityhttps://github.com/security
Statushttps://www.githubstatus.com/
Communityhttps://github.community/
Docshttps://docs.github.com/
Contacthttps://support.github.com?tags=dotcom-footer

Viewport: width=device-width


URLs of crawlers that visited me.