Several big businesses have published source code that incorporates a software package previously hallucinated by generative AI.

Not only that but someone, having spotted this reoccurring hallucination, had turned that made-up dependency into a real one, which was subsequently downloaded and installed thousands of times by developers as a result of the AI’s bad advice, we’ve learned. If the package was laced with actual malware, rather than being a benign test, the results could have been disastrous.

  • @[email protected]
    link
    fedilink
    English
    553 months ago

    I asked several AIs to write unit and integration tests for my code, and they all literally failed every single time. Some just straight up garbage, others just come up with shit I don’t even have in my code. AI is really good if you know what you’re doing and can spot what’s right and what’s wrong. Blindly taking its code is just useless, and dangerous, too.

    • @[email protected]
      link
      fedilink
      English
      183 months ago

      I find if I write one or two tests on my own then tell Copilot to complete the rest of them it’s like 90% correct.

      Still not great but at least it saves me typing a bunch of otherwise boilerplate unit tests.

      • @[email protected]
        link
        fedilink
        English
        83 months ago

        I actually haven’t tried it this way. I just asked it to write the tests for whatever class I was on and it started spitting some stuff at me. I’ll try your way and see.

      • @RIPandTERROR
        link
        English
        13 months ago

        I will say not all are equal. Copilot is ass imo compared to where ChatGPT 4.0 is currently on openai’s site

    • @[email protected]
      link
      fedilink
      English
      23 months ago

      It’s a matter of learning how to prompt it properly. It’s not a human and thus needs a different kind of instructions.

  • @conciselyverbose
    link
    English
    283 months ago

    Imagine that.

    “Writing” code you don’t understand is dangerous.

      • @lurch
        link
        English
        1
        edit-2
        3 months ago

        i think, after the current AI bubble bursts, it will come back in a decade or so and the “I” will actually be justified.

  • @[email protected]
    link
    fedilink
    English
    233 months ago

    And someone recently told me the Xz exploit doesn’t matter because no developer is stupid enough to install beta releases to prod systems lol.

    Laziness and/or low skills leads to a lot of IT failures.

    • @lurch
      link
      English
      13 months ago

      when it gets someone shell access it barely matters if it’s prod or a dev system or whatever. it’s a solid foothold for an attacker to creep onto prod eventually.

    • @[email protected]
      link
      fedilink
      English
      13 months ago

      Another way of looking at it; If there exist a release then it will be deployed to prod.

  • @[email protected]
    link
    fedilink
    English
    93 months ago

    I am lazy too and admittedly have copy pasted code from an LLM but adding a new dependency without looking at a package registry seems crazy to me.

  • AutoTL;DRB
    link
    fedilink
    English
    43 months ago

    This is the best summary I could come up with:


    In-depth Several big businesses have published source code that incorporates a software package previously hallucinated by generative AI.

    Not only that but someone, having spotted this reoccurring hallucination, had turned that made-up dependency into a real one, which was subsequently downloaded and installed thousands of times by developers as a result of the AI’s bad advice, we’ve learned.

    He created huggingface-cli in December after seeing it repeatedly hallucinated by generative AI; by February this year, Alibaba was referring to it in GraphTranslator’s README instructions rather than the real Hugging Face CLI tool.

    Last year, through security firm Vulcan Cyber, Lanyado published research detailing how one might pose a coding question to an AI model like ChatGPT and receive an answer that recommends the use of a software library, package, or framework that doesn’t exist.

    The willingness of AI models to confidently cite non-existent court cases is now well known and has caused no small amount of embarrassment among attorneys unaware of this tendency.

    As Lanyado noted previously, a miscreant might use an AI-invented name for a malicious package uploaded to some repository in the hope others might download the malware.


    The original article contains 1,143 words, the summary contains 190 words. Saved 83%. I’m a bot and I’m open source!