Skip to content
Stribog

Compliance

All writing

How to Get SOC 2 Compliant: The Engineering Sequence

How to get SOC 2 compliant on a self-hosted platform: scope, commitments, control gaps, a type 2 period, then a CPA's attestation, not a certificate.

By 16 min read

Most answers to this question come from compliance-automation vendors, and the answer is a purchase: connect the platform, adopt its controls, be ready in weeks. That skips what decides whether the report is worth anything: the order in which a team makes decisions about its own system.

This is the order of operations from zero to a signed report for a platform you run yourself, with the artefact each step must leave behind. The per-criterion evidence on Kubernetes is covered in SOC 2 on self-hosted Kubernetes: own the evidence; this article is about the sequence around it, and about where tooling choices quietly move your evidence out of your hands.

SOC 2 Is an Opinion You Earn, Not a Status You Buy

"SOC 2 compliant" and "SOC 2 certified" are procurement's words, not the deliverable. As the Journal of Accountancy, the AICPA's own publication, puts it, "SOC 2 examinations are performed by licensed, independent CPAs under AICPA Attestation Standards." The output is management's system description plus a CPA's opinion, restricted to specified parties who understand the system.

Now numbering in the dozens, these tool vendors may promise compliance (a term never used in SOC 2 examinations) in mere weeks — or even just hours — and use slogans emphasizing speed and low anxiety or stress.
Journal of Accountancy, February 2026: https://www.journalofaccountancy.com/issues/2026/feb/promises-of-fast-and-easy-threaten-soc-credibility/

If there is no compliant state to switch on, there is nothing to buy: there is a sequence of decisions about scope and controls, a period in which those controls are observed to work, and an independent examination. The difference between certification and attestation is argued in full in ISO 27001 vs SOC 2: certificate or auditor's opinion, and what a trust-page logo does and does not prove is in SOC 2 badge: what the logo proves.

One framing caveat before the steps. The AICPA does not prescribe this six-step order. It is an engineering recommendation that follows from dependencies inside the AICPA's own documents: the criteria define objectives in terms of commitments, so commitments must exist before controls are chosen, and a type 2 opinion covers operating effectiveness across a period, so controls must run before the period opens.

Each step leaves an artefact the next one needs. Buying a platform first pushes the boundary and commitments into rework; keeping evidence in your own store lets any tool and any auditor read it.

Step 1: Choose the Categories and the Report Type

The trust services criteria cover five categories: security, availability, processing integrity, confidentiality and privacy. In the criteria's own words (paragraph .10), "The common criteria are suitable for evaluating the effectiveness of controls to achieve an entity's system objectives related to security; no additional control activity criteria are needed." When security is included, the complete set for each of the other four is the common criteria plus that category's additional criteria (TSP 100, 2022 points of focus, paragraph .14). The uncommon examination that does not address security at all adds a third element: the control activity criteria relevant to those aspects of the common criteria that may affect the category being reported (paragraph .15). The criteria's own example is an availability-only examination, in which logical and physical access, systems operations and change management controls are still evaluated for their effect on availability.

So the decision rule is commitments, not ambition. Add availability when an SLA promises uptime, confidentiality when you have promised to restrict customer data, privacy when you process personal information under a published notice. Each extra category is more controls to design, operate and evidence; one with no commitment behind it is cost without a buyer.

The report type is the second half of this decision. DC 200 sets out the subject matters: a type 1 covers "(a) the description and (b) the suitability of the design of the controls"; a type 2 adds "(c) the operating effectiveness of controls" over a period. A type 1 says nothing about whether controls worked. That makes category scope the most expensive decision here: every category adds controls that must produce evidence across a type 2 period. The SOC 2 guide is precise about two edge cases. A control whose triggering circumstance never occurred during the period, such as onboarding credentials when nobody joined, need not modify the opinion, provided the auditor corroborates management's statement and describes those procedures in the test results (AAG-SOP 3.175). Periodic controls are harder. An annual or semiannual control may have last operated before a short period, and management has to judge whether it still matters to the commitments (AAG-SOP 3.176–3.177). When it is important enough, missing current-period evidence can block an unmodified opinion (AAG-SOP 3.178). Examples: most CC4.1 evaluations, or access-risk activities such as vulnerability scanning and reviewing automated-process credentials, running before the period. The auditor may propose extending the period, or weigh the gap in the opinion (AAG-SOP 3.179); for other periodic controls, current-period procedures can suffice (AAG-SOP 3.180). The conservative choice, not an AICPA rule: schedule such activities inside the window. The artefact: a written category decision, the commitment behind each category, and the report type.

Step 2: Draw the Boundary Before Anyone Buys a Tool

Under DC 200, service organisation management, not the auditor, is responsible for "developing and presenting" the system description in the report. On a self-hosted platform it is large, because no cloud provider below you covers the layers you run. The boundary names the infrastructure, software, people, procedures and data that deliver the service: clusters, databases, identity provider, CI runners, backups, on-call rota.

Then decide how to treat each subservice organisation, such as a colocation provider or an external DNS service. DC 200's implementation guidance gives two methods. Inclusive: its relevant infrastructure, software, people, procedures and data join your described system. Carve-out: "When using the carve-out method, the description would identify the broad category of CSOCs or the types of individual controls that the subservice organization is assumed to have implemented": complementary subservice organisation controls you rely on but do not operate. The description also states the subservice organisation's responsibility for those CSOCs. Carving out the colo means naming what you assume it does, such as restricting cage access.

The two methods differ in more than wording. Under the inclusive method, the portions of the system attributable to the subservice organisation "would be separately identified in the description," controls there are "subject to the service auditor's examination procedures," and its components are included in the scope of the examination. Under the carve-out method its components are excluded from the description and from the examination, but not from your obligations: regardless of method, the description would disclose "controls that the service organization uses to monitor the services provided by the subservice organization." DC 200's examples include inspecting type 2 SOC 2 reports on the subservice organisation's system, site visits, reviewing and reconciling output reports, and evaluating performance against agreed service levels. For a carved-out colo, pick one or more, then operate and evidence them like any other control. Carve-out moves work off the examination, not off your controls list.

Tooling most often pre-empts this step. A platform's template ships a default system and controls, and once collection is wired to it, redrawing the boundary means redoing the wiring. Draw it first, as a manifest in your repository; the full DC 200 treatment, including DC 3 components and DC 7 subservice organisations, is in AICPA SOC 2 guide: the system description sets the scope.

Step 3: Write the Commitments the Controls Exist to Meet

Most guides skip this step; the criteria put it at the centre. TSP 100 (2022 points of focus) paragraph .19: "the objectives in a SOC 2 engagement relate to meeting its service commitments to customers and system requirements." Such commitments "generally are included in written contracts, service-level agreements, or public statements (for example, a privacy notice)." System requirements are "how the system should function to achieve the entity's commitments to customers, relevant laws and regulations, or guidelines of industry groups, such as trade or business associations, or other business objectives."

The engineering consequence is that the risk assessment has an input. CC3.1 requires the entity to specify "objectives with sufficient clarity to enable the identification and assessment of risks relating to objectives," and CC3.2 to identify risks to those objectives and analyse them "as a basis for determining how the risks should be managed." Without a commitments register, the risk assessment is generic threats and generic controls. With one, every control points at the promise it protects.

Build it by reading every contract template, SLA, the security page and the privacy notice, recording each promise with its source, then the laws and industry guidelines the system must meet. Below is a house schema for that artefact, in YAML so it lives in git beside the code. It is an engineering choice, not an AICPA format, and the company is fictional.

yaml
# soc2-scope.yaml: house schema, not an AICPA format.
schema_version: 1
service_organization: Example Platform Ltd
system: Managed data platform (example.com)

report:
  type: type2
  categories: [security]   # add availability only if an SLA commits to uptime
  criteria_version: "2017 TSC, revised points of focus (2022)"   # agree with the service auditor

boundary:
  in_scope:
    - {id: k8s-prod, kind: infrastructure, what: "Production Kubernetes clusters"}
    - {id: pg-prod, kind: data, what: "Customer databases and their backups"}
    - {id: idp, kind: software, what: "Self-hosted identity provider"}
    - {id: oncall, kind: people, what: "Platform on-call rota and runbooks"}
  subservice_organizations:
    - name: Example Colocation GmbH
      service: "Rack space, power, physical access"
      method: carve-out
      csocs_assumed:
        - "Physical access to the cage is restricted to authorised personnel"
        - "Power and environmental systems are monitored and maintained"

commitments:
  - id: COM-01
    statement: "Production access is limited to authorised staff"
    source: "Master services agreement, security schedule"
    criteria: [CC6.1]
  - id: COM-02
    statement: "Changes to production are reviewed before release"
    source: "Public security page"
    criteria: [CC8.1]

controls:
  - id: PLAT-AC-01
    what: "Production access via SSO with MFA; access list reviewed"
    criteria: [CC6.1]
    commitments: [COM-01]
    frequency: quarterly
  - id: PLAT-CM-01
    what: "Every production change merged through a reviewed pull request"
    criteria: [CC8.1]
    commitments: [COM-02]
    frequency: weekly
  - id: PLAT-VM-01
    what: "Colocation provider's own assurance report obtained and reviewed"
    criteria: [CC9.2]
    commitments: [COM-01]
    frequency: quarterly
soc2-scope.yaml: categories, boundary, commitments and the controls list the period gate reads

Step 4: Close Control Gaps on Infrastructure You Operate

Run the gap pass against the common criteria, not a vendor's control library. Under TSP 100 (2017 criteria, 2022 points of focus), paragraph .10 lists five COSO-aligned series: control environment (CC1), information and communication (CC2), risk assessment (CC3), monitoring of controls (CC4) and control activities (CC5). Paragraph .08 adds supplemental criteria to COSO principle 12, which the criteria number CC6 logical and physical access, CC7 system operations, CC8 change management and CC9 risk mitigation.

Self-hosting changes who answers: a team running its own clusters, identity provider and backups has no provider below those layers to carve out, and answers CC6 to CC8 for them itself. CC9.2 still applies to whoever you do depend on: "The entity assesses and manages risks associated with vendors and business partners," which is why the colocation provider's report appears as a control above.

The output is not a policy binder. It is the controls: list, with every control running and writing dated evidence. The per-criterion mechanics for access, operations and change on Kubernetes are in the self-hosted Kubernetes evidence guide; for the pattern of a scheduled job that writes evidence on a timer, see the CIS Kubernetes Benchmark as evidence, and for audit logs landing in a system you run, Kubernetes audit logs into Wazuh.

Step 5: Open the Type 2 Period Only When Controls Already Run

A type 2 opinion covers operating effectiveness across the period. A control that starts mid-period has a gap before it started, and the auditor's sample can land there. Management selects the period (AAG-SOP 1.22, 1.39); the auditor judges whether evidence for it is likely (AAG-SOP 2.54). The guide gives examples, not a minimum: under two months, the auditor "may conclude" evidence is unlikely; nine months may suffice even if annual controls do not operate. A house gate decides the start date.

That gate is a house convention, not an AICPA requirement. It refuses a proposed period start unless every control has dated evidence covering a look-back window at its declared frequency, and every file matches its directory's MANIFEST.sha256. The look-back is a team and auditor decision, so the flag has no default. The layout, <evidence-root>/<control-id>/<YYYY-MM-DD>/, is also a suggestion.

python
#!/usr/bin/env python3
"""Refuse a SOC 2 type 2 period start until every control has evidence.

House convention, not an AICPA rule. Read-only. Needs: pip install pyyaml
"""
import argparse
import hashlib
import sys
from datetime import date, timedelta
from pathlib import Path

import yaml

FREQUENCY_DAYS = {"daily": 1, "weekly": 7, "monthly": 31, "quarterly": 92}
MANIFEST = "MANIFEST.sha256"


def sha256_of(path):
    digest = hashlib.sha256()
    with path.open("rb") as handle:
        for chunk in iter(lambda: handle.read(1 << 20), b""):
            digest.update(chunk)
    return digest.hexdigest()


def manifest_problems(day_dir):
    manifest = day_dir / MANIFEST
    if not manifest.is_file():
        return [f"{day_dir.name}: no {MANIFEST}"]
    expected = {}
    for line in manifest.read_text(encoding="utf-8").splitlines():
        if line.strip():
            digest, _, name = line.strip().partition(" ")
            expected[name.lstrip(" *").removeprefix("./")] = digest.lower()
    actual = {
        p.relative_to(day_dir).as_posix()
        for p in day_dir.rglob("*")
        if p.is_file() and p.name != MANIFEST
    }
    if not actual:
        return [f"{day_dir.name}: no evidence files"]
    problems = [f"{day_dir.name}: unlisted {n}" for n in sorted(actual - expected.keys())]
    for name, digest in sorted(expected.items()):
        if name not in actual:
            problems.append(f"{day_dir.name}: missing {name}")
        elif sha256_of(day_dir / name) != digest:
            problems.append(f"{day_dir.name}: hash mismatch {name}")
    return problems


def first_gap(days, window_start, period_start, every):
    covered = window_start
    for day in days:
        if day > covered:
            return covered
        covered = max(covered, day + every)
    return None if covered >= period_start else covered


def check(control, root, period_start, lookback):
    freq = control.get("frequency")
    if freq not in FREQUENCY_DAYS:
        return False, f"unknown frequency {freq!r}"
    every = timedelta(days=FREQUENCY_DAYS[freq])
    window_start = period_start - timedelta(days=lookback)
    good, problems = [], []
    control_dir = root / str(control["id"])
    children = sorted(control_dir.iterdir()) if control_dir.is_dir() else []
    for child in children:
        try:
            day = date.fromisoformat(child.name)
        except ValueError:
            continue
        if child.is_dir() and window_start - every < day <= period_start:
            found = manifest_problems(child)
            problems.extend(found)
            if not found:
                good.append(day)
    if problems:
        return False, problems[0] + (f" (+{len(problems) - 1} more)" if len(problems) > 1 else "")
    gap = first_gap(sorted(good), window_start, period_start, every)
    if gap is not None:
        return False, f"no {freq} evidence covering {gap}"
    return True, f"evidence sets: {len(good)}"


def main():
    parser = argparse.ArgumentParser(description=__doc__.splitlines()[0])
    parser.add_argument("--scope", type=Path, default=Path("soc2-scope.yaml"))
    parser.add_argument("--evidence-root", type=Path, required=True)
    parser.add_argument("--period-start", type=date.fromisoformat, required=True)
    parser.add_argument("--lookback-days", type=int, required=True)
    args = parser.parse_args()
    if args.lookback_days < 1:
        parser.error("--lookback-days must be at least 1")

    scope = yaml.safe_load(args.scope.read_text(encoding="utf-8")) or {}
    controls = scope.get("controls") or []
    if not controls:
        parser.error(f"{args.scope}: no controls listed")

    failed = 0
    print(f"{'CONTROL':<14} {'FREQUENCY':<10} {'RESULT':<6} DETAIL")
    for control in controls:
        ok, detail = check(control, args.evidence_root, args.period_start, args.lookback_days)
        failed += not ok
        verdict = "PASS" if ok else "FAIL"
        print(f"{control['id']:<14} {str(control.get('frequency')):<10} {verdict:<6} {detail}")
    print(f"{len(controls) - failed}/{len(controls)} controls ready for {args.period_start}")
    return 1 if failed else 0


if __name__ == "__main__":
    sys.exit(main())
soc2_period_gate.py: read-only pre-period check. Needs Python 3.9+ and PyYAML (pip install pyyaml).

Run it with an explicit window, for example python3 soc2_period_gate.py --evidence-root ./evidence --period-start 2027-03-01 --lookback-days 30, where 30 is a value the team has chosen, not a SOC 2 figure. It exits non-zero if any control fails. It proves only that evidence exists at the declared frequency and has not changed since hashing. It cannot show a control was effective, and anyone who can write the directory can rewrite its manifest, so keep the store append-only or the manifests in signed commits.

Three conventions in the script are choices, stated so they do not look arbitrary. Cadences are fixed day counts: daily is 1, weekly 7, monthly 31 and quarterly 92, not calendar months or quarters, so each evidence set covers that many days from its date. A dated directory counts as coverage only when it holds at least one evidence file whose hash matches its manifest; a directory with only an empty MANIFEST.sha256 fails as no evidence files, so a scaffolded tree cannot pass. Manifest lines are read in the format sha256sum writes, text mode (hex filename) or binary mode (hex *filename); generate them with sha256sum run inside the dated directory. Anything else fails closed: a missing manifest, an unlisted file, a listed file that is absent, or a hash mismatch. CC4.1, the criterion for "ongoing and/or separate evaluations to ascertain whether the components of internal control are present and functioning," is what the examiner tests during the period; this script is only a file check before it.

Step 6: Engage the CPA Firm, and Vet It

Book the firm early if you like; just do not let it, or a tool, draw your boundary or write your commitments. The February 2026 Journal of Accountancy feature gives a checklist for clients, in its own voice: vet the CPA firm's "size, capacity, and client references"; evaluate its "qualifications, experience, and peer review results"; ask "about the scope of the examination, the sampling procedures the CPA will use, and how the firm maintains its independence"; and ask of the offering, "Is it unrealistically fast, easy, or cheap?" It notes most of the new tool providers "are not CPA firms" and "cannot attest", some route clients to networks of accounting firms, and a rushed or overly automated report "may rely too heavily on inquiry".

The profession is watching the same risk. A May 2026 Journal of Accountancy article names, as a specific risk, SOC 2 engagements that "have identical reports, risk assessments, sample sizes, and testing procedures", and says peer review calls such an engagement "nonconforming". According to the same article, the AICPA issued a peer review reviewer alert to address these situations; it directs reviewers to look at a firm's use of external SOC platforms, the reasonableness of engagement timelines, and whether engagements are tailored to each client. A boundary and commitments register you wrote yourself is the cheapest defence against a templated engagement. Once the report exists, reading its exceptions and CUECs is what your customers will do with it.

Where Compliance Platforms Create Lock-In, and the Exit Ramp

The lock-in is not the subscription; it is where the evidence and control mappings live. When collectors write into a vendor's store and controls are named after its library, leaving means re-collecting and re-mapping, which a type 2 period in progress cannot easily survive.

The AICPA has looked at this arrangement from the auditor's side. In April 2026 its Professional Ethics Division staff told service auditors to "closely evaluate any terms that shift control, professional judgment, financial dependency, promotional efforts, or access to evidence away from the member and toward the tool provider", and listed tool-provider-driven deadlines that require completion in a fixed time frame, "without appropriate regard to the service auditor's professional judgment about scope, risk, staffing, and evidence needs", as an arrangement that may create a self-interest or undue-influence threat. That guidance addresses CPAs' own independence, not customers. The inference for a service organisation is still direct: if a tool provider between you and your auditor is an objectivity concern, the evidence belongs in a store you control and both can read.

Self-hostable open-source GRC tools can organise that work without owning it. Check licence and export path first:

  • CISO Assistant (intuitem). The top-level enterprise directory is under a commercial licence, automation/n8n/n8n-nodes-ca is MIT, and the rest is AGPLv3, so the repository is not uniformly licensed. It ships the SOC 2 2017 Trust Services Criteria, original and 2022 revision, as a framework library.
  • Probo. MIT-licensed and self-hostable on Docker Compose or Kubernetes, with every entity reachable through a web console, a CLI, an MCP API and a GraphQL API, plus custom framework import and export.
  • Comp AI Community Edition. AGPLv3 and self-hosted. The managed Comp AI Cloud is proprietary and built on a separate codebase, so the two are not the same product with a hosting toggle.

None is an auditor or produces an attestation. Treat each as a view over evidence, not the system of record; that is the Step 5 store, in git or an object store you operate. Swap the tool or the auditor, and the evidence stays put.

The Long Game: the Second Report Is the Real Test

The first report proves a team can assemble evidence once; the second proves the controls are how the platform runs. The next period starts as this one ends, so evidence must keep flowing through the handover. The criteria are under revision too: the proposed 2027 description-criteria guidance addresses cloud computing, AI and machine learning, APIs and modern software architectures.

What carries across all of that is the work in Steps 2 to 5: a boundary in git, a commitments register tied to real contracts, controls with IDs you own, and evidence in a store you run. Those survive a change of criteria, tool and auditor. A dashboard does not.

§FAQ/Common questions

Frequently asked

How do you get SOC 2 compliant?

There is no compliant status to switch on; the deliverable is a licensed CPA's examination report. A practical order is: choose trust services categories and report type, draw the system boundary, write down the commitments the controls exist to meet, close control gaps so every control produces evidence, open a type 2 period once they all run, then engage a CPA firm to examine it. The order is an engineering recommendation that follows from the AICPA criteria, not an AICPA-prescribed sequence.

Can a company be SOC 2 certified?

Not in the strict sense. SOC 2 examinations are performed by licensed, independent CPAs under AICPA attestation standards, and the output is a report with the CPA's opinion, restricted to specified parties. The Journal of Accountancy notes that even 'compliance' is a term never used in SOC 2 examinations.

How long should a SOC 2 type 2 period be?

Management selects the period, and the service auditor considers whether sufficient evidence is likely to be available for it (AAG-SOP 1.22, 2.54). The SOC 2 guide gives examples, not a mandatory minimum: under two months, the auditor may conclude evidence is unlikely to support an opinion; nine months may still work even if annual controls do not operate within it. As a house convention, open the period only once every control is already producing evidence, because a control that starts mid-period leaves a gap the auditor's sample can hit.

Do I need a compliance automation platform to get a SOC 2 report?

No. Most such tool providers are not CPA firms and cannot attest to controls. A GRC tool can organise evidence, and open-source options such as CISO Assistant, Probo and Comp AI Community Edition can be self-hosted, but none replaces the CPA. Keep the evidence in a store you own so changing tools or auditors does not mean re-collecting it.

Will the 2027 Trust Services Criteria affect a SOC 2 report started now?

Possibly, depending on timing and what is approved. The AICPA's proposed 2027 TSC are in comment until 15 January 2027 and, if approved, would apply to engagements beginning on or after 31 December 2027, with early adoption permitted. Agree the criteria version with your auditor, and map controls you own to criterion numbers so a renumbering changes only the mapping.

how to get soc 2 complianthow to get soc 2 compliancehow to get soc 2 certifiedsoc 2 readiness sequencesoc 2 observation period preparationsoc 2 compliance automation platform lock-in

Executive Briefing

Thirty minutes to clarify your infrastructure risk

Walk us through your vendor footprint and regulatory constraints. We will tell you honestly where sovereignty creates leverage — and where it does not. No pitch deck. No obligation.