Differentiating · low consequence
Build.Move fast, use Claude freely, iterate with customers.
Engineering guide · Small teams · Revision 1 · 7 October 2026
When a small dev team should use open source, pay for proprietary software, or write its own, and how the answer changes as the team grows.
What is in this guide?
97%
Of commercial codebases audited contain open source. The question is never whether to use it, only which and how.
Black Duck OSSRA 2025
86%
Of those codebases carry at least one known-vulnerable open-source component. Most risk is unpatched, not exotic.
Black Duck OSSRA 2025
19.7%
Of packages suggested in 576,000 AI-generated code samples did not exist. Attackers register those names.
Spracklen et al. · USENIX Sec. 2025
Appendices: A · glossary and B · sources.
What should a two-person team do?
For a small team that is new to coding, using well-established open source is much safer than writing your own. The danger in open source is choosing the wrong package and failing to keep it updated, not open source as a category. Code you write yourselves has the same kinds of flaws, and nobody else is reading it. A popular library like Django, Postgres or OpenSSL has had thousands of people find and fix the bugs you would otherwise write.
Proprietary software is the third option, and for a small team it is often the safest of all for the few components where a mistake is catastrophic: logins, payments, secrets and anything holding regulated data. You are paying a vendor to own the security work you cannot yet do.
Build only what makes your product different.
The logic customers pay for is the one thing nobody can sell you. Everything else you build is a liability you have to maintain.
Never build security primitives.
No home-made encryption, password hashing, login or session handling, or input sanitisation. These are where breaches come from.
Buy where failure is catastrophic and the domain is regulated.
Payments (Stripe), authentication (Clerk, Auth0, Supabase Auth), secrets management, email delivery.
Borrow everything in between, carefully.
Frameworks, utilities, UI components and data handling come from popular, maintained open-source projects that a human has checked.
Every new dependency is a decision a human signs off.
Claude can propose a package; one of you verifies it exists, is the real one, and is maintained before it goes in.
What are we choosing between?
| Dimension | Open source | Proprietary | Default for a 2-person team |
|---|---|---|---|
| Upfront cost | Free | Subscription or licence | Free tiers of managed services, plus open source |
| Ongoing cost | Your time: updates, debugging | Rises with usage and seats | Time is scarcer than money; spend money to save it |
| Security | Strong if popular and patched; weak if obscure | Vendor’s responsibility, verified by audits | Buy for auth, payments, secrets; borrow popular OSS |
| Speed to ship | Fast | Fastest | Never build what you can install |
| Control and fit | High: read it, fork it | Low: their roadmap | Accept imperfect fit outside your core |
| Lock-in | Low | Medium to high | Choose vendors with data export and open standards |
| Legal risk | Licence obligations | Contract terms | Stick to MIT, Apache 2.0, BSD unless reviewed |
| Skill required | Enough to evaluate and debug | Enough to integrate | Integration is the skill you have |
| Exit cost | Low to medium | Medium to high | Know the exit before you sign |
Built in-house is left out of the default column on purpose: for a team at this stage it is the right answer only for the product’s own logic.
Is open source safe?
The case for open-source security is that anyone can read the code, so flaws get found and fixed. That holds for heavily used, well-funded projects. It breaks down in three places, and the public record shows all three.
| Incident | Year | What it shows |
|---|---|---|
| Heartbleed (OpenSSL) | 2014 | Critical infrastructure can rest on a tiny, underfunded team. A two-year-old bug exposed server memory across much of the web. |
| left-pad (npm) | 2016 | An 11-line package was unpublished and broke thousands of builds. Trivial dependencies are still dependencies. |
| event-stream (npm) | 2018 | A tired maintainer handed a popular package to a stranger, who added code to steal cryptocurrency wallets. |
| Log4Shell (Log4j) | 2021 | One flaw in a ubiquitous logging library allowed remote code execution almost everywhere. Teams that knew what they ran patched in hours; others took months. |
| xz Utils backdoor | 2024 | An attacker spent about two years earning maintainer trust, then hid a backdoor aimed at SSH. A Microsoft engineer caught it by noticing a half-second login delay. |
| tj-actions/changed-files | 2025 | A compromised GitHub Action leaked CI secrets from thousands of repositories. Build tooling is part of the supply chain. |
| Shai-Hulud (npm) | 2025 | A self-replicating worm stole maintainer tokens and republished itself into hundreds of packages, including some from large vendors. |
Most damage comes from not updating.
Black Duck found 86% of audited codebases carried a known-vulnerable open-source component. The fix existed; it was not installed.
Supply-chain attacks target the install step.
Typosquatted names, hijacked maintainer accounts, malicious updates and, now, hallucinated names that AI tools suggest. The defence is controlling what gets installed and when.
Eyes concentrate on popular projects.
A package with millions of weekly downloads and a funded foundation is scrutinised. One with a single anonymous maintainer is not.
Proprietary software is not immune.
Closed vendors have breaches too (SolarWinds, Okta, MOVEit). You simply cannot see the code, and you depend on their disclosure.
Code your team writes gets exactly two reviewers, both new to the work. Code Claude writes is fluent and confident, and it can still be wrong in ways that pass a quick read: a missing authorisation check, an injectable query, a token stored in the browser. A mature library has already met those attacks. The safe ranking for a beginner team, in security-critical areas, is managed service first, popular open source second, home-built last. In non-critical areas, popular open source comes first.
| Risk | Open source | Proprietary | Built in-house |
|---|---|---|---|
| Known vulnerabilities | Public; patch available | Vendor patches; you may not hear | Unknown until exploited |
| Malicious code | Supply-chain attacks | Rare; vendor compromise | Insider or AI-introduced |
| Abandonment | Maintainer quits | Vendor fails or pivots | Your team leaves |
| Reviewers | Many, if popular | Vendor’s team and auditors | You two |
| Visibility | Full | None | Full |
What are we actually trading?
Total cost of ownership.
Free software is not free and paid software is not just its price. Count engineer hours for integration, updates, incidents and eventual migration.
Settling questionWhat would one of us spend in hours per month to own this, and what is that hour worth against shipping product?
Speed.
Installing beats building almost every time early on. The cost of speed shows up later as integration debt.
Settling questionDoes shipping two weeks sooner matter more than a perfect fit?
Control and fit.
In-house fits exactly; open source can be forked; proprietary fits only as far as the vendor allows.
Settling questionWill we need behaviour this tool cannot give us within the next year?
Lock-in and exit.
Every choice has an exit cost. Vendors raise prices, change terms or shut down; open-source projects relicense (HashiCorp Terraform moved to the Business Source License in 2023; Redis went source-available in 2024 before adding AGPL in 2025).
Settling questionIf this disappeared in 90 days, how hard would leaving be?
Licensing and legal.
Permissive licences are nearly frictionless. Copyleft can oblige you to publish your code. Source-available licences can bar competing uses.
Settling questionHave we read the licence of everything that ships, including transitive dependencies?
People and knowledge.
Popular tools have documentation, Stack Overflow answers and engineers you can hire who already know them, and Claude knows them well. Home-built tools exist only in your heads.
Settling questionCould a new hire be productive with this in a week?
Longevity and bus factor.
Check whether the project or vendor will outlive your need for it.
Settling questionHow many maintainers, how much funding, how long in production?
Compliance.
Customers and regulators increasingly ask what is in your software and who is responsible for it. Vendors with SOC 2 or ISO 27001 reports transfer some of that burden.
Settling questionWill this choice appear in a security questionnaire, and can we answer it?
How do we decide, component by component?
Two questions sort almost every component. Does this make our product different? (Would a customer notice or care if we did it the same way as everyone else?) How bad is it if this is wrong? (A leaked password database is catastrophic; a misaligned button is not.)
Low consequence if wrong
High consequence if wrong
Differentiating
Differentiating · low consequence
Build.Move fast, use Claude freely, iterate with customers.
Differentiating · high consequence
Build carefully.Build on top of proven primitives. Get outside review before launch.
Not differentiating
Not differentiating · low consequence
Borrow.Popular open source, minimal time spent choosing.
Not differentiating · high consequence
Buy.A managed service with audits, or the most battle-tested open source with expert configuration.
For any new component, ask in order and stop at the first clear answer:
Does the language or framework already do this?
The standard library is the safest dependency you have. Prefer it.
Is it a security primitive or regulated data?
If yes: buy a managed service, or use the single most established library with its documented defaults. Never write it.
Is it our core differentiator?
If yes: build it, composed from proven parts.
Is there a popular, maintained, permissively licensed open-source option?
If yes and it passes the scorecard in section 06: borrow it.
Is there a reputable vendor with a free or affordable tier and a clean exit?
If yes and it passes section 07: buy it.
Otherwise
Build the smallest version that works, write it down, and revisit in six months.
Is this package safe to install?
| Check | Good sign | Red flag |
|---|---|---|
| Exists and is real | Name matches the project’s official site or GitHub exactly | Name differs by one letter; no linked repository; registered recently |
| Usage | Hundreds of thousands to millions of weekly downloads; used by projects you recognise | Hundreds of downloads; no dependents |
| Maintenance | Release in the last few months; issues answered; several maintainers | No commits in a year; one anonymous maintainer; pile of unanswered security issues |
| Backing | Foundation or company sponsor (Linux Foundation, Apache, OpenJS, a funded company) | Personal side project with no succession |
| Security posture | Security policy file; published advisories handled promptly; good OpenSSF Scorecard | No way to report vulnerabilities; install scripts that download code |
| Licence | MIT, Apache 2.0, BSD, ISC | GPL or AGPL in a closed product; BSL, SSPL or no licence at all |
| Size and footprint | Does one job; few dependencies of its own | Pulls in dozens of transitive packages to save you ten lines |
Free tools that do most of this for you: OpenSSF Scorecard and deps.dev (maintenance and security signals), Socket (flags malicious and suspicious packages, not just known CVEs), GitHub Dependabot (alerts and update pull requests), and npm audit or pip-audit (known vulnerabilities).
| Licence | Type | What it means for a closed commercial product |
|---|---|---|
| MIT, BSD, ISC | Permissive | Use freely. Keep the copyright notice. |
| Apache 2.0 | Permissive | Use freely. Keep notices; includes an explicit patent grant, which is a plus. |
| MPL 2.0 | Weak copyleft | Fine to use. Changes to MPL files themselves must be shared. |
| LGPL | Weak copyleft | Usually fine if dynamically linked and unmodified. Check with counsel for mobile or static builds. |
| GPL v2 / v3 | Strong copyleft | If you distribute software that includes it, your code may have to be released under GPL. Server-only use is generally not distribution. |
| AGPL v3 | Network copyleft | Serving it over a network counts. Avoid in a closed SaaS product without legal review. |
| BSL, SSPL, Elastic | Source-available | Not open source. Usually bars offering it as a competing service. Read the terms. |
| No licence | All rights reserved | You have no right to use it. Do not install it. |
This is orientation, not legal advice. Before a fundraise or sale, have counsel review a full licence report (section 10).
Is this vendor safe to depend on?
| Check | What to look for |
|---|---|
| Security evidence | A SOC 2 Type II or ISO 27001 report, a public security page, a history of honest breach disclosure. |
| Data exit | A documented, complete export in an open format. Test it once before you rely on it. |
| Standards | Built on open standards (OAuth/OIDC, SQL, S3-compatible storage, SMTP) so a replacement can slot in. |
| Pricing curve | What the bill looks like at 10× and 100× your usage. Per-seat and per-event pricing can overtake an engineer’s salary. |
| Reliability | Published uptime history and status page. An SLA with credits if you are on a paid tier. |
| Viability | Funding, revenue and customer base. A startup vendor is a risk to price in, not a reason to refuse. |
| Terms | Who owns your data, whether they may train models on it, notice periods for price and term changes. |
| Free tier limits | Exactly where the free tier stops, and what happens to you when you hit it. |
What changes when Claude writes the code?
Claude Code makes writing code nearly free, which makes “just build it” tempting. The cost of software was never mostly the writing. It is the owning: understanding, securing, testing and maintaining. AI lowers the first cost and leaves the others where they were, so for a beginner team it tilts the right answer further toward proven components, not away from them.
| Failure mode | What happens | Guardrail |
|---|---|---|
| Hallucinated packages | Claude suggests a plausible package name that does not exist. Attackers register those names (“slopsquatting”). | Verify every new package name against its official site before install. |
| Outdated APIs | Code uses a deprecated function or an old major version with known flaws. | Pin current versions; ask Claude to check the library’s current docs. |
| Dependency sprawl | A new package for every small task. | Prefer the standard library; require a stated reason for each dependency. |
| Reinvented security | Hand-written auth, crypto or sanitisation that looks right and is not. | Ban it in CLAUDE.md; use the vendor or framework feature. |
| Secrets in code | API keys pasted into source or committed to Git. | Environment variables, a secrets manager, and GitHub secret scanning. |
| Confident wrong code | Code passes a read and fails an attack. | Tests, a second human reviewer, and automated scanning in CI. |
CLAUDE.md
## Dependencies and security - Do not add a new dependency without listing it, explaining why the standard library or an existing dependency will not do, and linking its official repository. - Prefer the standard library. Prefer packages we already use. - Never implement cryptography, password hashing, authentication, session handling or input sanitisation. Use <our auth provider> and the framework's built-in protections. - Never put secrets in code. Read them from environment variables. - Pin exact versions. Commit the lockfile.
Lockfiles, committed.
package-lock.json, pnpm-lock.yaml, uv.lock or poetry.lock. Builds install exactly what you tested.
Automated update pull requests.
Dependabot or Renovate, with security updates on. Merge them weekly.
A waiting period for new releases.
Renovate’s minimumReleaseAge (and similar settings in pnpm and uv) delays brand-new versions by a few days, which is when most hijacked releases are caught.
Scanning in CI.
npm audit or pip-audit for known flaws; Socket for malicious packages; GitHub secret scanning and push protection.
Branch protection.
Nothing reaches main without the other person’s review, including dependency changes.
Pin CI actions by commit hash.
Not by tag, which can be moved (the tj-actions lesson).
How does the answer change as we grow?
The core rule (build the differentiator, buy the dangerous, borrow the rest) holds at every size. What changes is the cost of engineer time against vendor bills, the team’s ability to own complex systems safely, and how much customers and regulators demand to know. Five stages:
| Team | Default posture | What changes | Process |
|---|---|---|---|
| 2–5 We are here | Buy heavily, borrow freely, build only the product | Engineer time is the scarcest resource; vendor bills are small | Two-person review of dependencies; guardrails in section 08 |
| 5–15 | Same, with first cost reviews | Seat and usage pricing starts to bite; first enterprise customers send security questionnaires | An approved-dependency list; one person owns dependency hygiene; first SOC 2 work |
| 15–50 | Selectively bring in-house what is core or very expensive | You can staff a platform owner; vendor bills can exceed an engineer’s cost | Written decision records for build-buy calls; SBOMs generated in CI; licence scanning |
| 50–200 | Platform team; contribute upstream; fork when needed | Internal tools become products; you depend on open-source projects enough to fund or help maintain them | An internal registry or proxy; security team reviews new dependencies; vendor-management process |
| 200+ | Open-source programme office; strategic in-housing | Scale makes custom infrastructure economic; your own open-source releases become a hiring and reputation tool | Formal OSPO; policies for contribution and release; continuous supply-chain monitoring |
The cost curve crosses.
Vendors are cheap at small scale and can become the largest line after payroll. When a bill reaches the fully loaded cost of the engineers it would take to build and run a replacement, and the component is core or strategic, a build becomes worth costing. Count maintenance, on-call and migration, not just the initial build.
Capability arrives.
A team with a dedicated platform or security engineer can safely run what a two-person team cannot: self-hosted databases, internal auth gateways, forks of upstream projects.
Obligations arrive.
Enterprise customers, auditors and regulators ask for SBOMs, licence reports and vulnerability-handling processes (section 10). That pushes toward fewer, better-known dependencies and vendors with audit reports.
Leverage arrives.
Larger teams can negotiate vendor contracts, sponsor maintainers, contribute fixes upstream instead of waiting for them, and influence the projects they rely on.
The cost of a wrong choice rises.
Migrating a component at 200 engineers is a quarter-long project. Lock-in and licensing deserve more scrutiny the bigger you get.
| Revisit a buy when… | Revisit a borrow when… |
|---|---|
| The bill is growing faster than revenue | The project goes quiet or loses its main maintainer |
| You keep working around missing features | It relicenses to source-available or copyleft |
| The vendor changes terms, pricing or ownership | A serious vulnerability takes weeks to patch |
| A customer or regulator requires something they cannot provide | You maintain a pile of local patches against it |
| It has become central to what makes you different | You need behaviour it will never support |
Who else will ask what is inside our software?
| Source of pressure | What it asks for |
|---|---|
| Enterprise customers | Security questionnaires, a SOC 2 Type II report, a software bill of materials (SBOM), named sub-processors, a vulnerability-disclosure policy. |
| US government buyers | Since Executive Order 14028 (2021), federal software suppliers attest to secure development practices and provide SBOMs on request. |
| EU Cyber Resilience Act | For products with digital elements sold in the EU: vulnerability and incident reporting obligations apply from 11 September 2026, and the full security and documentation requirements from 11 December 2027. Manufacturers are responsible for the open-source components they ship. |
| Investors and acquirers | Technical due diligence includes a licence and vulnerability scan of the codebase. Copyleft code in a closed product, unlicensed code, or a long list of critical vulnerabilities can delay or reprice a round or a sale. |
| Data-protection law | GDPR and similar laws make you responsible for where vendors store and process personal data. Each vendor is a sub-processor to document. |
The cheap way to be ready
Generate an SBOM in CI from day one (Syft, cyclonedx-npm or GitHub’s dependency-graph export), keep licences to the permissive list, and keep a one-page register of vendors, what data each holds, and where.
What would we choose for the usual parts?
| Component | Two-person team today | At 50+ engineers |
|---|---|---|
| Authentication | Buy: Clerk, Auth0 or Supabase Auth | Often still buy; some move to self-hosted Keycloak or Ory with a security team |
| Payments | Buy: Stripe | Buy. Almost nobody should hold card data |
| Database | Managed Postgres (Supabase, Neon, RDS) | Managed or self-run Postgres with a dedicated owner |
| Hosting | Buy: Vercel, Render, Fly.io, Railway | Cloud provider directly, with infrastructure as code |
| Email delivery | Buy: Postmark, Resend, SES | Buy |
| File storage | Buy: S3 or S3-compatible | Buy |
| Web framework | Borrow: Next.js, Django, Rails, FastAPI | Borrow; contribute fixes upstream |
| UI components | Borrow: shadcn/ui, Radix, MUI | Borrow, wrapped in an internal design system |
| Error tracking and logs | Buy free tier: Sentry | Buy, or self-host when the bill justifies it |
| Search | Postgres full-text search first | Borrow (OpenSearch, Meilisearch) or buy (Algolia) |
| LLM inference | Buy an API | Mix: APIs plus self-hosted open-weight models where cost or data control demands |
| Core business logic | Build | Build, with a dedicated team |
Named products are common examples, not endorsements. Check current pricing and terms before choosing.
What do we check before we commit?
Tick items as you go. Ticks are saved in this browser only, so each person keeps their own.
What do these words mean?
| Term | Meaning |
|---|---|
| Dependency | Any external code your software needs to run or build. |
| Transitive dependency | A dependency of a dependency. Most of your installed code is transitive. |
| Lockfile | A file recording the exact version of every installed package, so every build is identical. |
| Supply-chain attack | Compromising software by attacking something it depends on, rather than the software itself. |
| Typosquatting | Publishing a malicious package under a name one typo away from a popular one. |
| Slopsquatting | Publishing a malicious package under a name AI tools tend to hallucinate. |
| CVE | A public identifier for a known vulnerability, such as CVE-2021-44228 (Log4Shell). |
| SBOM | Software bill of materials: a machine-readable list of every component in your software. |
| Copyleft | A licence that requires derived work to be released under the same licence. |
| Source-available | Code you can read but cannot freely use commercially. Not open source. |
| Bus factor | How many people would have to leave before nobody understands a system. |
| OSPO | Open-source programme office: the team that sets policy for using and releasing open source. |
| SOC 2 Type II | An independent audit of a vendor’s security controls over a period of time. |
Where does this come from?