Back to Blog
Abstract glass-like cubes evaporating into clean geometric ledger lines, cyan edge lighting on an obsidian background
AUDITEvidence Collection
8 min read

Zero-Trace SOC 2 Type II Evidence for Ephemeral Infrastructure

Generate deploy-time, immutable, signed evidence for short-lived stacks without retaining workload data—ready for SOC 2 Type II audits.

#SME#Security#soc-2#audit-evidence#ephemeral-infrastructure#policy-as-code#immutable-logs#evidence#template

Introduction

Ephemeral infrastructure breaks the default audit playbook: workloads, namespaces, and runners disappear, but the expectation to prove control operation over time does not. The only reliable strategy is to capture evidence at the moment controls execute—then seal it as immutable, timestamped artifacts that can survive beyond the infrastructure lifecycle. This post outlines a deterministic, zero-trace evidence pipeline that records what mattered (control decisions, change metadata, integrity proofs) without retaining sensitive workload data. The result is audit-ready packages per deployment cycle and per month, generated in hours/days rather than after-the-fact reconstruction.

Quick Take

  • Evidence for ephemeral stacks must be generated at deploy-time, not recovered later.
  • Record control decisions (allow/deny), change metadata, and actor context as signed artifacts.
  • Centralize cloud audit logs and configuration history into write-once storage with retention locks.
  • Produce periodic attestation bundles (admission audits, provenance, baseline scans) that are hashed, signed, and indexed.
  • Treat evidence like build outputs: deterministic, reproducible, exportable, and immutable.

Design the Evidence Model for “Zero-Trace” Ephemeral Systems

Define what “evidence” is (and what it is not)

In ephemeral environments (short-lived Kubernetes namespaces, AWS Lambda, disposable CI runners), persistence is an anti-pattern—yet audit evidence must persist. “Zero-trace” here means you retain control artifacts and integrity proofs, not workload data. A practical evidence model for SOC 2 Type II-style audits typically needs:
  • Change identity: repo, commit SHA, PR, pipeline run ID, artifact digest.
  • Control decision: policy evaluation result (allow/deny), exceptions, approver, ticket ID.
  • Execution proof: timestamps, principal, environment, tool versions.
  • Integrity: hash chain, signatures, and tamper-evident storage.
  • Retention & export: locked retention period, queryable index, auditor-facing export bundle.

⚠️
If your evidence pipeline stores request payloads, secrets, or customer data “for convenience,” you just created a high-value audit evidence store with unnecessary blast radius.

Standardize the evidence envelope

Create a minimal, consistent JSON schema for every evidence event (policy gate, deploy, scan, admission decision). Example envelope:

CODEBLOCK0

💡
Keep a strict “no payloads” rule. Store identifiers (digests, resource ARNs, PR URLs) and derived metadata, not raw configs or logs that could contain sensitive values.

Evidence at Deploy-Time: Terraform + Policy Gates That Emit Signed Decisions

Gate infrastructure changes and emit decision logs

Infrastructure controls must be provable at the point of change. Use Terraform with a policy gate (OPA, Conftest, or Sentinel) and force every plan/apply to produce:
  • Policy evaluation decision (allow/deny)
  • Control version (policy bundle digest)
  • Change metadata (commit SHA, workspace, build ID)
  • Signed evidence artifact (to prove it wasn’t altered)
A common pattern is:

1) terraform plan produces a plan JSON.

2) Policy gate evaluates the plan.

3) Gate writes an evidence JSON event.

4) Evidence is signed and uploaded to immutable storage.

Example: Conftest + OPA policy decision recording

Policy (Rego) that denies public S3 access and returns a reason string:

CODEBLOCK1

CI step to evaluate plan and emit evidence:

CODEBLOCK2

Sign evidence artifacts (deterministic integrity)

Use Cosign (keyless or key-based) to sign the evidence file. This gives you cryptographic non-repudiation for the artifact.

CODEBLOCK3

For any deployment, you can show the exact policy version and the allow/deny decision that gated the change, bound to a commit SHA and build ID, with verifiable signatures.

Immutable Audit Trail: Centralize Logs and Config History into Write-Once Storage

AWS: CloudTrail/CloudWatch + AWS Config into S3 Object Lock

For control operation over time, you need an immutable trail of “who did what, when” and “what changed.” In AWS, that typically means AWS CloudTrail, CloudWatch Logs, and AWS Config delivered into a dedicated evidence account/bucket. Key requirements:
  • Dedicated evidence bucket
  • S3 Object Lock enabled (requires bucket versioning)
  • Retention mode defined (Governance or Compliance) aligned to your audit period
  • Explicit deny policies for deletion/overwrite paths

Create an Object Lock bucket (bucket must be created with Object Lock enabled):

CODEBLOCK4

Verify retention on an object:

CODEBLOCK5

⚠️
Don’t rely on “restricted IAM” alone. Immutability must be enforced by storage controls (Object Lock / immutable policies), otherwise deletion is a permissions bug away.

Azure: Activity Logs to Immutable Storage

In Azure, route Azure Activity Log and diagnostic logs to a Storage Account configured for immutability. A typical pattern is:
  • Dedicated Storage Account for evidence
  • Immutable blob policy (time-based retention)
  • Separate subscription/resource group to isolate evidence from workloads

Example: set an immutability policy on a container:

CODEBLOCK6

💡
Store only the minimum necessary log sources for your defined controls, then document the mapping (control → log source → retention → query). Over-collection increases cost and review time.

Control Operation Proofs: Periodic Attestation Bundles (Admission, Provenance, Baselines)

Kubernetes admission audits (what was allowed into the cluster)

If workloads are short-lived, admission decisions are durable evidence. Capture Kubernetes admission events (e.g., OPA Gatekeeper audits) and package them periodically.

Bundle script (daily or per deployment) that exports audit results, hashes, and signs:

CODEBLOCK7

Container image provenance (what you ran, exactly)

For ephemeral compute, image provenance is your anchor. Use Cosign to sign images and store SBOM/provenance artifacts in your registry.

CODEBLOCK8

Baseline evidence: CIS-aligned scans without claiming compliance

You can generate baseline scan outputs (e.g., host/container/Kubernetes benchmarks) as evidence of control operation. Use CIS benchmarks as a reference point without claiming certification.

Example: run a benchmark tool in CI and capture only the report artifacts:

CODEBLOCK9

For any audit period, you can produce a time-indexed set of signed attestations that show controls were operating, even if the underlying namespaces, nodes, and runners are long gone.

Assemble Auditor-Ready Evidence Packages (Per Deploy + Per Month)

Build an evidence index that auditors can navigate

Evidence is only valuable if it’s searchable and exportable. Maintain an index (CSV/JSON) that maps:
  • control ID/name → evidence artifact(s)
  • time window → storage location → hash/signature
  • system boundary (account/subscription/cluster)

Example index row (JSONL):

CODEBLOCK10

Export bundles without exposing sensitive data

Your export should be:
  • Minimal (only what supports the control)
  • Reproducible (same query yields same set)
  • Integrity-verified (hash + signature)

Example: export a monthly bundle from S3 by prefix and generate a manifest:

CODEBLOCK11

💡
Make “auditor export” a first-class pipeline target. If export is manual, it will be delayed, inconsistent, and risk-prone.

Where Skynet fits: standardized, deterministic audit execution

Skynet’s AUDIT execution focuses on deterministic evidence generation for ephemeral systems:
  • Per-deployment evidence bundles (policy decisions, attestations, integrity proofs)
  • Per-month exports with locked retention and manifest verification
  • Zero-trace packaging: retain control artifacts, not workload data

Checklist

  • [ ] Define a strict evidence envelope schema (event type, timestamp, actor, change metadata, control decision, integrity).
  • [ ] Enforce a “no payloads” rule (no secrets, request bodies, or customer data in evidence artifacts).
  • [ ] Gate Terraform changes with a policy engine (OPA/Conftest/Sentinel) and emit allow/deny decision artifacts.
  • [ ] Bind evidence to commit SHA, workspace/environment, and CI run/build ID.
  • [ ] Hash and sign every evidence artifact (for example with Cosign).
  • [ ] Centralize AWS CloudTrail/AWS Config (or Azure Activity Logs) into a dedicated evidence store.
  • [ ] Enable immutability controls (S3 Object Lock / Azure immutability policies) with audit-period retention.
  • [ ] Generate periodic Kubernetes admission attestation bundles and sign them.
  • [ ] Enforce and verify container image signing during deploy (Cosign verify gate).
  • [ ] Produce monthly exports with a manifest, hashes, and signatures; store/export as a single sealed bundle.

FAQ

How do we prove control operation when the namespace or runner no longer exists?

Capture evidence at the control execution point (policy gate, admission decision, provenance verification) and store only signed artifacts plus integrity proofs in immutable storage. The disappearing workload is expected; the durable proof is the control decision, metadata, and tamper-evident retention.

What’s the minimum evidence we should retain to stay “zero-trace”?

Retain control decisions, timestamps, actor identity, change identifiers (commit SHA, pipeline run ID), artifact digests, and cryptographic proofs (hashes/signatures). Avoid storing raw configs, full request payloads, or application logs unless they are explicitly required for a defined control and can be minimized.

How do we keep evidence exports fast during an audit?

Pre-index evidence by control and time window, store it under predictable prefixes, and generate monthly sealed bundles with a manifest and signatures. When the request arrives, you export deterministically (by prefix/query) and verify integrity via the manifest rather than assembling evidence ad hoc.

YH

Article written by Yassine Hadji

Cybersecurity Expert at Skynet Consulting

Citation

© 2026 Skynet Consulting. Merci de citer la source si vous reprenez des extraits.

Zero-Trace SOC 2 Type II Evidence for Ephemeral Infrastructure — Skynet Consulting

Found this article valuable?

Share it with your network

Need help securing your infrastructure?

Discover our managed services and let our experts protect your organization.

Contact Us