# Rails Technical Due Diligence: The Checklist Acquirers Run Before They Buy

> Rails technical due diligence: the code, security, data and process checks acquirers run, what red flags kill deals, and how sellers prepare their Rails app.

- URL: https://railsdev.io/blog/rails-technical-due-diligence
- Published: 2026-11-11
- Author: Hendra Nicholas (Rails Full-Stack Developer & AI Engineer)

---

Rails technical due diligence is the engineering pass an acquiring team (or an investor) runs before signing: can this codebase be maintained, secured and extended by the team that will inherit it, and what will it cost? It is the moment where years of shortcuts get priced into the deal.

This checklist works from both sides — what acquirers examine, and how a seller should prepare six to eight weeks before a process.

## The five pillars

### 1. Codebase health

- Rails and Ruby versions within support windows (Rails 8.x; Ruby 3.4/4.0). Older stacks are not fatal, just costed.
- Test suite exists, runs in CI, and covers the revenue paths (auth, billing, provisioning).
- N+1s and missing indexes are found and fixed in hot paths — or quantified.
- No abandoned "convenience" gems pinning the app to insecure versions.
- Clear layering: thin controllers, real models/services, no 5,000-line service objects.

### 2. Security

- [`brakeman`](https://brakemanscanner.org/) and [`bundler-audit`](https://github.com/rubysec/bundler-audit) output is clean or every exception is justified in writing.
- AuthN/AuthZ consistent across the codebase; no "admin flag checked in some controllers".
- Secrets in credentials or the environment — none in git history (rotate if found).
- Dependency CVEs triaged; the November 2026 Rails advisories patched (see my [Rails security update](/blog/rails-security-update)).
- Data protection: encryption at rest for PII/secret columns, uploads validated, logs scrubbed.

### 3. Data integrity and migration risk

- Foreign keys, unique indexes and check constraints where they matter.
- Unindexed foreign keys, missing composite indexes on hot joins — measured, not guessed.
- Migration history is sound; no destructive migrations looming in staging.
- Backups are automated, restores tested (an untested backup is a rumor).
- Data residency and retention documented if you handle EU/UK PII.

### 4. Delivery process

- CI: tests + linter + security scan on every PR, deploys are reversible in one command.
- Environments: staging mirrors production (or where it doesn't, it's understood why).
- Observability: error tracking, log search, uptime and latency monitoring — with named owners.
- On-call/incident process, even if weekly: escalation path, runbooks for the top five incidents.
- Deploy history without heroics: nobody needs the founder's laptop to ship.

### 5. People and knowledge

- Bus factor: are the critical subsystems (billing, the data pipeline) documented, or held by one head?
- Onboarding docs for a new Rails dev: README, setup script, architecture notes, glossary.
- License hygiene: every dependency is permissive or compliant (no surprise GPL contagion in proprietary code).
- If any part is AI-generated, is it understood by humans, reviewed, and tested?

## The red flags that actually move the price

1. **Unpatchable framework version** (e.g. Rails 5, EOL gems) without an upgrade budget.
2. **Secrets in the repo** or the history — usually forces remediation pre-close.
3. **Billing logic nobody fully understands** — the fear that stops SaaS deals.
4. **No usable test suite** — acquirers price unknown regression risk as founder-discount, or walk.
5. **Single-maintainer dependency risk** on a critical path (the only person who knows the billing pipeline).
6. **Data-loss history** or evidence of silent corruption with no fix.

Deals rarely die from "the code is old". They die from *unquantifiable* risk.

## How to prepare (six to eight weeks out)

- **Weeks 1–2**: run the checklist yourself; fix the criticals; rotate anything found.
- **Weeks 3–4**: install the missing rails (tests on money paths, CI hardening, deploy rehearsal).
- **Weeks 5–6**: write the one-page architecture brief: stack, data flows, deployment, monitoring, people. Buyers pay for legibility.
- **Weeks 7–8**: commission a pre-diligence audit if you lack senior in-house review — cheaper than explaining findings mid-negotiation.

That pre-diligence pass is exactly the [Rails consulting](/services/ruby-on-rails-consulting) I do: a ranked report in one to two weeks, with the remediation plan you present as part of the deal room. If that's where you're headed, [send me a short brief](/#contact) and I'll scope it to your timeline.

## What buyers will actually ask for

- Architecture overview + deployment diagram
- Dependency manifest and license report
- Test coverage summary + CI green history
- Security scan output and CVE triage log
- Incident history and post-mortems (or honestly: "none formalized yet")
- Data model ERD and residency/retention summary
- Access matrix for production systems

Preparing these in a single, honest data room signals competence — which reliably defuses the technical negotiation.

## Conclusion

Buyers don't expect a perfect codebase — they expect quantified risk and a credible remediation plan. Get your checklist run six to eight weeks before the process, and you negotiate from strength. If you want that pass done for you, [send me a short brief](/#contact).

## Frequently asked questions

### Who performs Rails technical due diligence?

The acquirer (their CTO/VP Eng or external consultants) for buy-side, or a pre-diligence auditor for sell-side. Both use the same checklist; sell-side preparation is what controls the narrative.

### How long does it take?

One to three weeks for a typical Rails SaaS, scaled by codebase size and documentation quality.

### What kills deals outright?

Unquantifiable risk: unpatched CVEs with no path, secret leaks, billing nobody can explain, no tests and no willingness to add them pre-close.

### Does an old Rails version kill the deal?

Not by itself. It becomes a negotiated item: an upgrade plan with cost and timeline usually saves the deal.

### Should we do sell-side due diligence before listing?

Yes — a short pre-diligence audit surfaces the findings on your schedule, where you can fix them, instead of under the buyer's clock.

### How does this differ from a code audit?

A code audit optimizes the codebase; due diligence optimizes the transaction. Same techniques, different output: a risk register and a remediation plan, not an engineering backlog.
