Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Brite
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (Cyborg)
  • No Skin
Collapse
Brand Logo

CIRCLE WITH A DOT

  1. Home
  2. Uncategorized
  3. I've seen people claiming - with a straight face - that mechanical refactoring is a good use-case for LLM-based tools.

I've seen people claiming - with a straight face - that mechanical refactoring is a good use-case for LLM-based tools.

Scheduled Pinned Locked Moved Uncategorized
59 Posts 28 Posters 49 Views
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • fourlastor@androiddev.socialF fourlastor@androiddev.social

    @gabrielesvelto prompt-injections

    The project is closed source, and we don't have places where we randomly include text files, if someone IN THE COMPANY manages to introduce malicious code, imho they'd just infect gradle instead of hoping on someone running an LLM to trigger something (other than devs having access to only what they need). State sponsored hackers specifically are really not in my list of things I can defend from, be it from LLMs or whatever introduced attacks

    gabrielesvelto@mas.toG This user is from outside of this forum
    gabrielesvelto@mas.toG This user is from outside of this forum
    gabrielesvelto@mas.to
    wrote last edited by
    #30

    @fourlastor you don't need to do anything special to be a target of state-sponsored actors if your rely on an LLM for your coding tasks. State-sponsored actors have almost certainly poisoned the training data of major commercial LLMs, you don't need to add anything yourself. Remember, these things are trained on anything that's dredged from the internet. *Anything*. Do you really trust what happens within the model? Remember the xz compromise? It can now be done automatically *at scale*.

    fourlastor@androiddev.socialF 1 Reply Last reply
    0
    • gabrielesvelto@mas.toG gabrielesvelto@mas.to

      I've seen people claiming - with a straight face - that mechanical refactoring is a good use-case for LLM-based tools. Well, sed was developed in 1974 and - according to Wikipedia - first shipped in UNIX version 7 in 1979. On modern machines it can process files at speeds of several GB/s and will not randomly introduce errors while processing them. It doesn't cost billions, a subscription or internet access. It's there on your machine, fully documented. What are we even talking about?

      gabrielesvelto@mas.toG This user is from outside of this forum
      gabrielesvelto@mas.toG This user is from outside of this forum
      gabrielesvelto@mas.to
      wrote last edited by
      #31

      I think there's an important clarification to be made about LLM usage in coding tasks: do you trust the training data? Not your inputs, those are irrelevant, I mean the junk that the major vendors have dredged from the internet. Because I'm 100% positive that any self-respecting state-sponsored actor is poisoning training data as we speak by... simply publishing stuff on the internet.

      buermann@mastodon.socialB gabrielesvelto@mas.toG doctordns@masto.aiD mylittlemetroid@sfba.socialM 4 Replies Last reply
      1
      0
      • gabrielesvelto@mas.toG gabrielesvelto@mas.to

        @adingbatponder why did the project take so long to build?

        adingbatponder@fosstodon.orgA This user is from outside of this forum
        adingbatponder@fosstodon.orgA This user is from outside of this forum
        adingbatponder@fosstodon.org
        wrote last edited by
        #32

        @gabrielesvelto Well that is what rust seems to be like. I used a lot of packages incl. browser and screen grabbing tools which took ages to build. Like 20 mins. (It was inside a nixos flake though.)

        gabrielesvelto@mas.toG 1 Reply Last reply
        0
        • gabrielesvelto@mas.toG gabrielesvelto@mas.to

          I think there's an important clarification to be made about LLM usage in coding tasks: do you trust the training data? Not your inputs, those are irrelevant, I mean the junk that the major vendors have dredged from the internet. Because I'm 100% positive that any self-respecting state-sponsored actor is poisoning training data as we speak by... simply publishing stuff on the internet.

          buermann@mastodon.socialB This user is from outside of this forum
          buermann@mastodon.socialB This user is from outside of this forum
          buermann@mastodon.social
          wrote last edited by
          #33

          @gabrielesvelto

          Any blogger can poison the LLMs.

          Link Preview Image
          I hacked ChatGPT and Google's AI - and it only took 20 minutes

          I found a way to make AI tell you lies – and I'm not the only one.

          favicon

          (www.bbc.com)

          1 Reply Last reply
          0
          • gabrielesvelto@mas.toG gabrielesvelto@mas.to

            I think there's an important clarification to be made about LLM usage in coding tasks: do you trust the training data? Not your inputs, those are irrelevant, I mean the junk that the major vendors have dredged from the internet. Because I'm 100% positive that any self-respecting state-sponsored actor is poisoning training data as we speak by... simply publishing stuff on the internet.

            gabrielesvelto@mas.toG This user is from outside of this forum
            gabrielesvelto@mas.toG This user is from outside of this forum
            gabrielesvelto@mas.to
            wrote last edited by
            #34

            And it's crucial to remember what happened during the xz compromise: a chain of seemingly innocuous commits where malicious behavior was hidden, then triggered by changing a single character in a generated file. A SINGLE CHARACTER. If you truly believe you can catch that by manually reviewing thousands upon thousands of machine-generated commits obtained via black-box training data I'm sorry, but you're being extremely naive.

            a@852260996.91268476.xyzA cliffsesport@mastodon.socialC acdha@code4lib.socialA 3 Replies Last reply
            0
            • adingbatponder@fosstodon.orgA adingbatponder@fosstodon.org

              @gabrielesvelto Well that is what rust seems to be like. I used a lot of packages incl. browser and screen grabbing tools which took ages to build. Like 20 mins. (It was inside a nixos flake though.)

              gabrielesvelto@mas.toG This user is from outside of this forum
              gabrielesvelto@mas.toG This user is from outside of this forum
              gabrielesvelto@mas.to
              wrote last edited by
              #35

              @adingbatponder yes, but why? Which packages where taking so long? Firefox has almost 4 millions of lines of Rust and it takes only a few minutes to build them.

              adingbatponder@fosstodon.orgA 1 Reply Last reply
              0
              • gabrielesvelto@mas.toG gabrielesvelto@mas.to

                And it's crucial to remember what happened during the xz compromise: a chain of seemingly innocuous commits where malicious behavior was hidden, then triggered by changing a single character in a generated file. A SINGLE CHARACTER. If you truly believe you can catch that by manually reviewing thousands upon thousands of machine-generated commits obtained via black-box training data I'm sorry, but you're being extremely naive.

                a@852260996.91268476.xyzA This user is from outside of this forum
                a@852260996.91268476.xyzA This user is from outside of this forum
                a@852260996.91268476.xyz
                wrote last edited by
                #36

                @gabrielesvelto@mas.to it is also worth remembering that the xz incident happened WITHOUT LLMs involved, so you comparison is not a very good one

                gabrielesvelto@mas.toG silhouette@dumbfuckingweb.siteS 2 Replies Last reply
                0
                • gabrielesvelto@mas.toG gabrielesvelto@mas.to

                  I've seen people claiming - with a straight face - that mechanical refactoring is a good use-case for LLM-based tools. Well, sed was developed in 1974 and - according to Wikipedia - first shipped in UNIX version 7 in 1979. On modern machines it can process files at speeds of several GB/s and will not randomly introduce errors while processing them. It doesn't cost billions, a subscription or internet access. It's there on your machine, fully documented. What are we even talking about?

                  piegames@flausch.socialP This user is from outside of this forum
                  piegames@flausch.socialP This user is from outside of this forum
                  piegames@flausch.social
                  wrote last edited by
                  #37

                  @gabrielesvelto "people are using this inadequate and problematic tool for a job, so let me suggest they use this different completely inadequate tool instead."
                  Speaking of unfortunate painful experience, using grep and sed at scale for mechanical refactoring very much randomly introduces mistakes into a codebase. I beg developers to use *at least* syntax-aware tools for mechanical refactoring jobs

                  1 Reply Last reply
                  0
                  • a@852260996.91268476.xyzA a@852260996.91268476.xyz

                    @gabrielesvelto@mas.to it is also worth remembering that the xz incident happened WITHOUT LLMs involved, so you comparison is not a very good one

                    gabrielesvelto@mas.toG This user is from outside of this forum
                    gabrielesvelto@mas.toG This user is from outside of this forum
                    gabrielesvelto@mas.to
                    wrote last edited by
                    #38

                    @a how so? Now you don't need a person to run that particular exploit for years, you can just poison an LLM so that whenever someone generates a sufficiently large sequence of commits the exploit can be injected in them directly. No user intervention and it can be done at scale. And it can be done in closed-source codebases too, it's just a matter of someone using a bot on them.

                    a@852260996.91268476.xyzA ruchirasdatta@mathstodon.xyzR 2 Replies Last reply
                    0
                    • gabrielesvelto@mas.toG gabrielesvelto@mas.to

                      @a how so? Now you don't need a person to run that particular exploit for years, you can just poison an LLM so that whenever someone generates a sufficiently large sequence of commits the exploit can be injected in them directly. No user intervention and it can be done at scale. And it can be done in closed-source codebases too, it's just a matter of someone using a bot on them.

                      a@852260996.91268476.xyzA This user is from outside of this forum
                      a@852260996.91268476.xyzA This user is from outside of this forum
                      a@852260996.91268476.xyz
                      wrote last edited by
                      #39

                      @gabrielesvelto@mas.to you didn't need an LLM for xz, that is how

                      1 Reply Last reply
                      0
                      • gabrielesvelto@mas.toG gabrielesvelto@mas.to

                        @fourlastor you don't need to do anything special to be a target of state-sponsored actors if your rely on an LLM for your coding tasks. State-sponsored actors have almost certainly poisoned the training data of major commercial LLMs, you don't need to add anything yourself. Remember, these things are trained on anything that's dredged from the internet. *Anything*. Do you really trust what happens within the model? Remember the xz compromise? It can now be done automatically *at scale*.

                        fourlastor@androiddev.socialF This user is from outside of this forum
                        fourlastor@androiddev.socialF This user is from outside of this forum
                        fourlastor@androiddev.social
                        wrote last edited by
                        #40

                        @gabrielesvelto and ok, but what is the *actual* scenario you're imagining? because my coding tasks go as such when I use LLMs:
                        1. I have 10-15 classes that need to change the way we do X from Y to Z
                        2. I prompt the LLM, telling it "change A,B,C so that they use Z instead of Y"
                        3. I review the code, fixing mistakes as I see them
                        1/x because post length limits

                        fourlastor@androiddev.socialF 1 Reply Last reply
                        0
                        • fourlastor@androiddev.socialF fourlastor@androiddev.social

                          @gabrielesvelto and ok, but what is the *actual* scenario you're imagining? because my coding tasks go as such when I use LLMs:
                          1. I have 10-15 classes that need to change the way we do X from Y to Z
                          2. I prompt the LLM, telling it "change A,B,C so that they use Z instead of Y"
                          3. I review the code, fixing mistakes as I see them
                          1/x because post length limits

                          fourlastor@androiddev.socialF This user is from outside of this forum
                          fourlastor@androiddev.socialF This user is from outside of this forum
                          fourlastor@androiddev.social
                          wrote last edited by
                          #41

                          @gabrielesvelto
                          The code change is frankly pretty simple, we're talking of stuff on the level of "migrate Book so instead of using function calls, uses annotations for ABC, update the call sites", we're not talking about "change this complex piece of code so that it does complex ABC in another complex XYZ way". The realm of errors is "I know that Foo doesn't work well by itself and needs extra care"

                          fourlastor@androiddev.socialF 1 Reply Last reply
                          0
                          • fourlastor@androiddev.socialF fourlastor@androiddev.social

                            @gabrielesvelto
                            The code change is frankly pretty simple, we're talking of stuff on the level of "migrate Book so instead of using function calls, uses annotations for ABC, update the call sites", we're not talking about "change this complex piece of code so that it does complex ABC in another complex XYZ way". The realm of errors is "I know that Foo doesn't work well by itself and needs extra care"

                            fourlastor@androiddev.socialF This user is from outside of this forum
                            fourlastor@androiddev.socialF This user is from outside of this forum
                            fourlastor@androiddev.social
                            wrote last edited by
                            #42

                            @gabrielesvelto anything that goes over the bar of "this is stupid but boring" goes into the "I'll do it by hand because if anything I need to learn how it works before touching it"

                            1 Reply Last reply
                            0
                            • gabrielesvelto@mas.toG gabrielesvelto@mas.to

                              I've seen people claiming - with a straight face - that mechanical refactoring is a good use-case for LLM-based tools. Well, sed was developed in 1974 and - according to Wikipedia - first shipped in UNIX version 7 in 1979. On modern machines it can process files at speeds of several GB/s and will not randomly introduce errors while processing them. It doesn't cost billions, a subscription or internet access. It's there on your machine, fully documented. What are we even talking about?

                              jwcph@helvede.netJ This user is from outside of this forum
                              jwcph@helvede.netJ This user is from outside of this forum
                              jwcph@helvede.net
                              wrote last edited by
                              #43

                              @gabrielesvelto Just the other day I saw a goddamn professor claiming that we need to teach chatbots to reason in order for them to do math. As if we haven't had calculators that actually work every time for like 450 years. It's insane.

                              1 Reply Last reply
                              0
                              • gabrielesvelto@mas.toG gabrielesvelto@mas.to

                                @adingbatponder yes, but why? Which packages where taking so long? Firefox has almost 4 millions of lines of Rust and it takes only a few minutes to build them.

                                adingbatponder@fosstodon.orgA This user is from outside of this forum
                                adingbatponder@fosstodon.orgA This user is from outside of this forum
                                adingbatponder@fosstodon.org
                                wrote last edited by
                                #44

                                @gabrielesvelto No clue. At the time it was chrome that pushed it into silly territory. But this was inside a flake. All I know was when it was refactored it was able to use 32 processors instead of only 2.

                                1 Reply Last reply
                                0
                                • gabrielesvelto@mas.toG gabrielesvelto@mas.to

                                  @a how so? Now you don't need a person to run that particular exploit for years, you can just poison an LLM so that whenever someone generates a sufficiently large sequence of commits the exploit can be injected in them directly. No user intervention and it can be done at scale. And it can be done in closed-source codebases too, it's just a matter of someone using a bot on them.

                                  ruchirasdatta@mathstodon.xyzR This user is from outside of this forum
                                  ruchirasdatta@mathstodon.xyzR This user is from outside of this forum
                                  ruchirasdatta@mathstodon.xyz
                                  wrote last edited by
                                  #45

                                  @gabrielesvelto @a You are correct, LLMs have made this exploit many times easier to execute.

                                  1 Reply Last reply
                                  0
                                  • gabrielesvelto@mas.toG gabrielesvelto@mas.to

                                    And it's crucial to remember what happened during the xz compromise: a chain of seemingly innocuous commits where malicious behavior was hidden, then triggered by changing a single character in a generated file. A SINGLE CHARACTER. If you truly believe you can catch that by manually reviewing thousands upon thousands of machine-generated commits obtained via black-box training data I'm sorry, but you're being extremely naive.

                                    cliffsesport@mastodon.socialC This user is from outside of this forum
                                    cliffsesport@mastodon.socialC This user is from outside of this forum
                                    cliffsesport@mastodon.social
                                    wrote last edited by
                                    #46

                                    @gabrielesvelto that incident example of Metamorphic Malware?

                                    1 Reply Last reply
                                    0
                                    • a@852260996.91268476.xyzA a@852260996.91268476.xyz

                                      @gabrielesvelto@mas.to it is also worth remembering that the xz incident happened WITHOUT LLMs involved, so you comparison is not a very good one

                                      silhouette@dumbfuckingweb.siteS This user is from outside of this forum
                                      silhouette@dumbfuckingweb.siteS This user is from outside of this forum
                                      silhouette@dumbfuckingweb.site
                                      wrote last edited by
                                      #47

                                      @a @gabrielesvelto no it's actually an extremely well-made point. if we were (almost) unable to detect something like that in a FOSS project (not in the code, in a debug object mind you) then where do we get off introducing the black box which increases complexity a thousand times and claim we can still quality-control the final product. not to mention it took someone years to gain influence within the project vs a model that just scrapes public code indiscriminately

                                      a@852260996.91268476.xyzA toast@donotsta.reT 2 Replies Last reply
                                      0
                                      • silhouette@dumbfuckingweb.siteS silhouette@dumbfuckingweb.site

                                        @a @gabrielesvelto no it's actually an extremely well-made point. if we were (almost) unable to detect something like that in a FOSS project (not in the code, in a debug object mind you) then where do we get off introducing the black box which increases complexity a thousand times and claim we can still quality-control the final product. not to mention it took someone years to gain influence within the project vs a model that just scrapes public code indiscriminately

                                        a@852260996.91268476.xyzA This user is from outside of this forum
                                        a@852260996.91268476.xyzA This user is from outside of this forum
                                        a@852260996.91268476.xyz
                                        wrote last edited by
                                        #48

                                        @silhouette@dumbfuckingweb.site @gabrielesvelto@mas.to who said this already hadn't happened before the advent of LLMs? you detected ONE, you don't know how many you haven't

                                        silhouette@dumbfuckingweb.siteS 1 Reply Last reply
                                        0
                                        • silhouette@dumbfuckingweb.siteS silhouette@dumbfuckingweb.site

                                          @a @gabrielesvelto no it's actually an extremely well-made point. if we were (almost) unable to detect something like that in a FOSS project (not in the code, in a debug object mind you) then where do we get off introducing the black box which increases complexity a thousand times and claim we can still quality-control the final product. not to mention it took someone years to gain influence within the project vs a model that just scrapes public code indiscriminately

                                          toast@donotsta.reT This user is from outside of this forum
                                          toast@donotsta.reT This user is from outside of this forum
                                          toast@donotsta.re
                                          wrote last edited by
                                          #49
                                          @silhouette @a @gabrielesvelto most people (by volume AND mass) using LLMs are doing so because they do not have the skills necessary to produce the code in question (they "have the skill to read it" but if you've ever tried reimplementing a compsci research paper without just copying their code as-is you know instinctively that's not the same thing), which means that they are unlikely to tell well-crafted malicious code from legitimate code, knowing that both achieve their results
                                          this is implying they even do review it at all rather than simply relegate this to an agent that only checks if it matches the acceptance criteria (just like a real product manager!), which obviously immediately fails
                                          1 Reply Last reply
                                          0
                                          Reply
                                          • Reply as topic
                                          Log in to reply
                                          • Oldest to Newest
                                          • Newest to Oldest
                                          • Most Votes


                                          • Login

                                          • Login or register to search.
                                          • First post
                                            Last post
                                          0
                                          • Categories
                                          • Recent
                                          • Tags
                                          • Popular
                                          • World
                                          • Users
                                          • Groups