Compliance Gap Analysis Template
A template for mapping current security controls to compliance frameworks like SOC 2, ISO 27001, and PCI-DSS.
Overview
A Compliance Gap Analysis compares your current security controls against the requirements of a target framework, such as SOC 2, ISO 27001, PCI-DSS, or GDPR. This template captures the requirement, the control that satisfies it, the evidence you’ve got, any missing pieces, and a plan to close the gaps. It’s a standard input for audit readiness and certification roadmaps.
The output isn’t a checklist; it’s a working document that auditors, control owners, and engineering leads can act on. Each row answers three questions: does a control exist, can you prove it, and what’s left to fix. If you’re preparing for a first SOC 2 audit, pair this template with the access control review template for user-access requirements and the vendor risk assessment template for third-party controls; the SOC 2 compliance guide walks through the audit process end to end.
When to Use
- Preparing for a first-time audit or certification.
- Renewing a certification and identifying changes since the last audit.
- Merging companies or integrating new business units.
- After a major change in architecture, processes, or vendors.
- Building a security roadmap tied to compliance obligations.
Prerequisites
- The target framework and version, such as SOC 2 Trust Services Criteria 2017.
- An inventory of security policies, controls, and processes.
- Access to evidence repositories, ticket systems, and cloud consoles.
- A cross-functional team from security, engineering, legal, and HR.
How to Run the Analysis
Work through these five steps in order. Skipping the scoping or evidence steps is where most gap analyses fall apart.
1. Scope the assessment
Decide which framework version, systems, teams, and data flows are in scope. A startup pursuing SOC 2 Type II usually scopes to the production environment and the trust criteria that apply to its service commitments, rarely all five categories. Write the scope down in the Engagement Overview table and get sign-off before mapping a single control; scope creep later invalidates earlier rows.
2. Inventory existing controls
Collect what you already have: policies, runbooks, IAM configurations, CI/CD gates, vendor contracts, incident records. Don’t create anything new at this stage. The goal is an honest snapshot, so pull artifacts from their source of truth rather than asking teams to describe them from memory.
3. Map requirements to controls
For each framework requirement, record the control that addresses it, the evidence that proves it works, and a status. Use the Control Mapping table below. If one control covers several requirements (common for centralized logging or SSO), repeat the row per requirement so nothing gets lost in review.
4. Rate the gaps
Not every gap carries the same weight. Score each one on two axes: risk if exploited, and impact on the audit itself. A missing MFA policy on privileged accounts fails both axes; a missing review cadence for a low-risk vendor might fail neither. Feed these ratings into the Gap Summary table.
5. Build the remediation plan
Convert each gap into a task with an owner, a due date, a priority, and the evidence that will prove closure. Then treat it like engineering work: put it in the same backlog, review it in the same planning cadence. A gap analysis that doesn’t produce tickets produces shelfware.
Scoping Pitfalls to Avoid
Scope is where gap analyses fail quietly. Four patterns cause most of the damage:
- Scoping to the product instead of the trust boundary. If your support team touches production data, support tooling is in scope even if it isn’t customer-facing.
- Including everything “just in case”. Every system added to scope multiplies the control-mapping work. If a system can’t affect the confidentiality, integrity, or availability of the audited service, leave it out and record the rationale.
- Freezing scope too late. Teams discover mid-analysis that a logging pipeline or an acquired subsidiary should have been in scope; adding it halfway invalidates completed rows. Lock scope in the Engagement Overview before mapping starts.
- Forgetting the audit period. SOC 2 Type II covers a window (typically 3–12 months). Controls and evidence must exist for the whole period, so a control rolled out last week can’t be rated Met for a 6-month window.
Working with External Auditors
If you’re doing the analysis ahead of a formal audit, involve the auditor early but carefully. Share the scope and methodology, not the raw document: auditors appreciate knowing how you worked, and a polished deliverable invites fewer follow-up questions than a spreadsheet with forty caveats.
Ask your auditor two things before the analysis starts: which requirement IDs they see clients struggle with most, and what evidence formats they prefer. Some accept screenshots; others want system exports or live demos during fieldwork. Knowing this upfront shapes how you collect evidence in step 2 and saves a second pass later.
One warning: your gap analysis is a workpaper, not a deliverable you owe the auditor. Expect them to form their own opinion. If they find a gap your analysis marked Met, that’s a signal to tighten your evidence bar, not an argument to win.
Solution
The template below has five sections, ordered the way an auditor reads it: context first, then the mapping, then the rollup, the plan, and the evidence trail. Fill it in top to bottom; each section depends on the one before it. The sample values show a mid-sized SaaS company partway through SOC 2 Type II preparation; replace them with your own data rather than editing around them.
Template
1. Engagement Overview
| Field | Description | Value |
|---|---|---|
| Framework | Target compliance standard | SOC 2 Type II |
| Version | Specific version or criteria | Trust Services Criteria 2017 |
| Scope | Systems, teams, or locations covered | Production cloud environment |
| Assessment date | When the gap analysis was performed | 2026-06-27 |
| Owner | Person responsible for the analysis | Compliance manager |
| Target audit date | Planned certification or audit | 2027-03-31 |
2. Control Mapping
| Requirement ID | Control Objective | Current Control | Evidence | Status | Gap | Owner | Due Date |
|---|---|---|---|---|---|---|---|
| CC6.1 | Logical access | RBAC policy enforced | RBAC policy doc, IAM config | Partial | MFA not enforced for all admin roles | IAM team | 2026-08-15 |
| CC6.6 | System monitoring | Logs centralized in SIEM | SIEM dashboard, retention policy | Met | None | Security team | N/A |
| CC7.1 | Vulnerability management | Quarterly scans | Scanner report | Partial | No SLA for remediation | Vuln management team | 2026-09-01 |
| A.12.3.1 | Information backup | Backup policy exists | Backup policy, restore test | Met | None | DevOps team | N/A |
| A.9.2.3 | Access rights | Access review process | Quarterly access reviews | Partial | Reviews not documented | Engineering managers | 2026-07-30 |
3. Gap Summary
| Category | Total | Met | Partial | Not Met | Risk |
|---|---|---|---|---|---|
| Access control | 12 | 7 | 4 | 1 | High |
| Monitoring | 8 | 6 | 2 | 0 | Medium |
| Change management | 6 | 3 | 2 | 1 | High |
| Vendor management | 5 | 2 | 2 | 1 | Medium |
| Incident response | 7 | 5 | 1 | 1 | High |
| Total | 38 | 23 | 11 | 4 | High |
4. Remediation Plan
| Gap ID | Description | Action | Owner | Due Date | Priority | Evidence Needed |
|---|---|---|---|---|---|---|
| GAP-01 | MFA missing for admin roles | Enforce MFA on all privileged accounts | IAM team | 2026-08-15 | High | MFA enrollment report |
| GAP-02 | No vulnerability remediation SLA | Define and approve SLA by severity | Security team | 2026-09-01 | High | SLA document |
| GAP-03 | Access reviews not documented | Use quarterly access review template | Engineering managers | 2026-07-30 | Medium | Signed attestations |
| GAP-04 | No formal vendor assessment | Adopt vendor assessment template | Procurement | 2026-10-01 | Medium | Completed assessments |
5. Evidence Tracking
| Requirement ID | Evidence Location | Last Updated | Reviewer | Notes |
|---|---|---|---|---|
| CC6.1 | /policies/rbac-policy | 2026-06-01 | Security lead | Approved and published |
| CC6.6 | /siem/retention-config | 2026-05-15 | SOC analyst | 12-month retention confirmed |
| A.12.3.1 | /runbooks/backup-restore-test | 2026-06-20 | DevOps lead | Quarterly restore test passed |
Explanation
Gap analysis turns compliance from a vague checklist into a useful project. By mapping each requirement to a control, evidence, and status, you can prioritize work based on risk and audit timeline. The remediation plan becomes the roadmap that drives engineering, security, and legal tasks toward certification.
Two habits separate useful analyses from paperwork. First, validate evidence by opening it, not by reading its title: a “RBAC policy” that’s three years old and references a decommissioned system counts as Partial, not Met. Second, keep statuses honest: teams that mark everything Met to look prepared end up failing the external audit, which costs far more than the internal finding would have.
The five tables work as a system, not five independent artifacts. Control Mapping feeds Gap Summary, Gap Summary feeds the Remediation Plan, and the Remediation Plan generates the work that produces new Evidence Tracking rows. When someone asks “how ready are we,” the answer lives in the Gap Summary; when they ask “what are we doing about it,” it lives in the Remediation Plan. Keep them consistent: a remediation task with no matching gap row, or a gap with no task, is a broken link in your own audit trail.
Cost and Effort Expectations
Budget for the analysis itself, not just the remediation it surfaces. A first-time SOC 2 gap analysis for a 20–50 person engineering org typically consumes 60–100 hours of internal time across security, engineering, and ops, plus 10–20 hours from whoever runs it. External assessors charge $8k–$25k for the same scope depending on whether they deliver just the gap report or a managed remediation plan.
The remediation phase dwarfs those numbers. Teams consistently underestimate it because gaps look small on paper (“document the access review”) while hiding real work (deploy the review tool, backfill two quarters of attestations, get manager sign-off). When the remediation plan lands, sanity-check each item’s effort with its owner before committing to dates; an honest 3-month plan beats an optimistic 3-week plan that slips twice.
Choosing Status Values
Use three statuses, and define them tightly so different reviewers rate the same control the same way:
- Met: a documented control exists, evidence is current (within the audit period), and someone has verified it works as designed.
- Partial: a control exists but has a documented weakness: outdated evidence, incomplete coverage, or an informal process that isn’t written down.
- Not Met: no control exists, or the existing control doesn’t address the requirement at all.
Avoid a fourth “N/A” bucket unless the requirement genuinely doesn’t apply, and record why it doesn’t apply in the Gap column. Auditors ask about N/As first.
What Auditors Accept as Evidence
Evidence quality decides whether a Met rating survives the audit. Three properties matter:
- Dated. The artifact shows when it was produced. A policy without a publish date or a screenshot without a timestamp is weak; auditors assume the worst.
- Attributable. Someone specific owns or produced it: a named approver on a policy, a ticket ID on a change, a user ID on a log line. Anonymous evidence gets challenged.
- Reproducible. The auditor can regenerate or re-query it: a saved report beats a screenshot of a report, and a system export beats a spreadsheet someone typed up.
Prefer system-generated evidence (SIEM exports, IAM summaries, CI logs) over documents people write for the audit. Written-for-the-audit artifacts exist, but auditors weight them lower and sample them harder.
Prioritizing Remediation
Once gaps are rated, sequence the remediation plan on two axes:
| Priority | Criteria | Typical examples | Timeline |
|---|---|---|---|
| High | Fails a hard audit requirement OR high security risk | Missing MFA on privileged access, no incident response plan, unencrypted cardholder data | Before the audit window |
| Medium | Required but partial coverage exists | Undocumented access reviews, missing vendor assessments, stale policies | 1–3 months |
| Low | Nice-to-have hardening | Evidence automation, extra monitoring coverage | Post-audit backlog |
Two shortcuts make this sequencing easier. First, fix gaps that are prerequisites for others: a documented vulnerability-remediation SLA unlocks several scan-related rows at once. Second, batch gaps by owner: handing one team five related items gets better throughput than scattering them across the org.
Reporting the Results
The gap summary table is for operators; executives need a different cut. Produce a one-page rollup with:
- Total requirements mapped and the Met/Partial/Not Met split per category.
- The five highest-risk gaps and their remediation owners.
- The projected readiness date and what would delay it.
- A decision ask if one exists (budget for a GRC tool, headcount for evidence work, an outside assessor).
Circulate it before the deep-dive review. Stakeholders who see the summary first argue less about individual rows later.
Keeping the Analysis Alive
A gap analysis has a shelf life of about one quarter. Set a recurring review: re-validate Partial and Not Met rows, refresh evidence timestamps, and close rows where remediation shipped. Trigger an early re-run after any of these events: a cloud or provider migration, an acquisition, a framework version update (ISO 27001:2013 to 2022 restructured Annex A), or a security incident that revealed a control failure. Teams that treat the document as living audit infrastructure walk into renewals with most of the work already done; teams that shelve it start from zero every cycle.
Versioning the Document
Treat the gap analysis like code. Keep it in a versioned location (a wiki page with history, a Git repo, or a GRC tool with audit trails) and give each assessment cycle its own version tag (2026-Q2-soc2, not final-v3-really-final). Auditors occasionally ask to compare the current analysis against the previous one, and a clean version history answers that request in seconds.
Change discipline matters most on the remediation plan. When a gap closes, update the row with the closing date and a link to the closing evidence rather than deleting it; the closed-row history is itself evidence that your remediation process works. And when a control changes (a new IAM platform, a rewritten incident runbook), update the mapping row at the same time, not during the next quarterly refresh. Rows that lag behind reality are the ones auditors sample.
Framework Notes
The same template works across frameworks; what changes is where the requirements come from.
- SOC 2: requirements are the Trust Services Criteria (CC-series plus optional availability, processing integrity, confidentiality, and privacy criteria). Controls are mostly management-and-process controls; evidence leans on policies, tickets, and access reviews.
- ISO 27001: requirements are Annex A controls plus clauses 4–10. The audit is certificate-based, so your Statement of Applicability (SoA) doubles as the control mapping, so keep them consistent or auditors will flag the mismatch.
- PCI-DSS: prescriptive technical requirements (12 sections). Gaps are usually technical: segmentation, encryption, logging retention. The remediation plan often needs infrastructure work, not just documentation.
- GDPR: requirements are legal obligations rather than controls. Map them to processing records, DPIAs, consent flows, and data-subject-request procedures. Legal counsel should co-own the rating.
Variants
- SOC 2 readiness assessment: Focused on Trust Services Criteria with common controls and evidence.
- ISO 27001 gap analysis: Mapped to Annex A controls and risk treatment plans.
- PCI-DSS gap analysis: Centered on cardholder data environment, encryption, and access.
- GDPR compliance mapping: Tracks data subject rights, processing records, and consent.
- Multi-framework mapping: A unified matrix showing coverage across SOC 2, ISO 27001, and PCI-DSS.
What Works
- Use the official framework version to avoid outdated requirements.
- Involve control owners, not just the compliance team, in the assessment.
- Collect evidence during the analysis, not after.
- Rate gaps by risk and audit readiness, not just by volume.
- Track remediation like a project with owners, dates, and deliverables.
- Re-run the analysis quarterly or after major changes.
- Maintain a single source of truth for evidence locations.
Common Mistakes
- Treating compliance as a one-time project instead of a continuous program.
- Mapping controls to requirements without reviewing actual evidence.
- Assigning remediation to teams without capacity or authority.
- Using outdated framework versions.
- Over-documenting trivial controls while missing critical gaps.
- Not linking gap analysis to incident history or risk assessments.
See Also
- Access Control Review Template: quarterly user-access review process and register.
- Vendor Risk Assessment Template: evaluate third-party controls for vendor-related requirements.
- Security Audit Checklist Template: broader audit preparation checklist covering the same control domains.
Advanced Solutions
Automated evidence collection with AWS Config
Automate evidence gathering for SOC 2 and ISO 27001 using AWS Config rules:
#!/bin/bash
set -euo pipefail
# Export AWS Config compliance data for audit evidence
aws configservice select-aggregate-resource-config \
--configuration-aggregator-name "OrganizationConfigAggregator" \
--expression '
SELECT
resourceId,
resourceType,
configurationItemStatus,
configuration,
tags
WHERE
resourceType = "AWS::Config::ConfigRule"
AND configurationItemStatus = "OK"
' \
--limit 100 > config-compliance-evidence.json
# Generate MFA enforcement evidence for CC6.1
aws iam get-account-summary > iam-account-summary.json
aws iam list-virtual-mfa-devices > mfa-devices.json
# Check root account MFA status
ROOT_MFA=$(aws iam get-account-summary --query 'SummaryMap.AccountMFAEnabled' --output text)
echo "Root MFA enabled: $ROOT_MFA" >> mfa-evidence.txt
# Generate S3 bucket encryption evidence for CC6.7
aws s3api list-buckets --query 'Buckets[].Name' --output text | \
tr '\t' '\n' | \
while read bucket; do
ENC=$(aws s3api get-bucket-encryption --bucket "$bucket" --query 'ServerSideEncryptionConfiguration.Rules[0].ApplyServerSideEncryptionByDefault.SSEAlgorithm' --output text 2>/dev/null || echo "None")
echo "$bucket: $ENC" >> s3-encryption-evidence.txt
done
# Generate CloudTrail logging evidence for CC7.2
aws cloudtrail describe-trails --query 'trailList[].{Name:Name,IsLogging:IsLogging,S3Bucket:S3BucketName}' --output table > cloudtrail-evidence.txt
Multi-framework control mapping matrix
Create a unified mapping across SOC 2, ISO 27001, and PCI-DSS to avoid duplicate work:
import json
from pathlib import Path
FRAMEWORK_MAPPING = {
"MFA enforcement": {
"soc2": "CC6.1",
"iso27001": "A.9.4.2",
"pci": "8.3.1",
"control": "Multi-factor authentication for all privileged accounts",
"evidence": ["IAM MFA config", "Enrollment report", "Root MFA status"],
},
"Encryption at rest": {
"soc2": "CC6.7",
"iso27001": "A.10.1.1",
"pci": "3.4",
"control": "AES-256 encryption for all data stores",
"evidence": ["KMS key policy", "S3 encryption config", "RDS encryption status"],
},
"Centralized logging": {
"soc2": "CC7.2",
"iso27001": "A.12.4.1",
"pci": "10.1",
"control": "All systems forward logs to centralized SIEM",
"evidence": ["SIEM ingestion config", "Log source inventory", "Retention policy"],
},
"Vulnerability scanning": {
"soc2": "CC7.1",
"iso27001": "A.12.6.1",
"pci": "11.2",
"control": "Quarterly vulnerability scans with remediation SLA",
"evidence": ["Scanner reports", "Remediation tickets", "SLA document"],
},
"Access reviews": {
"soc2": "CC6.3",
"iso27001": "A.9.2.5",
"pci": "8.2.4",
"control": "Quarterly access reviews with documented attestation",
"evidence": ["Review records", "Manager sign-off", "Removal tickets"],
},
}
def generate_mapping_report(mapping: dict) -> str:
lines = []
lines.append("| Control | SOC 2 | ISO 27001 | PCI-DSS | Evidence |")
lines.append("|---------|-------|-----------|---------|----------|")
for name, data in mapping.items():
evidence = ", ".join(data["evidence"])
lines.append(
f"| {name} | {data['soc2']} | {data['iso27001']} | "
f"{data['pci']} | {evidence} |"
)
return "\n".join(lines)
report = generate_mapping_report(FRAMEWORK_MAPPING)
Path("multi-framework-mapping.md").write_text(report)
print(report)
Continuous compliance monitoring with OPA
Use Open Policy Agent (OPA) to continuously verify compliance controls in Kubernetes:
# OPA Gatekeeper policy: Enforce MFA-required labels on all deployments
apiVersion: templates.gatekeeper.sh/v1
kind: ConstraintTemplate
metadata:
name: k8srequiredlabels
spec:
crd:
spec:
names:
kind: K8sRequiredLabels
validation:
openAPIV3Schema:
type: object
properties:
labels:
type: array
items:
type: string
targets:
- target: admission.k8s.gatekeeper.sh
rego: |
package k8srequiredlabels
violation[{"msg": msg, "details": {"missing_labels": missing}}] {
provided := {label | input.review.object.metadata.labels[label]}
required := {label | label := input.parameters.labels[_]}
missing := required - provided
count(missing) > 0
msg := sprintf("Missing required labels: %v", [missing])
}
---
apiVersion: constraints.gatekeeper.sh/v1beta1
kind: K8sRequiredLabels
metadata:
name: require-compliance-labels
spec:
match:
kinds:
- apiGroups: ["apps"]
kinds: ["Deployment"]
parameters:
labels: ["compliance-scan", "data-classification", "owner-team"]
Additional Best Practices
- Use a compliance-as-code approach. Define controls as code (OPA policies, AWS Config rules, Terraform Sentinel policies) so compliance is continuously verified, not just assessed annually:
# Sentinel policy for Terraform: Enforce encryption on all S3 buckets
import "tfplan"
main = rule when tfplan.resource_changes is not empty {
all tfplan.resource_changes as _, rc {
rc.type is "aws_s3_bucket" implies
rc.change.after.server_side_encryption_configuration is not null
}
}
- Maintain a living evidence repository. Store all evidence in a versioned repository with automated updates. This eliminates the last-minute evidence scramble before audits:
#!/bin/bash
set -euo pipefail
EVIDENCE_DIR="compliance-evidence/$(date +%Y-%m)"
mkdir -p "$EVIDENCE_DIR"
# Auto-collect monthly evidence snapshots
aws configservice get-discovery-summary > "$EVIDENCE_DIR/config-summary.json"
# Requires the Compliance Operator (compliance.openshift.io) installed
kubectl get compliancescan -A -o json > "$EVIDENCE_DIR/k8s-compliance.json"
npm audit --json > "$EVIDENCE_DIR/npm-audit.json"
trivy image --format json myapp:latest > "$EVIDENCE_DIR/trivy-scan.json"
git add "$EVIDENCE_DIR"
git commit -m "compliance: monthly evidence snapshot $(date +%Y-%m)" Frequently Asked Questions
How long does a gap analysis take?
A focused framework assessment for one standard typically takes 2 to 4 weeks, depending on scope, maturity, and evidence availability. Multi-framework mappings take longer.
Who should own the gap analysis?
A compliance or risk manager usually owns the document, but each requirement must have a control owner who validates the evidence and commits to remediation.
What counts as evidence?
Policies, configuration screenshots, audit logs, ticket records, signed attestations, training completion records, test results, and third-party reports. Evidence must be dated and attributable.
Can I use one gap analysis for multiple frameworks?
Yes. Most controls map to several frameworks at once. Build one control inventory, then map each control to the requirement IDs of every framework you target. The multi-framework matrix in the Advanced Solutions section shows how to automate that mapping.
What happens after the gap analysis is done?
The remediation plan becomes your audit-readiness roadmap. Execute it like a normal project, re-run the analysis quarterly or after major changes, and schedule a formal pre-assessment with your auditor 4–6 weeks before the real audit window.
Should I hire a consultant for my first gap analysis?
If you're pursuing a certification on a deadline (SOC 2 Type II, ISO 27001), an outside assessor pays for itself by catching mis-scoped controls early. For internal readiness or a second renewal, an internal team with this template is usually enough.
Related Resources
Access Control Review Template
A template for auditing user access rights, verifying least privilege, and documenting access decisions across systems and teams.
DocRBAC Policy Template: Roles, Permissions & Reviews
A copy-ready template for defining role-based access control policies: role definitions, assignment rules, approval workflow, review cadence, and break-glass handling.
DocNetwork Segmentation Policy Template
A template for documenting network security zones, segmentation rules, and traffic controls between environments and tenants.
DocDependency Vulnerability Report Template
A template for documenting individual dependency vulnerabilities, including exploitability, impact, remediation plans, and risk acceptance.
DocPenetration Test Scope Template
A template for defining the boundaries, targets, rules, and deliverables for a penetration testing engagement.
DocVulnerability Scan Report Template
A template for summarizing vulnerability scan findings, including asset coverage, severity distribution, and remediation tracking.