Twelve lines. A null check and a test, in a logging library we had been shipping for two years, fixing a bug that had cost our own team an afternoon the month before. His manager said no, because there was no policy and saying no felt safer than saying yes. By Thursday the engineer was asking me, in a very level voice, whether the company believed it owned what he wrote on Saturdays.
We kept him. What follows is the policy I wrote that week, rewritten since and now on its third version. It produces one page. It is not a legal opinion and it does not replace one, but it settles the six decisions that cause almost every argument, and it has survived three years of engineers who are considerably more interested in this subject than most employers expect.
Step 1: Separate the 3 Kinds of Contribution Before Writing Any Rule
Almost every bad open source policy is bad for the same reason: it treats one word, contribution, as one thing. It is three things, with risk profiles that barely overlap.
- Upstream fixes to code you already run. A patch to a dependency that is already in your lock file and already in production. Risk is close to nil, because you are not disclosing anything you have not already chosen to depend on.
- Personal projects on personal time. Unrelated to the company product. The risk here is not technical at all. It is contractual, and it is entirely about ownership.
- Releasing your own code as open source. Publishing something the company built. The only category carrying real disclosure, maintenance and reputational exposure.
Write these three down before anything else, because every subsequent rule has to say which category it applies to. A single rule covering all three will be far too strict for the first and dangerously loose for the third. That was exactly our failure: a cautious instinct built for category three got applied to a twelve line fix in category one.
Step 2: Settle Who Owns the Code, in Writing, Before Anyone Asks
This is the step that nearly cost us an engineer, and it is the one most policies leave implied. Go and read your actual employment contracts. Not the policy document, the contract.
Many contracts in this market carry an intellectual property assignment clause broad enough, on a literal reading, to reach anything an employee writes that relates to the company business, regardless of when or on what machine. That breadth is almost always accidental. It came from a template and nobody ever read it against the case of an engineer maintaining a date parsing library at the weekend. But your engineers read it that way, because a literal reading is the only reading available to someone who is worried.
So write the carve-out explicitly, in four conditions, in language a non-lawyer can apply:
- Created on personal time.
- Created on personal equipment and personal accounts.
- Uses no company confidential information, customer data or internal code.
- Does not compete with a current or announced company product.
Meet all four and it is theirs. Fail any one and it needs a conversation. Then make sure the contract and the policy agree, because two documents that contradict each other are worse than one bad document. The contractual groundwork is the same ground we cover in IP ownership in UAE developer contracts, and if your contracts have never been read against this case, start there rather than here.
Step 3: Choose an Approval Route Measured in Hours, Not Weeks
Here is the thing nobody says out loud about contribution policies: the refusal rate is almost never the problem. The latency is. An upstream fix has a window. The engineer has the context today, the maintainer is responsive today, and in three weeks the bug will have been fixed by someone else in a way you do not control.
So route by category rather than by seniority:
- Category 1 is pre-approved. No request, no ticket, no waiting. The engineer logs it in a shared sheet afterwards, which takes thirty seconds and gives you the record you actually need. This covers around eight of every ten requests we used to receive, and removing it from the queue is what made the rest of the process credible.
- Category 2 goes to one named person with a 48 hour clock. One person, not a committee, with a named deputy for when they are away. Their job is to apply the four conditions from step 2, not to form an opinion about the project.
- Category 3 gets a real review involving engineering leadership and whoever handles your legal and commercial exposure. This is the only place a slow process is defensible, because here the decision is genuinely irreversible.
And write the default into the policy: if a category 2 request gets no answer within 48 hours, it is approved. That single sentence does more for trust than the rest of the document combined, and it has never once hurt us, because it turns out that a named owner with a deadline answers.
Hiring engineers who work in the open
If public work is part of how your team builds credibility, we can help you scope the role for it and shortlist pre-vetted engineers against that scope.
Get startedStep 4: Draw the Licence Red Lines Once, So Nobody Interprets Them at 18:00
Licence questions are not hard. They are just badly timed: they always arrive when someone is already committed to a technical direction and under a deadline, which is the worst possible moment to read a licence for the first time. Decide once, in calm conditions, and publish three lists.
| Category | Examples | What an engineer does |
|---|---|---|
| Contribute freely | Permissive licences such as MIT, Apache 2.0, BSD | Proceed under the pre-approval in step 3 |
| Ask first | Strong copyleft such as the GPL family, and anything with a contributor agreement that assigns rights | One named approver, 48 hour clock |
| Refused | Licences with field of use restrictions, anything requiring publication of unrelated company code, unlicensed repositories | No, with the reason stated in one line |
The middle row is the one that matters, and it is worth being precise about why. Strong copyleft is not dangerous to contribute to. The obligations attach to distribution of the combined work, which is a different activity. Plenty of policies ban it outright out of vagueness, and the cost of that vagueness is that your engineers conclude the policy was written by someone who has not thought about it, which is exactly the conclusion that makes people stop asking. Say what the real question is, which is whether and how the code is distributed, and route it to someone who can answer.
The third row includes one item people forget: a public repository with no licence at all is not permissive, it is all rights reserved. Contributing to it is the riskiest thing on this page and it looks like the safest.
Step 5: Write Down What May Never Leave, Whatever the Licence
Licence lists govern the legal shape of a contribution. They say nothing about content, and content is where real damage happens. So name the categories that are never publishable, under any licence, with any approval:
- Credentials, keys, endpoints and infrastructure identifiers, including in test fixtures and commit history.
- Customer data of any kind, including anonymised samples, because anonymised samples are reliably less anonymous than the person preparing them believes.
- Security controls and detection logic, where publishing is a map for anyone who wants to get around them.
- Pricing, margin and commercial logic.
- Anything covered by a client confidentiality clause, which on client project work is usually more than engineers assume.
Add one procedural rule that catches most accidents: review the commit history, not just the diff. The number of secrets that reach public repositories through an early commit that was later cleaned up in the working tree is not small, and no reviewer looking at a final pull request will ever see them. The same instinct for what should not be reachable is the one we argued for in our code review policy method, and the two documents should point at each other.
Step 6: Decide the Rule for Releasing Your Own Code
Category three is where companies either do nothing or do something they regret in eighteen months. The regret is rarely legal. It is abandonment: a repository published with real enthusiasm, then starved, and now sitting in public with eleven open issues, a two year old security advisory and a README promising a roadmap that never arrived. That artefact is read by every engineer who considers applying to you, and it says something you did not intend.
So require four things before anything is published, and refuse the release if any one is missing:
- A named maintainer, by person and not by team, with the time allocation written down. A team name means nobody.
- A support expectation stated in the repository. Saying plainly that this is published as is, with no commitment to respond to issues, is honest and perfectly respectable. Saying nothing creates an expectation you will fail.
- A security contact and a stated response time, because publishing code means inviting reports, and a report with nowhere to go becomes a public disclosure.
- A retirement plan. The conditions under which you will archive it, decided now while everyone is optimistic rather than later when everyone is embarrassed.
If you cannot staff all four, the honest answer is not to publish. A good internal library that stays internal costs you nothing. A neglected public one costs you credibility with exactly the engineers you are trying to recruit, and in a market the size of this one that cost compounds faster than people expect, as anyone running enterprise software development in the UAE will recognise.
Step 7: Measure 4 Numbers Quarterly, and Fix the Slowest
A policy nobody measures becomes folklore in two quarters, and an open source policy has a particular failure mode: it looks healthy precisely when it has stopped being used. Four numbers, once a quarter.
- Requests received. If this falls toward zero, that is not compliance. It is almost always people giving up, and it should be read as an alarm rather than a success.
- Median time to decision, plus the worst case. The worst case is the number that circulates in conversation and sets everyone’s expectation of the process.
- Refusal rate, with reasons. A refusal rate above roughly one in five usually means your pre-approved category is drawn too narrowly, not that your engineers have poor judgement.
- Contributions made without asking, found by looking. This is the honesty metric. It is the only number that tells you whether the policy is trusted or merely tolerated, and a rising figure means your process is slower than people are willing to wait.
Then change one thing per quarter, with the number it is meant to move named in advance. A policy that is rewritten wholesale every few months teaches everyone that none of it is binding.
The Mistake I Made Rolling This Out
Version one was thorough and it was a ban with extra steps. Every contribution needed a request, every request went to a group, and the group met fortnightly. Nothing was ever refused, which I took at the time as proof the policy was working well.
Six months later I found out, from a conversation that was not meant for me, that people had simply stopped asking. Not maliciously: the window on an upstream fix is days, our process was weeks, and sensible people routed around it. My thorough policy had produced exactly the outcome it was written to prevent, which was contributions happening with no record and no review, and it had done so while reporting a perfect compliance rate.
Version two pre-approved category one and put a 48 hour clock with a silence rule on category two. Requests went up by a factor I did not expect, refusals stayed near zero, and for the first time I actually knew what my team was contributing to. Same intent, opposite result. The speed of the answer, not the strictness of it, is what determines whether a policy is used or bypassed. If you are rolling this out for the first time, do step 3 before step 4, and resist the urge to be thorough before you have earned the right to be.
Frequently Asked Questions
Does my company automatically own code an employee writes on their own laptop at the weekend?
What is a reasonable approval time for a contribution request?
Should we let engineers contribute on company time?
How do I test for open source judgement in an interview?
Start with step 3, not step 1
Pre-approve the cheap category this week and see what your request volume does. If the answer is that you need engineers who can be trusted with that latitude, tell us the scope and we will shortlist against it.
Get started