Question: Today I opened a social network and saw that one of my coworkers, let's call him Bob, posted a piece of source code of one of our projects.

The quick video is blurry, so it's hard to actually read it, but not impossible.
IANAL but I'm pretty sure that this is illegal.

There is no way that anyone else in my company will see it since no one has that social network but for me.

As I see it I have 3 options:

* Act as if I did not see it
* Talk to him in private and make him realize how potentially bad this could end up being, for him and the company.
* Report this to my boss.

**Additional information:**

This is the first work experience for Bob and he has been working with us for less than 3 months.

My question is: **How should I behave in this situation?**

I really don't want to escalate this, but if something bad happens because of that post, and my boss finds out I knew about it, I think I would be in legal danger.

Answer: 
Just speak personally, but make things unambiguous.

> 
> That's a great video, but it might be a good idea to remove the company specific stuff - just in case the manager sees it, I'm not too sure how they'd take seeing that there.
> 
> 
> 

And then leave the implied outcome hanging and let your colleague decide what to do.
> 
> my boss finds out I knew about it, I think I would be in legal danger
> 
> 
> 

If that code is important and has any security risk - Most definitely. You may only receive a warning if it is just generic code. 

However I feel this line almost answers your question. You already said that it's your first time working with this person, you have no loyalties. It may be that the colleague in question doesn't know any better and needs educating. 

You should tell your colleague to remove it and then tell your manager of what has happened and go from there for the off chance that the manager does see it you want to make sure he's informed so that your own job and financial safety is held.