Stories
Slash Boxes
Comments

SoylentNews is people

posted by Fnord666 on Saturday January 04 2020, @12:31PM   Printer-friendly
from the committed-developers dept.

Starbucks Devs Leave API Key in GitHub Public Repo:

One misstep from developers at Starbucks left exposed an API key that could be used by an attacker to access internal systems and manipulate the list of authorized users.

The severity rating of the vulnerability was set to critical as the key allowed access to a Starbucks JumpCloud API.

Vulnerability hunter Vinoth Kumar found the key in a public GitHub repository and disclosed it responsibly through the HackerOne vulnerability coordination and bug bounty platform.

[...] Kumar reported the oversight on October 17 and close to three weeks later Starbucks responded it demonstrated "significant information disclosure" and that it qualified for a bug bounty.

Starbucks took care of the problem much sooner, though as Kumar noted on October 21 that the repository had been removed and the API key had been revoked.

[...] Once Starbucks was content with the remediation steps taken, the company paid Kumar a $4,000 bounty for the disclosure, which is the maximum reward for critical vulnerabilities. Most bounties from Starbucks are between $250-$375.


Original Submission

This discussion has been archived. No new comments can be posted.
Display Options Threshold/Breakthrough Mark All as Read Mark All as Unread
The Fine Print: The following comments are owned by whoever posted them. We are not responsible for them in any way.
(1)
  • (Score: 2) by ElizabethGreene on Saturday January 04 2020, @03:37PM (6 children)

    by ElizabethGreene (6748) on Saturday January 04 2020, @03:37PM (#939503) Journal

    How do you prevent this?

    I put my passwords and whatnot in a separate file, manually check in a dummy/stub copy, and then put the real one in .gitignore. It's fragile, manual, a pain, and I'd love to have a better way. Thoughts?

    • (Score: 0) by Anonymous Coward on Saturday January 04 2020, @03:55PM

      by Anonymous Coward on Saturday January 04 2020, @03:55PM (#939511)

      Have authentication files be located outside of the deployment location of your app?

    • (Score: 1) by pasky on Saturday January 04 2020, @04:31PM

      by pasky (1050) on Saturday January 04 2020, @04:31PM (#939527)

      I feel it's still not a completely solved problem.

      Separate config file is the most common approach. If you need a more flexible way to override credentials, environment variables are popular. (But environment leaks through the whole process tree by default.)

      Even if you do the most modern methodologies with GitOps and k8s + helm, sealing secrets (and keeping them in sync across services) is still way too much pain.

    • (Score: 4, Informative) by FatPhil on Saturday January 04 2020, @05:17PM

      by FatPhil (863) <reversethis-{if.fdsa} {ta} {tnelyos-cp}> on Saturday January 04 2020, @05:17PM (#939539) Homepage
      Have the creation or entry of keys done at deployment time, and a script run upon installation creates the config file from the template that is in the git repo.
      --
      Great minds discuss ideas; average minds discuss events; small minds discuss people; the smallest discuss themselves
    • (Score: 2) by darkfeline on Saturday January 04 2020, @07:52PM (1 child)

      by darkfeline (1030) on Saturday January 04 2020, @07:52PM (#939595) Homepage

      Why do you even need to put production secrets in the same directory that you're storing version controlled code? Secrets should only be deployed to prod, and prod shouldn't be committing code. If it's a user tool being run out of the source tree, it should be storing secrets in the local OS keyring, e.g. GNOME keyring, not as a file in the source tree directory.

      --
      Join the SDF Public Access UNIX System today!
      • (Score: 2) by iWantToKeepAnon on Sunday January 05 2020, @10:24PM

        by iWantToKeepAnon (686) on Sunday January 05 2020, @10:24PM (#939981) Homepage Journal
        At worst the passwords and secrets should be in a home subdirectory. Both home and the subdirectory should be 700 to keep intruders out. But (like .ssh keys) are vulnerable to account breakins. Given that they are in the home directory, test accounts/passwords can be in dev and prod accounts/passwords in prod. For an enterprise solution, you should be using a password vault like CyberArk or similar.
        --
        "Happy families are all alike; every unhappy family is unhappy in its own way." -- Anna Karenina by Leo Tolstoy
    • (Score: 2) by goodie on Monday January 06 2020, @02:08AM

      by goodie (1877) on Monday January 06 2020, @02:08AM (#940032) Journal

      Most CI solutions that handle deployments manage this through separate files and admin user/pass requirements to effectively gain read access to the file with the user info. At the end of the day it needs to be somewhere but it should never be written directly in a source file or in a main config file that ships with the code. Heck, put it in a .gitignore or something then to prevent this from happening by mistake.

  • (Score: 3, Insightful) by Mojibake Tengu on Saturday January 04 2020, @05:37PM (1 child)

    by Mojibake Tengu (8598) on Saturday January 04 2020, @05:37PM (#939546) Journal

    More disturbing than a mere leak of some particular API key is the fact this key was to the production system/infrastructure.
    Developers should never touch the production systems, they should have their own toy playgrounds separated.

    --
    Rust programming language offends both my Intelligence and my Spirit.
    • (Score: 0) by Anonymous Coward on Monday January 06 2020, @02:47AM

      by Anonymous Coward on Monday January 06 2020, @02:47AM (#940039)

      You are halfway there. Developers need access to the test systems. Its not their fault if the company is too cheap to have a separate production system.

  • (Score: 0) by Anonymous Coward on Saturday January 04 2020, @06:07PM (1 child)

    by Anonymous Coward on Saturday January 04 2020, @06:07PM (#939559)

    what a "coffee" company is doing futzing around with IT?

    • (Score: 1) by Ethanol-fueled on Sunday January 05 2020, @03:24AM

      by Ethanol-fueled (2792) on Sunday January 05 2020, @03:24AM (#939732) Homepage

      Seattle is known for both good coffee and IT, and is also known for being a city full of goddamn junkies. The offender was probably nodded off on heroin when they made the commit. Starbucks programmers keep 2 syringes of brown liquid in their desks at all times. The idiot who made the commit was fumbling for the "coffee" syringe and grabbed the "heroin" one instead while he was making comments about "cops=pigs" and "Antifa for life" in the source code.

  • (Score: 2, Insightful) by Anonymous Coward on Saturday January 04 2020, @06:52PM

    by Anonymous Coward on Saturday January 04 2020, @06:52PM (#939584)

    Maybe it's not such a good idea to be using a public (i.e. someone else's) repository to store your company's intellectual property?

(1)