frontpage.
newsnewestaskshowjobs

Made with ♥ by @iamnishanth

Open Source @Github

fp.

Open in hackernews

Pwning the Nix ecosystem

https://ptrpa.ws/nixpkgs-actions-abuse
188•SuperShibe•6h ago

Comments

jmclnx•5h ago
Well the "good" new is, OpenBSD and NetBSD still uses CVS, even for packages. So this will not work on those systems. I do not know about FreeBSD. Security by obscurity :)

But I have been seeing docs indication those projects are looking to go to git, will see if it really happens. In OpenBSD's case seems it will be based upon got(1).

seanhunter•5h ago
Just to make it clear, what you say is correct, but this is not a git vulnerability, it's a github actions vulnerability. That is, the BSDs are secured by CVS only because github doesn't do CVS. If you use git and even github but don't do CI/CD using github actions you are not affected by this.
graemep•5h ago
This is not a git issue, it is a github issue, and as far as I can see specific to github actions.
Mic92•5h ago
Don't they use email to accept contributions? Seems like security nightmare w.r.t to impersonation.
edoceo•4h ago
Aren't messages and/or patches signed?
udev4096•4h ago
How? It's signed with their keys. Linux kernel also uses mail lists and I have yet to see someone trying to impersonate someone
woodruffw•5h ago
This is a great example of why `pull_request_target` is fundamentally insecure, and why GitHub should (IMO) probably just remove it outright: conventional wisdom dictates that `pull_request_target` is "safe" as long as branch-controlled code is never executed in the context of the job, but these kinds of argument injections/local file inclusion vectors demonstrate that the vulnerability surface is significantly larger.

At the moment, the only legitimate uses of `pull_request_target` are for things like labeling and auto-commenting on third-party PRs. But there's no reason for these actions to have default write access to the repository; GitHub can and should be able to grant fine-grained or (even better) single-use tokens that enable those exact operations.

(This is why zizmor blanket-flags all use of `pull_request_target` and other dangerous triggers[1]).

[1]: https://docs.zizmor.sh/audits/#dangerous-triggers

zamalek•4h ago
This is what GitHub says about it:

> This event runs in the context of the base of the pull request, rather than in the context of the merge commit, as the pull_request event does. This prevents execution of unsafe code from the head of the pull request that could alter your repository or steal any secrets you use in your workflow.

Which is comical given how easily secrets were exilfiltrated.

woodruffw•4h ago
Yeah, I think that documentation is irresponsibly misleading: it implies that (1) attacker code execution requires the attacker to be able to run code directly (it doesn't, per this post), and (2) that checking out at the base branch somehow stymies the attacker, when all it does is incentivizes people to check out the attacker-controlled branch explicitly.

GitHub has written a series of blog posts[1] over the years about "pwn requests," which do a great job of explaining the problem. But the misleading documentation persists, and has led to a lot of user confusion where maintainers mistakenly believe that any use of `pull_request_target` is somehow more secure than `pull_request`, when the exact opposite is true.

[1]: https://securitylab.github.com/resources/github-actions-prev...

leeter•3h ago
I don't disagree... but, there is a use case for orgs that don't allow forks. Some tools do their merging outside of github and thus allow for PRs that cannot be clean from a merge perspective. This won't trigger workflows that are pull_request. Because pull_request requires a clean merge. In those cases pull_request_target is literally the only option.

The best move would be for github to have a setting for allowing the automation to run on PRs that don't have clean merges, off by default and intended for use with linters only really. Until that happens though pull_request_target is the only game in town to get around that limitation. Much to my and other SecDevOps engineers sadness.

NOTE: with these external tools you absolutely cannot do the merge manually in github unless you want to break the entire thing. It's a whole heap of not fun.

woodruffw•3h ago
That's a fantastic use case that should be supported discretely!
leeter•3h ago
Why github didn't is beyond me. Even if something isn't merge clean doesn't mean linters shouldn't be run. I get not running deployments etc. but not even having the option is pain.
lijok•2h ago
Inside private repos we use pull_request_target because 1. it runs the workflow as it exists on main and therefore provides a surface where untampered with test suites can run, and 2. provides a deterministic job_workflow_ref in the sub claim in the jwt that can be used for highly fine grained access control in OIDC enabled systems from the workflow
woodruffw•2h ago
Private repos aren't as much of a concern, for obvious reasons.

However, it's worth noting that you don't (necessarily) need `pull_request_target` for the OIDC credential in a private repo: all first-party PRs will get it with the `pull_request` event. You can configure the subject for that credential with whatever components you want to make it deterministic.

lijok•1h ago
You’re right! I edited my comment to clarify I was talking about good ole job_workflow_ref.
perlgeek•5h ago
CI/CD actions for pull/merge requests are a nightmare. When a developer writes test/verification steps, they are mostly in the mindset "this is my code running in the context of my github/gitlab account", which is true for commits made by themselves and their team members.

But then in a pull request, the CI/CD pipeline actually runs untrusted code.

Getting this distinction correct 100% of the time in your mental model is pretty hard.

For the base case, where you maybe run a test suite and a linter, it's not too bad. But then you run into edge cases where you have to integrate with your own infrastructure (either for end2end tests, or for checking if contributors have CLAs submitted, or anything else that requires a bit more privs), and then it's very easy byte you.

woodruffw•5h ago
I don't think the problem is CI/CD runs on pull requests, per se: it's that GitHub has two extremely similar triggers (`pull_request` and `pull_request_target`). One of these is almost entirely safe (you have to go out of your way to misuse it), while the other is almost entirely unsafe (it's almost impossible to use safely).

To make things worse, GitHub has made certain operations on PRs (like auto-labeling and leaving automatic comments) completely impossible unless the extremely dangerous version (`pull_request_target`) is used. So this is a case of incentive-driven insecurity: people want to perform reasonable operations on third-party PRs, but the only mechanism GitHub Actions offers is a foot-cannon.

lostmsu•5h ago
There's a huge footgun in that article that has broader impact:

> but it gets worse. since the workflow was checking out our PR code, we could replace the OWNERS file with a symbolic link to ANY file on the runner. like, say, the github actions credentials file

So git allows committing soft links. So the issue above could affect almost any workflow.

ishouldbework•5h ago
> It is not possible for xargs to be used securely

Eh... That is taken out of context quite a bit, that sentence does continue. Just do `cat "$HOME/changed_files" | xargs -r editorconfig-checker --` and this specific problem is fixed.

woodruffw•4h ago
Yeah, I don't think the specific reason for that sentence in the manpage applies here. But the general sentiment is correct: not all programs support `--` as a delimiter between arguments and inputs, so many xargs invocations are one argument injection away from arbitrary code execution.

(This is traditionally a non-issue, since the whole point is to execute code. So this isn't xargs' fault so much as it's the undying problem of tools being reused across privilege contexts.)

ishouldbework•2h ago
Well, anything POSIX or GNU does support the --. I think most golang libraries as well? And if the program does not, you can always pass the files as relative paths (./--help) to work around that.

For sure though, this can get tricky, but I am not really aware of an alternative. :/ Since the calling convention is just an array of strings, there is no generic way to handle this without knowing what program you are calling and how it handles command line. This is not specific to xargs...

Well, I guess FFI would be a way, but it seems like a major PITA to have to figure out how to call a golang function from bash shell just to "call" a program.

woodruffw•2h ago
> This is not specific to xargs...

Right, it's just that xargs surfaces it easily. I suspect most people don't realize that they're fanning arbitrary arguments into programs when they use xargs to fan input files.

hombre_fatal•4h ago
Though that's like adding `<div>{escapeHtml(value)}</div>` everywhere you ever display a value in html to avoid xss.

If you have to opt in to safe usage at every turn, then it's an unsafe way of doing things.

stonogo•2h ago
I don't disagree but "it's not possible for xxx to be used securely" is a long way from "it's cumbersome and tedious to use xxx securely"
amluto•4h ago
I find it rather embarrassing that, after all these years of trying to design computer systems, modern workflows are still designed so that bearer tokens, even short-lived, are issued to trusted programs. If the GitHub action framework gave a privileged Unix socket or ssh-agent access instead, then this type of vulnerability would be quite a lot harder to exploit.
Thom2000•1h ago
Exactly!

Bearer tokens should be replaced with schemes based on signing and the private keys should never be directly exposed (if they are there's no difference between them and a bearer token). Signing agents do just that. Github's API is based on HTTP but mutual TLS authentication with a signing agent should be sufficient.

immibis•2h ago
> If you’ve read the man page for xargs, you’ll see this warning:

>> It is not possible for xargs to be used securely

However, the security issue this warning relates to is not the one that's applicable here. The one here is possible to avoid by using -- at the end of the command.

Apple M5 chip

https://www.apple.com/newsroom/2025/10/apple-unleashes-m5-the-next-big-leap-in-ai-performance-for...
733•mihau•6h ago•775 comments

Things I've learned in my 7 Years Implementing AI

https://www.jampa.dev/p/llms-and-the-lessons-we-still-havent
48•jampa•1h ago•16 comments

I almost got hacked by a 'job interview'

https://blog.daviddodda.com/how-i-almost-got-hacked-by-a-job-interview
444•DavidDodda•6h ago•220 comments

Claude Haiku 4.5

https://www.anthropic.com/news/claude-haiku-4-5
231•adocomplete•2h ago•87 comments

Pwning the Nix ecosystem

https://ptrpa.ws/nixpkgs-actions-abuse
188•SuperShibe•6h ago•27 comments

Claude Haiku 4.5 System Card [pdf]

https://assets.anthropic.com/m/99128ddd009bdcb/original/Claude-Haiku-4-5-System-Card.pdf
40•vinhnx•1h ago•3 comments

Clone-Wars: 100 open-source clones of popular sites

https://github.com/GorvGoyl/Clone-Wars
23•ulrischa•1h ago•0 comments

US Passport Power Falls to Historic Low

https://www.henleyglobal.com/newsroom/press-releases/henley-global-mobility-report-oct-2025
60•saubeidl•2h ago•61 comments

Show HN: Halloy – Modern IRC client

https://github.com/squidowl/halloy
202•culinary-robot•7h ago•64 comments

F5 says hackers stole undisclosed BIG-IP flaws, source code

https://www.bleepingcomputer.com/news/security/f5-says-hackers-stole-undisclosed-big-ip-flaws-sou...
70•WalterSobchak•6h ago•31 comments

C++26: range support for std:optional

https://www.sandordargo.com/blog/2025/10/08/cpp26-range-support-for-std-optional
47•birdculture•5d ago•25 comments

A kernel stack use-after-free: Exploiting Nvidia's GPU Linux drivers

https://blog.quarkslab.com/./nvidia_gpu_kernel_vmalloc_exploit.html
92•mustache_kimono•5h ago•6 comments

Recreating the Canon Cat document interface

https://lab.alexanderobenauer.com/updates/the-jasper-report
56•tonyg•5h ago•1 comments

Reverse engineering a 27MHz RC toy communication using RTL SDR

https://nitrojacob.wordpress.com/2025/09/03/reverse-engineering-a-27mhz-rc-toy-communication-usin...
53•austinallegro•5h ago•10 comments

Garbage collection for Rust: The finalizer frontier

https://soft-dev.org/pubs/html/hughes_tratt__garbage_collection_for_rust_the_finalizer_frontier/
82•ltratt•7h ago•74 comments

Leaving serverless led to performance improvement and a simplified architecture

https://www.unkey.com/blog/serverless-exit
211•vednig•8h ago•148 comments

M5 MacBook Pro

https://www.apple.com/macbook-pro/
233•tambourine_man•6h ago•285 comments

Breaking "provably correct" Leftpad

https://lukeplant.me.uk/blog/posts/breaking-provably-correct-leftpad/
56•birdculture•1w ago•15 comments

Show HN: Scriber Pro – Offline AI transcription for macOS

https://scriberpro.cc/hn/
106•rezivor•7h ago•98 comments

Americans' love of billiards paved the way for synthetic plastics

https://invention.si.edu/invention-stories/imitation-ivory-and-power-play
30•geox•6d ago•18 comments

Helpcare AI (YC F24) Is Hiring

1•hsial•7h ago

Bots are getting good at mimicking engagement

https://joindatacops.com/resources/how-73-of-your-e-commerce-visitors-could-be-fake
297•simul007•8h ago•223 comments

Recursive Language Models (RLMs)

https://alexzhang13.github.io/blog/2025/rlm/
6•talhof8•1h ago•0 comments

Pixnapping Attack

https://www.pixnapping.com/
263•kevcampb•13h ago•61 comments

iPad Pro with M5 chip

https://www.apple.com/newsroom/2025/10/apple-introduces-the-powerful-new-ipad-pro-with-the-m5-chip/
168•chasingbrains•6h ago•196 comments

FSF announces Librephone project

https://www.fsf.org/news/librephone-project
1322•g-b-r•19h ago•531 comments

Just talk to it – A way of agentic engineering

https://steipete.me/posts/just-talk-to-it
140•freediver•13h ago•79 comments

Show HN: Specific (YC F25) – Build backends with specifications instead of code

https://specific.dev/
9•fabianlindfors•2h ago•0 comments

David Byrne Radio

https://www.davidbyrne.com/radio#filter=all&sortby=date:desc
73•bookofjoe•4h ago•17 comments

Flapping-wing robot achieves self-takeoff by adopting reconfigurable mechanisms

https://www.science.org/doi/10.1126/sciadv.adx0465
69•PaulHoule•6d ago•18 comments