No SOC 2, No Audit Budget: How I Passed a Brokerage's Security Review

A practical, evidence-driven approach to security for small teams. Part 1 of a series.


I’ve run this host for seven years. It carries my older apps and the infrastructure they share, and I’m the only developer. Security never had its own budget; features always won. When this review started, I hadn’t touched the host OS or the secrets in about two years.

In August 2026 I applied to a retail brokerage as a third-party partner, to build an OAuth integration with their platform. They require a SOC 2 report or security information before approving an integration.

A small company’s first SOC 2 Type II runs $20k–$60k all-in, plus a 3 to 12 month observation window. The product had no users yet, so I ran my own review instead: fixes ranked by risk, dated evidence of every change, and a written summary for the brokerage. It took about three weeks full time in September 2026. The brokerage approved the integration and lists me as a trusted third-party partner.

This post covers what I found, what I fixed first, and the results.


The environment

It’s a typical small production setup:

  • A mobile app backend (API + realtime connections) running in containers on a single cloud VM
  • A reverse proxy handling TLS for several domains, including marketing sites
  • A relational database, a legacy document database mid-migration, and a newsletter service
  • Deploys built on a laptop and shipped to the server

Nothing exotic, and that’s the point. Most incidents at small companies don’t come from clever zero-days. They come from ordinary infrastructure that drifted while features shipped. That’s what happened here.

Large companies get this wrong too. Until November 2021, Mailgun’s API returned customers’ SMTP passwords in plain text; it stopped when it moved to hashing them. In September 2026, a brokerage where I hold an account told me an attacker had reached the vendor that runs its order management. Its own network stayed secure, but my personal information may have been exposed. Your security includes every vendor that holds your data, so give them as little as you can, and make every key you hand out scoped and easy to rotate.

The threat model

Before scanning anything, I wrote down what I was protecting against:

  1. An attacker on the internet reaching the system through its public web ports
  2. What a single application bug would expose. If one endpoint is compromised, how far does it go?
  3. The attack surface of the internet-facing proxy and the host underneath it

Root on the host is game over, so I ranked every fix by how much it cut the odds or the damage of that.

How I approached the review

The review covered six layers, each checked against established baselines (CIS benchmarks and OWASP guidance):

  • Network exposure, verified from outside the cloud firewall
  • Transport security: TLS protocols, cipher suites, certificates, security headers
  • Container images: known vulnerabilities and embedded credentials
  • Host and container runtime: OS patch level, container engine, SSH, privileges, isolation
  • Availability controls: certificate lifecycle, recovery paths
  • Application dependencies: known vulnerabilities in third-party libraries

Every scan produced a dated evidence folder. That folder is what turns “we take security seriously” into something a partner’s security team can actually evaluate.


What I found

1. Credentials baked into container images (CRITICAL)

The most serious finding, and the one I now look for first in every review.

More than a dozen production credentials were compiled directly into a container image: cloud access keys, code-signing and push-notification private keys, payment-provider keys, and the application’s session-signing secret. Anyone who obtained a copy of that image, through a registry, a backup, or a laptop, would have had the keys to nearly everything.

I set it up this way on purpose. A mentor showed me the pattern, and it holds if you assume nobody gets on the machine; with root, it’s game over anyway. As the only developer, self-hosted and backed up, I figured a secret could only leak if I handed out the code or the image. The review assumed an image or a container could leak, and under that assumption the pattern fails. Now I scan the built image for secrets, not just the source code.

2. Cloud credentials in environment variables (CRITICAL)

The reverse proxy needed DNS-provider credentials to issue certificates. Those keys sat in plain environment variables, readable by anything that could inspect the container.

3. A host that looked patched but wasn’t (HIGH)

The server’s package manager reported no pending security updates. That was wrong.

I had pinned the OS to its original release, which some Linux distributions support for predictable updates. The update checker only looked inside that snapshot, so it had nothing new to offer. In reality, the host was years behind: an outdated kernel, an old TLS library, and a container runtime with a publicly known container-escape vulnerability. Combined with containers running as root, a single compromised application could have broken out onto the host.

4. Certificates that had quietly expired (HIGH, availability)

Two public marketing domains had been serving expired TLS certificates for months. One was on a top-level domain that browsers force onto HTTPS, so for many visitors the site simply didn’t load.

Two small misconfigurations combined to cause it: the routing rule for those domains never requested a certificate over HTTPS, and a stale multi-domain certificate containing a long-dead domain kept failing renewal, which blocked the live domains stored with it. The failures were logged for months and nothing alerted me.

5. Administrative access open to the entire internet (HIGH)

SSH was listening on a non-standard port and open to every IP address. A non-standard port reduces log noise; it does not provide security. I left it open for convenience.

6. Weak TLS configuration (MEDIUM)

The proxy still offered legacy cipher suites, leaving the API vulnerable to the ROBOT attack and potentially exposed to Lucky13. The API also lacked HSTS and advertised its server software in every response.


What I fixed first, and why

I ordered the work by risk reduced per hour of effort, with a rollback plan and a verification step for every change.

Secrets out of images. I rotated every credential that had been built into the image and moved them into the Docker orchestrator’s secrets store, mounted at runtime. Each service got its own least-privilege cloud identity: the media service can touch one storage bucket, the email identity can only send from one domain, and certificate automation can only edit two DNS zones. If one of them leaks, the damage is contained and easy to trace. The release pipeline now scans every image, refuses to ship one that contains a secret, and verifies a checksum on arrival.

Admin access closed by default, with a break-glass path. The SSH port is closed to the entire internet. A script opens it for my current IP only and closes it when the session ends, using a cloud identity that can modify that one rule and nothing else. Separately, a break-glass shell through the cloud provider’s management API, independent of SSH, means a misconfiguration can’t lock me out of production.

Host brought current, safely. With break-glass access confirmed, I took snapshots and backups, made the container engine wait for its data volume at boot, and validated the SSH configuration before rebooting. Then I upgraded the OS release: a new kernel, a patched container runtime, a much newer container engine, and current TLS and SSH packages. The host now tracks the latest release, so this can’t silently recur.

Certificates restored. I added an HTTPS route with automatic certificate issuance, removed the stale certificate entry that blocked renewal, and confirmed fresh certificates from outside.

TLS hardened. Only TLS 1.2+ with forward-secret, authenticated-encryption cipher suites; requests without a proper hostname are rejected; HSTS enabled; server banner removed so no information leaks.

Images patched and legacy database removed. The API image was rebuilt with patched OS packages. Once the replacement database had run with zero data discrepancies, the old database came out entirely. As Mr. Miyagi said, the best way to avoid a punch is not to be there. The cheapest system to secure is the one you’ve deleted.


Results

Scans from the baseline review compared with scans after the first phase of fixes:

Area Before After
Internet-facing ports 3 (web + SSH open to all) 2 (web only; SSH opened per-IP on demand)
Recovery access independent of SSH None Break-glass via cloud management API
Production credentials embedded in images 13+ 0
Cloud credentials in proxy environment Present Removed (secrets store, least privilege)
Container-escape vulnerability in host runtime Vulnerable Patched
Host OS / container engine Years behind, pinned release Current, tracking latest release
API image: HIGH/CRITICAL OS vulnerabilities 9 0
Public sites serving expired certificates 2 0
ROBOT vulnerability Vulnerable Not vulnerable
Lucky13 (CBC ciphers) Potentially vulnerable Not vulnerable
Requests without SNI Served default certificate Rejected
HSTS on API Missing 1 year
Server software banner Exposed Hidden
Databases reachable from the internet 0 0 (re-verified externally)
Data stores in production 2 1

Every “after” value was verified with the same check that produced the “before” value, and every change has a dated evidence trail.


Seven lessons I’d pass on to any small team

1. Scan what you ship, not just what you write. Source-code secret scanning misses credentials compiled in at build time. Scan the built artifact and fail the build when a secret appears.

2. “No updates available” can be the most dangerous result in your report. Pinned OS releases, stale mirrors, and misconfigured repositories all produce a clean result on an unpatched machine. Verify the versions of the components that matter (kernel, container runtime, TLS library) against what’s actually current.

3. A log line is not an alert. Certificate renewal failures were logged for months while two sites went dark. Anything with an expiry date (certificates, domains, developer memberships, API keys) needs external monitoring and a calendar reminder.

4. Your security scanners can leak your secrets. A tool that finds an embedded key will often print it, and that report lands in logs, tickets, and chat threads. Report counts and locations, not values, and treat scan output as sensitive. My secret scanner works this way: it runs in your browser, so your files never leave your machine, and it masks every value it finds unless you choose to reveal it. For output from other tools, the log redactor masks secrets in logs before you share them.

5. Internal scans lie about exposure. A port scan run from the server bypasses the cloud firewall and reports ports nobody on the internet can reach; a scan from a filtering network can hide ports that are open. Verify from a clean external vantage point.

6. Build the way back in before you change the way in. Before touching SSH, firewalls, or the operating system, set up an independent recovery path and test it. It turns a potential all-night outage into a two-minute fix.

7. Verify behavior, not configuration. A typo in a routing label can silently detach a security middleware; a route can look correct and never request a certificate. Every change in this project was confirmed by testing the live endpoint.


The road ahead

Phase 1 closed the most direct paths to a compromise and brought the host current. The rest of the series covers what was left:

  • Part 2: upgrading the reverse proxy and removing its access to the Docker socket
  • Part 3: database roles, and the secrets still in environment blocks
  • Part 4: memory, and a cache that was broken
  • Part 5: monitoring and backups
  • Part 6: leak checks and blocking at the edge
  • Part 7: the closing scorecard