Stay up to date with AI tools, model releases, and developer workflows that matter.

Weekly. Free. One click to leave.

Recent findings suggest that 7 Day Free Trial. Cancel Anytime.

In an earlier piece, I wrote about building an open-source tool that automates SOC 2 evidence collection from AWS and GitHub for small teams who can't afford Vanta or Drata. That version had two collectors, a dashboard, and real validated results, including a genuine bug in the GitHub collector that only showed up when testing against a personal account instead of an org.

Since then I've added four things: continuous monitoring, AI-assisted remediation guidance, broader compliance-criteria coverage, and a real test suite with CI. This piece is about a second bug I found while building those, one considerably more dangerous than the first, and the design decisions that came out of fixing it.

Continuous monitoring works by polling AWS CloudTrail for activity relevant to the tool's compliance checks, then triggering a targeted re-check only when something actually happened. I tested it by deleting a test IAM user and watching the dashboard. It should have caught the DeleteUser event on the next poll.

My first reaction was that it was broken. The useful part wasn't that reaction; it was not stopping there. I checked whether the event had actually occurred, then checked the permissions on the IAM user running the tool. It didn't have CloudTrail:LookupEvents, so every lookup_events call was throwing an AccessDeniedClientError.

Here's where it got interesting. The code looped through 14 relevant event names, calling lookup_events for each, catching exceptions along the way. After all 14 failed with AccessDenied, found_events was empty, so the function returned events_found: 0. The scheduler saw 0 events, recorded a clean poll, and moved on, exactly the same result as a legitimate quiet period.

What this means for you: if your monitoring code has a bare except around an external API call, "I checked and found nothing" and "I couldn't check at all" currently look identical to anything downstream. That's worth auditing in your own pipelines even if you've never touched this tool.

According to recent reports, the comment explains the original intent reasonably well: don't let one flaky lookup kill the whole poll. The problem is the same except block swallows a systemic permissions failure exactly the same way it handles a single transient one.

If every lookup fails, the result now carries an explicit "ERROR" status, and the scheduler writes a visible, red check_history entry instead of a clean one.

This exists so the exact bug can't silently come back if someone later "simplifies" the error handling.

In a recent development, the efficient version of this would be event-driven, AWS EventBridge pushes a notification the moment something happens. I didn't build it that way, and it's a constraint, not a preference: a laptop doesn't have a public address. EventBridge, SNS, or any push-based system works by sending an HTTP POST to a URL that has to be reachable from AWS's servers, a public IP or hostname, an open firewall, a valid TLS cert, permanent uptime. localhost:8000 means nothing to AWS.

Polling flips the direction: the tool reaches out to AWS on a schedule, which works from anywhere with outbound HTTPS. The tradeoff is latency and some wasted calls when nothing happened, but it needs zero infrastructure of its own. For a self-hosted, localhost-first tool, that tradeoff is the right one.

Once the tool finds a problem, the next question is what to do about it. I didn't want to require an AI API key, but I also didn't want to settle for generic advice when AI could make it specific.

Tier 1 covers every finding category, IAM MFA, S3 public access, branch protection, with actual click-by-click instructions, not generic advice. Tier 2 is opt-in: the tool sends the specific finding's detail (username, bucket name, repo name) to the model and gets back guidance naming that exact resource.

Recent findings suggest that the last piece was going back and adding a real automated test suite and CI pipeline after the functionality already worked. Every core module now has pytest unit tests that run without real AWS or GitHub credentials, all external calls are mocked, so any contributor can verify correctness before touching a live account. GitHub Actions runs the full suite on every push.

For a project whose entire value proposition is "trust this to tell you what's broken," the tool itself being verifiably correct isn't optional.

The test suite: 26 tests across seven files, covering the diffing logic, both AI providers (mocked), PDF export, and the regression test above. All 26 pass, and CI runs automatically on every push.

Continuous monitoring, live: after deploying the fix, I deleted a real test IAM user and watched the poll log:.

Six consecutive honest "0 events" polls, followed by one that correctly caught the real DeleteUser action with the exact CloudTrail event name attached. A tool that only ever demonstrates activity would be easy to fake; one that correctly reports "nothing happened" most of the time, then correctly catches the one poll where something did, is harder to dismiss as coincidence.

AI-tailored remediation, live: run against a real GitHub account with 14 repos, none with branch protection enabled, the tool returned this for one specific finding:.

"To address the finding regarding the 'terraform-provider-aws' repository, you need to enable branch protection for the 'main' branch. This action will help you comply with SOC 2 CC8.1 by ensuring that all changes are reviewed before they are merged into the default branch.".

It named the exact repository and its actual default branch, not a templated response with a variable swapped in.

Does this replace Vanta or Drata?

No. It's a free starting point for teams that can't afford those tools yet, not a competitor to them.

Does it ever write to your AWS account?

No, every AWS and GitHub call is read-only.

What happens if the tool loses permissions after it's already running?

With the fix, it surfaces an explicit ERROR status and a visible failure message instead of silently reporting "all clear.".

Why polling instead of real-time webhooks?

In a recent development, because a self-hosted tool on a laptop has no publicly reachable address for AWS to call. Polling needs no inbound infrastructure.

Do I need an OpenAI or Anthropic key to use it?

No, the free tier covers every finding category with hand-written remediation steps. AI guidance is opt-in.

Is the test suite real, or just a few happy-path checks?

26 tests across seven files, all mocked (no live credentials needed to run them), including a dedicated regression test for the exact bug this article describes.

SOC 2 compliance tooling was built for companies with dedicated security teams and compliance budgets. A five-engineer startup closing its first enterprise deal faces the same audit requirements with none of those resources. This tool is self-hosted, open-source, and talks directly to your own AWS/GitHub accounts, no subscription, no vendor, no data leaving your environment. The whole project is built around one constraint: a two-person team should be able to run it, understand what it's checking, and act on what it finds.

Recent findings suggest that since this round of work, I've also added a one-click executive report: a plain-English PDF summary of the account's SOC 2 posture, written for a non-technical stakeholder rather than an engineer, using the same AI key. And compliance coverage now includes a CC6.2 check for stale IAM access keys, unused or un-rotated for 90+ days, with the same free, hand-written remediation steps as every other finding.

According to recent reports, suman Shashikumar is a Site Reliability Engineer with 10+ years of experience, presently at J.P. Morgan. This project was built entirely independently, outside the scope of his employment. Source: github.com/sumansetty12/SOC2.

7 Day Free Trial. Cancel Anytime.

πŸ“Œ Read also:

β†’ Read original article