• Australis13@fedia.io
    link
    fedilink
    arrow-up
    6
    ·
    4 days ago

    Sigh. Don’t hardcode credentials in scripts, especially client-facing ones! If you must have credentials in plaintext on a file system, at least do something like PostgreSQL’s pgpass file (and don’t commit it to your version control system, or have it accessible via your web server!) with the appropriate user permissions set on it.

  • epyon22@sh.itjust.works
    link
    fedilink
    English
    arrow-up
    6
    ·
    4 days ago

    Remember when writing a client side JavaScript application all that code is transferred to the client machine and executed. Don’t put any sensitive code or strings in that code.

    • folekaule@lemmy.world
      link
      fedilink
      English
      arrow-up
      4
      ·
      4 days ago

      Yep. Use free tools like gitguardian, gitleaks, etc. and run them in pre-commit hooks. Makes it a lot easier to catch.

      And if you leak one by accident, change it immediately. There are bots trolling sites and repos for this information.