<?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: Yahya Titi</title>
    <description>The latest articles on DEV Community by Yahya Titi (@yehyatt).</description>
    <link>https://dev.to/yehyatt</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.us-east-2.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F4056207%2F45fb16ce-c245-4c8e-aff8-eff87f724be9.jpeg</url>
      <title>DEV Community: Yahya Titi</title>
      <link>https://dev.to/yehyatt</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/yehyatt"/>
    <language>en</language>
    <item>
      <title>Who Is the Author? AI-Generated Code and PCI DSS Code Review</title>
      <dc:creator>Yahya Titi</dc:creator>
      <pubDate>Wed, 05 Aug 2026 13:00:00 +0000</pubDate>
      <link>https://dev.to/yehyatt/when-an-ai-writes-the-code-who-is-the-author-3chi</link>
      <guid>https://dev.to/yehyatt/when-an-ai-writes-the-code-who-is-the-author-3chi</guid>
      <description>&lt;p&gt;PCI DSS requires that code review be performed by someone other than the code's author.&lt;/p&gt;

&lt;p&gt;When an AI writes the code, who is the author?&lt;/p&gt;

&lt;p&gt;I've been building payment SDKs for four years and using AI tooling as my primary development environment for the last one. That question sounds like a technicality. It isn't. It sits at the centre of how I now review anything before it ships.&lt;/p&gt;

&lt;p&gt;Here's what I've learned.&lt;/p&gt;

&lt;p&gt;The blast radius is different&lt;/p&gt;

&lt;p&gt;When you write a mobile app, a mistake affects your users. When you write an SDK, a mistake ships to every merchant who integrates it, and then to all of their users. You don't get to push a hotfix and be done — you publish a version, and it propagates at whatever speed your integrators upgrade. Some never do.&lt;/p&gt;

&lt;p&gt;That asymmetry existed before AI. What changed is throughput. I now produce more code in a day than I used to produce in three, and my review capacity did not triple. If you don't consciously rebalance, the ratio of code written to code genuinely understood quietly degrades — and in a payments library, that ratio is the whole job.&lt;/p&gt;

&lt;p&gt;So I stopped treating generated code as a draft to be corrected and started treating it as a third-party contribution from a fast, confident contributor who has never read our threat model.&lt;/p&gt;

&lt;p&gt;Four failure modes I look for specifically&lt;/p&gt;

&lt;p&gt;Logging. This is the one that worries me most, because it's invisible in review if you're skimming. Ask for error handling and you'll often get generous, helpful diagnostics — the full request body, the complete response object. In a payments path, one such line can put a primary account number into a log aggregator, or capture sensitive authentication data that must never be retained after authorization. The code is correct. The code also just created a compliance incident. I now grep every generated diff for logging statements before I read anything else.&lt;/p&gt;

&lt;p&gt;Cryptographic defaults. Ask for encryption and you frequently get something that works and shouldn't be used — a weak mode, a static initialization vector, a hash chosen for speed rather than resistance. It compiles, the tests pass, and the round trip succeeds. Correctness and security are different properties, and generated code optimizes for the first.&lt;/p&gt;

&lt;p&gt;Storage shortcuts. Tokens and credentials land in UserDefaults or SharedPreferences with remarkable consistency. It's the path of least resistance and it's wrong. Keychain and Keystore exist for a reason, and the generated code rarely reaches for them unless you say so explicitly.&lt;/p&gt;

&lt;p&gt;Dependencies. This is the newest one. Suggested packages arrive with total confidence, and some of them are unmaintained, some are wrong, and occasionally some don't exist at all — which is itself an attack surface now that adversaries have noticed the pattern. In an SDK, every dependency you add becomes a dependency your merchant inherits without ever choosing it. I don't accept a new package from a suggestion. Ever.&lt;/p&gt;

&lt;p&gt;What actually changed in my practice&lt;/p&gt;

&lt;p&gt;Three things.&lt;/p&gt;

&lt;p&gt;I review generated code harder than hand-written code, not more leniently. The instinct runs the other way — it looks clean, it's well-structured, it has comments. That polish is exactly what makes it dangerous to skim.&lt;/p&gt;

&lt;p&gt;I read diffs in a fixed order now: logging, then data handling, then crypto, then logic. Logic bugs surface in testing. The first three often don't.&lt;/p&gt;

&lt;p&gt;And I stay slow at the trust boundaries. Card data handling, tokenization, key management, the network layer — I write these myself or review them line by line, because those are the places where a plausible-looking mistake is also a reportable one.&lt;/p&gt;

&lt;p&gt;Everywhere else, the tooling has made me substantially faster, and I'm not interested in pretending otherwise.&lt;/p&gt;

&lt;p&gt;The question I don't have a clean answer to&lt;/p&gt;

&lt;p&gt;Back to the beginning. The separation-of-duties requirement exists because authors are blind to their own assumptions. A second reader breaks that blindness.&lt;/p&gt;

&lt;p&gt;But when I prompt for an implementation, review it, adjust it, and commit it — am I the author who needs a second reader, or am I the second reader?&lt;/p&gt;

&lt;p&gt;I've settled on treating myself as the author, because I made the decisions that shaped the output and I'm the one who chose to ship it. That means generated code still gets a colleague's eyes before it goes anywhere near production. It's the more conservative reading, and in payments I'd rather be conservative than clever.&lt;/p&gt;

&lt;p&gt;I'm not certain that's the right answer. I'm fairly certain the standards haven't caught up with the question yet.&lt;/p&gt;

&lt;p&gt;If you work in payments or any regulated environment and you've thought this through differently, I'd like to hear it.&lt;/p&gt;

</description>
      <category>security</category>
      <category>ai</category>
      <category>mobile</category>
      <category>ios</category>
    </item>
  </channel>
</rss>
