There are three routes you can take.
- Assert your intention ahead of time
- Ask for permission ahead of time
- Ask for forgiveness if you get caught
Each has its benefits and drawbacks depending on how you weigh the importance of getting that job vs. working on open source projects.
Assert Your Intention
During the interview process, you should be asked if you have any questions. One way to broach the topic is just to state your intent and toss the ball in their court:
One of the reasons I have the skills I do are from working on side projects. While working here, I intend to work with open source projects like A, B, or C outside of work hours that don't compete with the software we're creating and will help me hone my skills. Does this company have a problem with that?
On the plus side, this states that working on open source projects is a benefit, and gives the company an option on how they want to respond. Even if the standard is to prohibit folks from working on side projects, if they like you they may be willing to make an exception on the spot to make sure they get you.
On the downside, they may view this as a deal-breaker and cut ties then and there. If you really care about working on side projects, this may not be a bad thing.
Ask for Permission
If you are a bit more hesitant, you can phrase the question differently:
What is company policy regarding side projects like contributing to open source software?
If the response is positive, you can ask for explicit permission. If not, you can make your decision based on how negative their response is.
On the plus side, this will give you more information on what their policy is in general because you aren't stating a strong desire to do it, just asking a general question about it. Since you get to hear their stance prior to deciding how to proceed, it has less risk than just asserting your intention flat-out.
On the downside, while it may not be as strong as asserting, if the workplace is strongly opposed to working on side projects, they may still see the question as an intent to work on them.
Ask for Forgiveness
If you have a feeling either from asking for permission, or from other information that the company may be less-than-supportive, you can always just do it and feign ignorance of company policy if you get caught. As the adage goes, "It is easier to ask for forgiveness than permission". If you do decide to go this route, make sure that your contract/the law will not cause serious issues for you or for the side project you work on if you do get found out.
On the plus side, you will be able to work on open source projects regardless of company policy.
On the downside, your employment or professionalism may be called in to question when/if you get caught.