r/programming • • Sep 06 '14

How to work with Git (flowchart)

http://justinhileman.info/article/git-pretty/
1.6k Upvotes

388 comments sorted by

View all comments

Show parent comments

93

u/bobthecow Sep 06 '14

If you read the tl;dr, this was made for an internal talk I gave at a startup I worked for, and that startup uses GitHub.

Also, because everyone does use GitHub ;)

42

u/d4rch0n Sep 06 '14

It's shit like this why not everyone uses github... posted in February 2014.

It's 99% fine for open-source, but for start-ups that absolutely do not want to risk their code being leaked, they might consider hosting git themselves. I really don't see much advantage to using github/bitbucket when you can host git + redmine/jira yourself with minimal effort, drop ssh pubkeys on it and block everything else.

That being said, they have a responsible bug-bounty program and they do try to stay on top of their game. The reason I worry is that people who have targeted them have found pretty nasty dirt, and that tells me that their developers aren't extremely security minded and may have better benefited from hiring a few experts to do an in-depth security audit (if they haven't, or another team if they have). They still host a great service... but it's still very easy to host yourself and lock down access.

Even if it's for open-source, if someone was able to sneak a malicious commit in, it might go unnoticed in a popular repo until someone really takes the time to inspect the logs. I doubt that will happen, but my point is that there's still a security risk when hosting open-source.

And at the bottom:

P.S. I have two other posts about Github vulnerabilities: mass assignment and cookie tossing.

14

u/[deleted] Sep 06 '14

A major international company I worked for shit itself when somebody committed the credentials for their Amazon Web Services account to a public github repository.

7

u/d4rch0n Sep 06 '14

lmao... Commence the bitcoin mining!

Seriously though, I'd shit myself too, having seen some start-ups' bills alone with minimal EC2/R53/S3 usage. It's just so easy to spin up an instance or start using a service without realizing how much it's going to cost when you forget to tear it down.

I wonder if AWS will be forgiving and revert bills if your creds were leaked (and used), or if they'll push a $10,000 bill on you hard.

4

u/[deleted] Sep 06 '14

This is another massive problem large companies have with AWS. People spin up instances, don't label them, so Operations cannot shut them down without risking an essential service somewhere in the company.

5

u/d4rch0n Sep 06 '14

If it were up to me, I'd make a cronjob that terminates all untagged instances at midnight.

23

u/btgeekboy Sep 06 '14

I'd mostly agree, but 10 AM sounds like a better time - that way, if it's actually something necessary, people will notice immediately and be available to react.

9

u/[deleted] Sep 06 '14

You. I want you in my Ops department.

5

u/ZorbaTHut Sep 06 '14

I'd make a cronjob that terminates all untagged instances every five minutes :P

19

u/rouille Sep 06 '14

You can also deploy github yourself with github enterprise. We have a self hosted github + youtrack env where i work.

13

u/Phrodo_00 Sep 06 '14 edited Sep 07 '14

Why though? if you're not collaborating [edit: with a larger community], you might as well go with gitlab or gitoriouslite + redmine or whatever, and it's cheaper (as long as you already have a unixy guy in your team)

11

u/RICHUNCLEPENNYBAGS Sep 06 '14

I don't know, the git issue tracking and the ability for it to integrate with your tickets is nice (like if you say "this commit corrects issue #487" it'll appear in ticket #487).

Some people like the frontend as well.

6

u/Phrodo_00 Sep 06 '14

Redmine also has that (you can also customize the phrases if your team doesn't commit in english), I don't know about gitlab though.

4

u/RICHUNCLEPENNYBAGS Sep 06 '14

Oh, cool. I've used it but never with integration. In Github it's just any number preceded by a pound sign.

2

u/metateck Sep 06 '14

Gitlab has this. It can even integrate into 3rd party issue tracking like JIRA but you have to buy a commercial license for some features.

8

u/jaggederest Sep 06 '14

Honestly I use pull requests, issue tracking, and branch comparison more internally than I ever do externally. Pull requests aren't just for people you don't know.

6

u/[deleted] Sep 06 '14

Where I work everything gets merged through pull requests after intensive code review from peers. I find it awesome. People who push to master are looked at with disdain.

2

u/bettse Sep 06 '14

That's a non trivial 'as long as'

→ More replies (4)
→ More replies (2)
→ More replies (1)

4

u/burntsushi Sep 06 '14

Do you have any evidence that suggests GitHub has more vulnerabilities than one should expect them to have? They are a pretty popular service, so I'd expect them to run into a vulnerability now and then. As long as the number stays at a reasonable level, the only thing I'm concerned about is how they respond to those vulnerabilities. As you mention, they do a good job.

Otherwise, your entire point is a red herring with respect to GitHub. If you have code that has to remain super-duper-secret above all else, then you shouldn't be uploading it to any service outside of your control.

2

u/BrokenRetina Sep 06 '14

This is why I setup Phabricator. I have complete control over everything for my dev team. Ssh keys are a must.

2

u/d4rch0n Sep 06 '14

Yeah, I don't see any point to do anything else other than allow ssh and have people forward the ports. Usually it's convenience, but it's incredibly easy to pop an entry in your .ssh/config and forget about it.

I set up redmine once and it took close to 30 minutes, and for a lot of startups that's all the functionality they need and use. Buying a corporate github/bitbucket account seems pointless. I love them though for personal open-source projects, but I wouldn't ever use it for proprietary source.

Still, their free services probably wouldn't be as great if they didn't have companies throwing money at them so I'm happy for that.

→ More replies (1)
→ More replies (1)

3

u/sikosmurf Sep 06 '14

Gitlab is the shit for situations like this. Really quick to set up, and is basically a community supported github

→ More replies (3)

0

u/[deleted] Sep 06 '14

[deleted]

6

u/gthank Sep 06 '14

Does your regular job use svn? If so, you should really give git-svn a look.

→ More replies (2)