News for hackers. Stuff that matters.
Re:Asking ChatGPT to write my security-sensitive code for me by avian on Saturday January 07, 2023 @07:01AM (#34287274)
> ChatGPT wrote most of what ended up in my production code.

Some random person that's not going to get credited for their work wrote most of what ended up in your production code.

Re:Asking ChatGPT to write my security-sensitive code for me by williamcotton on Saturday January 07, 2023 @07:26AM (#34287436)
So GPT is simultaneously taking credit for other people’s work and a threat to open source software but also incompetent and not a threat to anyone’s job?
Re:Asking ChatGPT to write my security-sensitive code for me by throwaway371057 on Saturday January 07, 2023 @07:35AM (#34287480)
Never used it but this isn't exactly impossible, it's like having an essay due and you copy and paste chunks from the internet in a way that doesn't make sense as a whole and contains errors
Re:Asking ChatGPT to write my security-sensitive code for me by williamcotton on Saturday January 07, 2023 @08:51AM (#34287936)
Only it is nothing like this.

What’s strange is how little effort it would take for you to use these tools. What I don’t find strange is that you feel confident having an opinion about this regardless of your lack of experience.

Re:Asking ChatGPT to write my security-sensitive code for me by pclmulqdq on Saturday January 07, 2023 @07:33AM (#34287474)
I think it's more like, "when it gets code correct, that code is probably stolen from someone."
Re:Asking ChatGPT to write my security-sensitive code for me by joxel on Saturday January 07, 2023 @07:38AM (#34287512)
Maybe it’s because I’m not a CS person by trade, but the whole idea of stolen code is so stupid. There’s only a couple ways to write a function to do X, just because some asshole did it first and put it on GitHub, I’m stealing if I write the same function? Fuck off
Re:Asking ChatGPT to write my security-sensitive code for me by williamcotton on Saturday January 07, 2023 @07:45AM (#34287549)
Luckily the court system has agreed with your sentiments since the 19th century so I wouldn’t worry too much!
Re:Asking ChatGPT to write my security-sensitive code for me by williamcotton on Saturday January 07, 2023 @07:21AM (#34287404)
Really, someone out there wrote a spec for an API endpoint that updates a row in a Postgres database following our esoteric functional approach using our custom Either types and right down to the esoteric TS code formatting we used in that source file?

What a coincidence!

Re:Asking ChatGPT to write my security-sensitive code for me by bruce343434 on Saturday January 07, 2023 @07:06AM (#34287319)
I have no idea who laid down the road I use every day. Should their name be imprinted on it or something?
Re:Asking ChatGPT to write my security-sensitive code for me by williamcotton on Saturday January 07, 2023 @07:35AM (#34287487)
I’m get where you’re coming from but this has not been a convincing argument to the people who think that GPT is “stealing”.

I think the only thing that will chip away at this sentiment at this point is when the US federal court system rules in favor of GPT/et al, which seems very likely.

Re:Asking ChatGPT to write my security-sensitive code for me by gerdesj on Saturday January 07, 2023 @07:14AM (#34287366)
Re:Asking ChatGPT to write my security-sensitive code for me by jeffwass on Sunday January 08, 2023 @05:13AM (#34297757)
I often wonder how different our technology tree would be without random but critical accidents like this.

“In 1901, Edgar Purnell Hooley was walking in Denby, Derbyshire, when he noticed a smooth stretch of road close to an ironworks. He was informed that a barrel of tar had fallen onto the road and someone poured waste slag from the nearby furnaces to cover up the mess. Hooley noticed this unintentional resurfacing had solidified the road, and there was no rutting and no dust.”

Re:Asking ChatGPT to write my security-sensitive code for me by amelius on Saturday January 07, 2023 @07:11AM (#34287350)
At least they got paid for it.
Re:Asking ChatGPT to write my security-sensitive code for me by rebuilder on Saturday January 07, 2023 @07:20AM (#34287391)
If the law in your jurisdiction says so, yes.
Re:Asking ChatGPT to write my security-sensitive code for me by practice9 on Saturday January 07, 2023 @07:10AM (#34287339)
Should've imprinted their names on your car to honor the history :D
Re:Asking ChatGPT to write my security-sensitive code for me by speedgoose on Saturday January 07, 2023 @07:01AM (#34287286)
That’s not how these models work though.
Re:Asking ChatGPT to write my security-sensitive code for me by simion314 on Saturday January 07, 2023 @07:05AM (#34287316)
It depends, it happened for NN to spit out exact strings it had as input. I assume if the input for some particular stuff is low it will just spit it out, but if I am wrong and OpenAI, Microsoft or others have a mathematical proof that this will never happen I want to see it.
Re:Asking ChatGPT to write my security-sensitive code for me by speedgoose on Saturday January 07, 2023 @07:24AM (#34287421)
Yes we have seen a case of an old common and popular square root function that are returned verbatim by GitHub Copilot. Perhaps a case of overfitting since the code was present many many times in the training dataset, and even has a Wikipedia page.

I haven’t seen more obvious examples since GitHub implemented a feature to prevent this from happening. I probably miss some tweets, but I assume it’s rare.

Re:Asking ChatGPT to write my security-sensitive code for me by williamcotton on Saturday January 07, 2023 @07:29AM (#34287451)
Carmack’s fast inverse square is not subject to copyright in the first place.
Re:Asking ChatGPT to write my security-sensitive code for me by speedgoose on Saturday January 07, 2023 @07:32AM (#34287464)
True. I think the comments and the coding style were from famous implementation from the 90s, which could be a copyright issue. The algorithm itself can by copied.
Re:Asking ChatGPT to write my security-sensitive code for me by manholio on Saturday January 07, 2023 @07:11AM (#34287353)
In the case of ChatGPT, you can be almost sure that if a non-trivial amount of code works in production then it's an unlicensed paraphrase of some human written code. It treats code (and everything else) like prose, hence the atrocious results in the original story.

That does not mean other coding-optimized AI models won't be able to do much more, symbolic reasoning about the data, maintaining consistent variable and function names, understand libraries, respecting language constraints and invariants etc.

Re:Asking ChatGPT to write my security-sensitive code for me by williamcotton on Saturday January 07, 2023 @07:33AM (#34287469)
There’s no such thing as an “unlicensed paraphrase” of small snippets of utilitarian software, at least in US copyright law.

You might have moral qualms with this but you won’t find much of any support from the court system.

Re:Asking ChatGPT to write my security-sensitive code for me by manholio on Saturday January 07, 2023 @07:48AM (#34287565)
It's clearly a derived work, since the apparatus that has produced the work (the AI model) can only function when supplied with copyrighted works - in fact it cannot exists without copious amounts of such works. If there is even a passing semblance between a source work and the output, such as, for example, similar code structure and different variable names, then you are legally fucked.

I'm sure courts will clear this mess up really soon, and I'm betting money the rulings won't subscribe to the "it's mine now" mantra of the AI crowd.

Re:Asking ChatGPT to write my security-sensitive code for me by williamcotton on Saturday January 07, 2023 @08:01AM (#34287640)
Do you actually want to bet money on this? I’m willing to play!
Re:Asking ChatGPT to write my security-sensitive code for me by speedgoose on Saturday January 07, 2023 @07:52AM (#34287591)
Is there any planned court case about the copyright fair use question ?
Re:Asking ChatGPT to write my security-sensitive code for me by speedgoose on Saturday January 07, 2023 @07:20AM (#34287392)
I think ChatGPT switch to OpenAI codex when it writes code. It’s the same model that GitHub Copilot uses.
Re:Asking ChatGPT to write my security-sensitive code for me by angusturner on Saturday January 07, 2023 @07:42AM (#34287535)
If you haven’t seen it, I’d highly suggest looking at some of the recent research on in-context learning and reasoning in LLMs.

It is becoming increasingly clear that there is a phase-change in behaviour when these models get large enough, such that they can solve new tasks outside of the training distribution.

See work by Hattie Zhou or Laura Ruiz for example.

It is clear to those following the research or using these models that they are not just copy-pasting… (Even if you can cherry pick examples were the LLM recalls highly occurring dataset items like fast square root or whatever).

Re:Asking ChatGPT to write my security-sensitive code for me by Kiro on Saturday January 07, 2023 @07:52AM (#34287592)
Your comment speaks the truth but yet misinformation like the comment you are replying to is what gets upvoted, on Hacker News of all places. Embarrassing.
Re:Asking ChatGPT to write my security-sensitive code for me by sjducb on Sunday January 08, 2023 @11:15AM (#34300293)
Which parts of the posts are misinformation?
Re:Asking ChatGPT to write my security-sensitive code for me by Kiro on Saturday January 07, 2023 @08:17AM (#34287720)
That's not how it works. You need to bait it really hard and push it into a corner for it to reproduce someone else's code, at which point you may just as well copypaste the code directly from the repo you're trying to lure it to reproduce.
Re:Asking ChatGPT to write my security-sensitive code for me by mensetmanusman on Saturday January 07, 2023 @09:58PM (#34295566)
That’s not how ChatGPT works…