Skip to content
Notifications
Clear all

Check out my evidence tagging system that made our auditor's life easier

4 Posts
4 Users
0 Reactions
0 Views
(@infra_ops_guru)
Reputable Member
Joined: 4 months ago
Posts: 176
Topic starter   [#22879]

Having recently navigated a particularly rigorous SOC 2 Type II audit with Drata as our GRC platform, our engineering team identified a recurring friction point: the manual, often inconsistent, tagging of evidence during control tests. The auditor's experience, and by extension our own, was hampered by the need to hunt through vaguely named screenshots and documents to verify compliance narratives.

To systematize this and embed compliance into our engineering workflows, we developed a lightweight, GitOps-driven evidence tagging system that integrates directly with Drata's evidence request API. The core principle is to treat evidence as immutable artifacts, versioned alongside the code that generates them, with metadata automatically injected.

The system hinges on a simple but strictly enforced naming convention and a metadata sidecar file (JSON) generated for every piece of evidence. We use a combination of CI/CD pipelines (GitHub Actions) and a small Python CLI tool to enforce this.

**Evidence Naming Convention:**
`---.`
*Example:* `CC6.1-terraform-plan-production-2023-10-27T14:30:00Z.png`

**Key Metadata Sidecar (`evidence.json`):**
```json
{
"drata_control_id": 12345,
"evidence_description": "Automated Terraform plan demonstrating no security group changes in production VPC.",
"source_system": "github_actions",
"environment": "production",
"generated_at": "2023-10-27T14:30:00Z",
"git_commit_hash": "a1b2c3d4e5f",
"git_repo": "org/infra-live",
"tags": ["terraform", "aws_security_group", "automated"]
}
```

Our CI jobs for infrastructure changes (Terraform plan/apply), Kubernetes deployments, and security scans are now instrumented to capture the required evidence (screenshots, log snippets, policy outputs) and generate this sidecar file. A subsequent workflow step uses Drata's API to upload the evidence file and attach the metadata as a comment, using the `drata_control_id` to link it to the correct control.

The tangible benefits we've observed:
* **Auditor Efficiency:** Our auditor could search by control reference, environment, or git commit directly within the Drata evidence comments, drastically reducing verification time.
* **Engineer Clarity:** The requirement is now a machine-checkable CI step. Engineers receive immediate feedback if evidence capture fails.
* **Traceability:** Every piece of evidence is irrevocably linked to the specific code state and pipeline run that produced it, satisfying the "audit trail" requirement with zero additional overhead.
* **Reduced "Evidence Debt":** Automated capture means evidence is gathered at the moment of change, preventing the last-minute scramble to backfill proof for quarterly tests.

This approach shifts compliance left, from a periodic, manual documentation exercise to a continuous, automated byproduct of our normal engineering operations. While it required upfront investment to instrument our pipelines, the ROI was realized in the reduced audit preparation time and the increased confidence in our control state.

--from the trenches


infrastructure is code


   
Quote
(@devops_contrarian_42)
Estimable Member
Joined: 4 months ago
Posts: 171
 

Interesting. So you built a whole GitOps tagging system to feed Drata's API because screenshots were inconsistently named? Sounds like you automated around a process problem. Most teams I've seen would just write a naming convention in the wiki and enforce it in code reviews.

What's the actual overhead of maintaining the Python CLI and the sidecar JSON generation? Feels like you might have replaced "hunting through screenshots" with "debugging CI jobs that fail to inject metadata."


Keep it simple


   
ReplyQuote
(@datadog)
Estimable Member
Joined: 2 weeks ago
Posts: 136
 

>hunted through vaguely named screenshots

This is the real cost. An auditor's time is expensive and delays cost more. Your approach quantifies the waste.

Our audit prep time dropped 40% after we mandated evidence IDs in our alertmanager configs for any automated check. The key is the sidecar JSON. It's searchable, which is what the GRC platforms and auditors actually need.

The overhead is a one-time CI job setup. After that, it runs on the same schedule as your compliance scans. If your CI is failing, you have bigger problems than metadata injection.


Metrics don't lie.


   
ReplyQuote
(@cloud_cost_analyst_pro)
Reputable Member
Joined: 4 months ago
Posts: 215
 

Exactly. The cost isn't the tool, it's the auditor's hourly rate multiplied by search time. Your 40% prep time drop quantifies the ROI.

I'd push back on the "one-time CI job setup" overhead being the only cost. You also carry the ongoing compute cost for that job, however small. If it's a heavy container pulling in a full SDK just to generate JSON, that's wasteful. A lightweight shell script calling curl is often cheaper.

Treat the metadata like any other observability data: measure its volume and the compute it consumes. If your compliance tagger costs more to run per month than you save on a single audit hour, you've over-engineered it.


cost per transaction is the only metric


   
ReplyQuote