An unofficial, read-only Hacker News reader.

1Password Security Incident (opens external site)

1714 points by lxhrstn 3 days ago | 1password.com | 732 comments on HN

View full thread · View on Hacker News

Comment thread (8)

  1. > an attacker gained access to an employee’s corporate GitHub account. The actor used the account to access source code and push malicious code to backend services, which downloaded administrative data pertaining to our customers.

    What are best practices for protecting against this kind of risk?

    I don't mean account security / require 2FA etc - I mean once an account like this with push access to repos has been compromised.

    Replies (3)
    1. Physical second factor on pushes would be a good place to begin with. Perhaps also GPG signing the commits with yubikey.

      On-demand requests to elevate the required permissions for any higher risk actions, some of which require multiple humans physically intervening.

      Replies (2)
      1. And an external system to verify the commit signatures.
      2. Commit signing isn't really a security thing, at least to prevent anything. All it does is attest how the commit was made, not that it's correct or valid or should be allowed.
        Replies (1)
        1. Not on its own. But if you are providing your employees with yubikeys for which you know the public key, and you verify commits signed by the author came from their yubikey's key, it becomes an additional layer of verification that the person allowed to commit was present when the commit was signed.
    2. Assume you have a malicious employee. Use protected branches, which prevent direct pushes to main. Require only main has ability to deploy to production. OIDC and Github Environments can help you make these assertions. Don't use static credentials.
      Replies (1)
      1. I can believe this isn't standard practice. Seeing that the guy was able to push and deploy malicious code without it being caught is whats worried me on this.
    3. Prevent push to main or release branches or tags, require >0 non-author approvals (or >1 for bot PRs) for main or release merges.

      Breakglass scenarios become the main issue. You could Limit accounts with breakglass permissions to 2 non-personal account that ideally require some form of JIT to gain access to.

      But JIT controls are difficult in non-enterprise environments. It's easy to lock yourself out and require support intervention and it becomes a verification nightmare.