<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: Diego Pablo</title>
    <description>The latest articles on DEV Community by Diego Pablo (@diego_pablo_8bd4b02db0e07).</description>
    <link>https://dev.to/diego_pablo_8bd4b02db0e07</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F3949602%2Fc4661b96-1385-40d0-9ca9-22ab25bae486.jpg</url>
      <title>DEV Community: Diego Pablo</title>
      <link>https://dev.to/diego_pablo_8bd4b02db0e07</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/diego_pablo_8bd4b02db0e07"/>
    <language>en</language>
    <item>
      <title>We Got Flagged in a SOX Audit Because of Code Comments. So We Built a VS Code Extension</title>
      <dc:creator>Diego Pablo</dc:creator>
      <pubDate>Sun, 24 May 2026 21:57:20 +0000</pubDate>
      <link>https://dev.to/diego_pablo_8bd4b02db0e07/we-got-flagged-in-a-sox-audit-because-of-code-comments-so-we-built-a-vs-code-extension-4k3a</link>
      <guid>https://dev.to/diego_pablo_8bd4b02db0e07/we-got-flagged-in-a-sox-audit-because-of-code-comments-so-we-built-a-vs-code-extension-4k3a</guid>
      <description>&lt;p&gt;&lt;em&gt;How we automated compliance-grade documentation for regulated-industry codebases — and what we learned.&lt;/em&gt;&lt;/p&gt;




&lt;p&gt;Last year, a fintech team I know got dinged during a SOX audit. Not for a security vulnerability. Not for a broken control. For &lt;strong&gt;inadequate code documentation&lt;/strong&gt; on a financial reporting module.&lt;/p&gt;

&lt;p&gt;The auditors wanted to know: what does this function do, what data does it touch, and where's the audit trail? The devs knew the answers. They just hadn't written any of it down in a way that survives a formal review.&lt;/p&gt;

&lt;p&gt;That's a surprisingly common story in financial services and healthcare. The code is often fine. The paper trail isn't.&lt;/p&gt;




&lt;h2&gt;
  
  
  The Problem with Compliance Documentation
&lt;/h2&gt;

&lt;p&gt;Here's what usually happens:&lt;/p&gt;

&lt;p&gt;A developer writes a function that handles, say, customer PII or swap transaction records. It works. It gets reviewed. It ships. And somewhere in the process, the compliance documentation either:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Never gets written&lt;/li&gt;
&lt;li&gt;Gets written in plain English by someone who doesn't understand the code&lt;/li&gt;
&lt;li&gt;Gets written by the developer in a format that doesn't map to any regulatory framework&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Then audit season comes. Or an incident happens. Or a new compliance officer joins and wants to understand the codebase. And suddenly everyone is scrambling to reverse-engineer intent from implementation.&lt;/p&gt;

&lt;p&gt;The irony is that developers &lt;em&gt;know&lt;/em&gt; what the code does. They just don't have a fast path to getting that knowledge into a form that satisfies FINRA, SEC, SOX, HIPAA, or PCI-DSS reviewers.&lt;/p&gt;




&lt;h2&gt;
  
  
  What We Built
&lt;/h2&gt;

&lt;p&gt;We built &lt;strong&gt;compliancedoc&lt;/strong&gt; — a VS Code extension (two, actually: one for &lt;a href="https://marketplace.visualstudio.com/items?itemName=compliance-documenter.compliance-documenter-finance" rel="noopener noreferrer"&gt;finance&lt;/a&gt; and one for &lt;a href="https://marketplace.visualstudio.com/items?itemName=compliance-documenter.compliance-documenter-healthcare" rel="noopener noreferrer"&gt;healthcare&lt;/a&gt;) that generates compliance-aware documentation directly from selected code.&lt;/p&gt;

&lt;p&gt;You highlight a function. You run a command. You get back structured output mapped to the frameworks you're actually regulated under.&lt;/p&gt;

&lt;p&gt;It does four things:&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;1. Explain&lt;/strong&gt; — Plain-English explanation of what the code does, what data it touches, and what compliance risks are visible. Written for compliance officers and auditors, not developers.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;2. Document&lt;/strong&gt; — Generates a JSDoc block with compliance-specific tags: data classification, PII flags, risk level, framework references (e.g. &lt;code&gt;SOX-404&lt;/code&gt;, &lt;code&gt;PCI-3.4&lt;/code&gt;, &lt;code&gt;GDPR-Art32&lt;/code&gt;), and audit-trail status. It inserts directly above your function.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;3. Refactor&lt;/strong&gt; — Reviews the selected code for compliance gaps and gives you concrete remediation steps plus a refactored example. Useful before a commit or during audit remediation.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;4. Audit Report&lt;/strong&gt; — Produces a formal audit-style report: executive summary, regulatory mapping table, access control assessment, data protection assessment, sign-off readiness. Built for the evidence package, not a PR description.&lt;/p&gt;




&lt;h2&gt;
  
  
  What It Actually Looks Like
&lt;/h2&gt;

&lt;p&gt;Say you have a function like this (simplified):&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="k"&gt;async&lt;/span&gt; &lt;span class="kd"&gt;function&lt;/span&gt; &lt;span class="nf"&gt;processPayment&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;customerId&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;amount&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;cardToken&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;customer&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="k"&gt;await&lt;/span&gt; &lt;span class="nx"&gt;db&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;getCustomer&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;customerId&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
  &lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;result&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="k"&gt;await&lt;/span&gt; &lt;span class="nx"&gt;paymentGateway&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;charge&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;cardToken&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;amount&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
  &lt;span class="k"&gt;await&lt;/span&gt; &lt;span class="nx"&gt;db&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;logTransaction&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;customerId&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;amount&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;result&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;id&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
  &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="nx"&gt;result&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Running &lt;strong&gt;CD: Generate Docs&lt;/strong&gt; produces something like:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="cm"&gt;/**
 * @function processPayment
 * @description Processes a customer payment charge and records the transaction.
 * Handles cardholder data via tokenized card reference; raw PAN is never stored.
 *
 * @compliance PCI-DSS 3.4 - Cardholder data rendered unreadable (tokenization)
 * @compliance PCI-DSS 10.2 - Audit log written on transaction completion
 * @compliance SOX-404 - Financial transaction logged for internal control evidence
 *
 * @dataClassification FINANCIAL | PII
 * @riskLevel HIGH
 * @auditTrail EVIDENCED — logTransaction call present
 *
 * @param {string} customerId - Internal customer identifier
 * @param {number} amount - Charge amount in smallest currency unit
 * @param {string} cardToken - Payment gateway token (never raw PAN)
 * @returns {Promise&amp;lt;Object&amp;gt;} Gateway charge result with transaction ID
 * @throws {PaymentGatewayError} On charge failure
 */&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;That's insertable, version-controllable, and something an auditor can actually read.&lt;/p&gt;

&lt;p&gt;Running &lt;strong&gt;CD: Generate Audit Report&lt;/strong&gt; on the same function produces a multi-section Markdown report covering regulatory mapping, gap analysis (e.g. "encryption at rest for &lt;code&gt;logTransaction&lt;/code&gt; output not evidenced in selected code"), and recommended actions.&lt;/p&gt;




&lt;h2&gt;
  
  
  What Frameworks Are Supported
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;Finance extension:&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;FINRA (supervisory controls, business continuity)&lt;/li&gt;
&lt;li&gt;SEC (records retention, immutable financial records)&lt;/li&gt;
&lt;li&gt;SOX (internal controls, financial reporting)&lt;/li&gt;
&lt;li&gt;PCI-DSS (cardholder data, secure development)&lt;/li&gt;
&lt;li&gt;GLBA (consumer financial data safeguards)&lt;/li&gt;
&lt;li&gt;CFTC (swap records, transaction information)&lt;/li&gt;
&lt;li&gt;GDPR (privacy by design, erasure implications)&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Healthcare extension:&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;HIPAA Privacy Rule&lt;/li&gt;
&lt;li&gt;HIPAA Security Rule&lt;/li&gt;
&lt;li&gt;HITECH&lt;/li&gt;
&lt;li&gt;21 CFR Part 11&lt;/li&gt;
&lt;li&gt;CMS standards&lt;/li&gt;
&lt;li&gt;GDPR (for EU health data contexts)&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;You configure which frameworks are active for your project. The backend only generates output against your selected frameworks — you're not getting irrelevant CFTC flags on a HIPAA-only codebase.&lt;/p&gt;




&lt;h2&gt;
  
  
  The Part That Matters: This Is a Starting Point, Not a Rubber Stamp
&lt;/h2&gt;

&lt;p&gt;Worth saying clearly: &lt;strong&gt;the output should be reviewed by a qualified compliance officer before it's used for regulatory submissions or production sign-off.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;The extension doesn't replace compliance expertise. It gives developers a structured, framework-aware first draft that a compliance officer can actually review, rather than starting from scratch or trying to decode raw source code.&lt;/p&gt;

&lt;p&gt;The goal is to close the gap between what developers know and what auditors need to see — faster, and in a consistent format.&lt;/p&gt;




&lt;h2&gt;
  
  
  Free Tier vs. Pro
&lt;/h2&gt;

&lt;p&gt;There's a free tier with a monthly generation quota — enough to try all four features across a real codebase. Pro is unlimited and adds custom personal rules (global or framework-specific), so you can encode your organization's internal compliance standards on top of the built-in framework rules.&lt;/p&gt;




&lt;h2&gt;
  
  
  Try It
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Finance:&lt;/strong&gt; &lt;a href="https://marketplace.visualstudio.com/items?itemName=compliance-documenter.compliance-documenter-finance" rel="noopener noreferrer"&gt;marketplace.visualstudio.com — compliancedoc-finance&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Healthcare:&lt;/strong&gt; &lt;a href="https://marketplace.visualstudio.com/items?itemName=compliance-documenter.compliance-documenter-healthcare" rel="noopener noreferrer"&gt;marketplace.visualstudio.com — compliancedoc-healthcare&lt;/a&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Install, run &lt;code&gt;CD: Register / Sign In&lt;/code&gt;, select your frameworks, highlight a function, and run one of the &lt;code&gt;CD:&lt;/code&gt; commands from the Command Palette.&lt;/p&gt;

&lt;p&gt;If you work in a regulated industry and spend time writing or reviewing compliance documentation, I'd genuinely like to hear what you think — what works, what's missing, what framework coverage you'd want next.&lt;/p&gt;




&lt;h1&gt;
  
  
  vscode #compliance #fintech #healthtech #devtools #productivity #security
&lt;/h1&gt;

</description>
      <category>vscode</category>
      <category>fintech</category>
      <category>heathtech</category>
      <category>devtools</category>
    </item>
  </channel>
</rss>
