• bleistift2@sopuli.xyz
    link
    fedilink
    English
    arrow-up
    15
    ·
    5 months ago

    You can’t detect all credentials reliably,

    Easy. You check in the password file first. Then you can check if the codebase contains any entry on the blacklist.

    Wait…

    • pfm
      link
      fedilink
      arrow-up
      13
      ·
      5 months ago

      You were so close! The right solution is of course training an AI model that detects credentials and rejects commits that contain them!

      • tyler@programming.dev
        link
        fedilink
        arrow-up
        7
        ·
        5 months ago

        You joke, but GitHub advanced security does this and more. On top of the AI component, they check the hash of all things that look like an api key and then also check them against their integrated vendors to see if they’re non-expired. I don’t know how well it works, but they claim like a .1% false positive rate or something like that.

      • MajorHavoc@programming.dev
        link
        fedilink
        arrow-up
        6
        ·
        5 months ago

        I need one of those reminder bots, so I can share a link to an inevitable startup, six months from now, based on your humorous comment.