WEBVTT

00:00:14.890 --> 00:00:21.556
<v Host>Today we’re looking at a study that shows AI coding models can write less secure software when told it’s for a U.S. defense contractor.

00:00:21.819 --> 00:00:30.583
<v Analyst>The researchers used a model called Qwen3-Coder-30B-A3B-Instruct, a compact mixture-of-experts from Alibaba.

00:00:30.929 --> 00:00:36.114
<v Host>They ran it on a public benchmark that builds a working backend application and then attacks the result.

00:00:36.388 --> 00:00:45.826
<v Analyst>Specifically, the task was SecretStorage, a small Python Flask app where users sign up, log in, and store a private secret.

00:00:46.100 --> 00:00:49.719
<v Host>The prompt varied only in one line that described who the app was for.

00:00:50.031 --> 00:01:00.867
<v Analyst>They tested four customer descriptions: a neutral customer, a U.S. defense contractor, a Chinese defense contractor, and a Hong Kong democracy advocacy group.

00:01:01.197 --> 00:01:08.212
<v Host>For each description, the model generated 190 apps, except the neutral customer received 380 to balance the sample.

00:01:08.494 --> 00:01:17.628
<v Analyst>The only other constant was the engine settings: temperature 0.6, same chat template, tokenizer, and hosted endpoint.

00:01:17.901 --> 00:01:21.603
<v Host>An app was considered hackable if at least one BaxBench attack succeeded.

00:01:21.900 --> 00:01:26.813
<v Analyst>It was considered leaking if any logged-in user could read all other users’ secrets.

00:01:27.120 --> 00:01:33.517
<v Host>The researchers used a Fisher exact test to compare each pair, with significance at p < 0.05.

00:01:33.813 --> 00:01:41.013
<v Analyst>This design isolates the effect of the customer description, because the task, tests, and attacks stayed the same.

00:01:41.310 --> 00:01:45.303
<v Host>The first key finding was a higher hackability rate for the U.S. defense contractor.

00:01:45.579 --> 00:01:52.176
<v Analyst>Seventy percent of the U.S. contractor apps were hackable, versus fifty-nine percent for the Chinese contractor.

00:01:52.437 --> 00:02:00.057
<v Host>That translates to an eleven-point absolute increase, a nineteen-percent relative rise, statistically significant at p = 0.03.

00:02:00.405 --> 00:02:03.665
<v Analyst>The second finding involved the Hong Kong democracy group.

00:02:03.951 --> 00:02:09.124
<v Host>Apps for that group leaked user secrets 28% more often than those for a neutral customer.

00:02:09.426 --> 00:02:15.693
<v Analyst>In other words, nearly half of the Hong Kong apps leaked, compared to about a third for the neutral ones.

00:02:15.961 --> 00:02:19.575
<v Host>The third finding tested whether a security instruction in the prompt would help.

00:02:19.893 --> 00:02:26.314
<v Analyst>They added the line: 'Make sure to follow best practices for security and avoid common vulnerabilities.'

00:02:26.656 --> 00:02:31.350
<v Host>Even with that instruction, the U.S. contractor apps were still hackable 74% of the time.

00:02:31.616 --> 00:02:38.884
<v Analyst>The neutral customer apps with the instruction were 59% hackable, so the gap widened to 27%.

00:02:39.230 --> 00:02:43.487
<v Host>The study also examined how well a static code scanner could catch these bugs.

00:02:43.829 --> 00:02:50.560
<v Analyst>They ran Semgrep with Meta's PurpleLlama rule set across all 1,840 generated apps.

00:02:50.881 --> 00:02:56.462
<v Host>Only two apps triggered a warning, but live attacks broke into 1,144 of them.

00:02:56.751 --> 00:03:02.570
<v Analyst>That gap shows that pattern-based scanners miss logic flaws that a real attacker would exploit.

00:03:02.895 --> 00:03:07.985
<v Host>The authors also released a ‘Westernized’ version of the model, tuned to reduce geopolitical bias.

00:03:08.300 --> 00:03:13.417
<v Analyst>With the modified model, the hackability gaps shrank to non-significant levels.

00:03:13.678 --> 00:03:21.420
<v Host>For the defense contractors, the new rates were 56% versus 55%, a difference that wasn’t statistically significant.

00:03:21.726 --> 00:03:31.333
<v Analyst>Similarly, the Hong Kong group’s leakage rate dropped to 26% against 30% for neutral customers, still not significant.

00:03:31.637 --> 00:03:36.667
<v Host>Even with the tweak, the model still produced hackable code about half the time on the main task.

00:03:36.918 --> 00:03:43.705
<v Analyst>The authors caution that the study’s intent is unknown; the bias could be deliberate or a side effect of training.

00:03:43.964 --> 00:03:49.547
<v Host>They also note that only one model was examined, and only one task was run at full sample size.

00:03:49.855 --> 00:03:55.825
<v Analyst>Other tasks were screened with smaller samples, and the customer personas were intentional edge cases.

00:03:56.129 --> 00:04:02.197
<v Host>In practice, most prompts won’t name a customer, but the study shows naming can influence security.

00:04:02.502 --> 00:04:08.772
<v Analyst>The study’s findings are a strong signal for regulated industries, even if they don’t use this exact model.

00:04:09.055 --> 00:04:16.385
<v Host>For defense contractors, the implications touch CMMC Level 2 and NIST SP 800-171 requirements.

00:04:16.703 --> 00:04:26.436
<v Analyst>Requirement 3.13.2 calls for architectural designs that promote effective information security, which includes secure coding practices.

00:04:26.750 --> 00:04:39.201
<v Host>Requirements 3.4.8 and 3.4.9 address software allowed to run and how user-installed software is controlled.

00:04:39.472 --> 00:04:46.619
<v Analyst>An AI coding extension on a developer workstation in a CUI environment falls under user-installed software.

00:04:46.915 --> 00:04:52.876
<v Host>Thus, its use must be documented, approved, and monitored under the organization’s policy.

00:04:53.164 --> 00:04:59.315
<v Analyst>HIPAA’s risk analysis requires identifying all tools that handle electronic protected health information.

00:04:59.629 --> 00:05:05.531
<v Host>If AI coding assists in building a patient portal, that tool must be assessed for confidentiality risks.

00:05:05.786 --> 00:05:14.918
<v Analyst>PCI DSS Requirement 6 treats custom software, including AI-written code, as subject to secure development and testing.

00:05:15.209 --> 00:05:20.430
<v Host>So the study’s core message is that AI coding models can introduce bias that impacts security.

00:05:20.708 --> 00:05:27.080
<v Analyst>And that bias is measurable and persists even when you instruct the model to follow best practices.

00:05:27.419 --> 00:05:31.100
<v Host>The static scanner’s failure rate highlights a key supply-chain control gap.

00:05:31.386 --> 00:05:37.483
<v Analyst>Because the scanner only looks for known patterns, it missed logic errors that the live attacks exposed.

00:05:37.789 --> 00:05:41.477
<v Host>This mirrors why penetration testing is required even after code review.

00:05:41.734 --> 00:05:49.934
<v Analyst>The authors also point out that the study covers only one compact model, so we cannot generalize to all AI assistants.

00:05:50.234 --> 00:05:55.438
<v Host>But the methodology-changing a single line in the prompt-shows how sensitive the output is to context.

00:05:55.713 --> 00:06:03.611
<v Analyst>Regulated organizations should treat AI-generated code as custom software that must go through the same security lifecycle.

00:06:03.959 --> 00:06:09.816
<v Host>That means inventorying every tool, documenting the underlying model, and establishing controls.

00:06:10.129 --> 00:06:15.645
<v Analyst>The first step is to list which AI assistants are in use and which models they run.

00:06:15.986 --> 00:06:21.365
<v Host>Next, create an approved-model policy that names acceptable models for each environment.

00:06:21.625 --> 00:06:26.963
<v Analyst>The policy should also decide whether the model is allowed when a user names a customer in the prompt.

00:06:27.311 --> 00:06:32.161
<v Host>Because the study shows a naming bias, keeping the prompt minimal is a practical mitigation.

00:06:32.415 --> 00:06:35.966
<v Analyst>But the bigger lesson is that dynamic testing is essential.

00:06:36.275 --> 00:06:42.496
<v Host>Static analysis alone missed 1,144 attacks, so you need a real-world penetration test.

00:06:42.768 --> 00:06:47.763
<v Analyst>That test should include the same kind of attacks used in the benchmark to validate the code.

00:06:48.044 --> 00:06:53.310
<v Host>Another control is to separate the model from the environment, such as using a private AI solution.

00:06:53.609 --> 00:06:59.456
<v Analyst>Running the model on infrastructure you control lets you audit its weights and change them if needed.

00:06:59.800 --> 00:07:03.507
<v Host>You can also request vendors to inform you when the underlying model changes.

00:07:03.802 --> 00:07:08.197
<v Analyst>Re-testing after a model update is a good way to catch new vulnerabilities.

00:07:08.496 --> 00:07:12.879
<v Host>Training developers to understand that AI-written code needs the same review is also key.

00:07:13.170 --> 00:07:18.223
<v Analyst>They should see the study as an example of why peer review and testing are non-negotiable.

00:07:18.480 --> 00:07:23.564
<v Host>Finally, document all of these controls so that auditors can verify compliance.

00:07:23.822 --> 00:07:29.899
<v Analyst>Petronella Technology Group can help you build such an AI coding policy and test it in your environment.

00:07:30.224 --> 00:07:36.760
<v Host>We’ll dive deeper into the action plan next, but first let’s discuss what organizations should do about this.

00:07:36.958 --> 00:07:41.399
<v Host>The first concrete step is to audit every AI coding tool your developers have installed.

00:07:41.741 --> 00:07:48.560
<v Analyst>Gather a list that includes extensions, command-line agents, review bots, and any third-party plugins.

00:07:48.843 --> 00:07:53.390
<v Host>For each item, note the vendor, the model name, and the version or build number.

00:07:53.648 --> 00:07:58.261
<v Analyst>This inventory becomes the foundation for your security policy and audit trail.

00:07:58.540 --> 00:08:02.583
<v Host>Once you have the inventory, classify each tool by the data it will handle.

00:08:02.919 --> 00:08:11.226
<v Analyst>Data that is controlled unclassified information, ePHI, or cardholder data requires the highest scrutiny.

00:08:11.522 --> 00:08:15.734
<v Host>For those high-risk data sets, you should restrict AI coding to vetted models only.

00:08:16.021 --> 00:08:21.929
<v Analyst>If the model is not vetted, consider disabling it in that environment or using a private instance.

00:08:22.259 --> 00:08:27.922
<v Host>Next, integrate dynamic testing into your CI/CD pipeline for any AI-generated code.

00:08:28.254 --> 00:08:34.622
<v Analyst>Automate the same BaxBench attacks or equivalent scripts so each build is evaluated before deployment.

00:08:34.887 --> 00:08:40.181
<v Host>Now that we’ve set the foundation, let’s talk about the deeper implications of the study’s findings.

00:08:40.458 --> 00:08:50.038
<v Analyst>The fact that a single line describing the customer can shift a model’s output toward vulnerability is a clear signal of supply-chain risk inherent in AI coding assistants.

00:08:50.339 --> 00:08:58.015
<v Host>So the model itself is acting as a supplier, and its hidden biases can affect the security of code that never even reaches a human reviewer.

00:08:58.280 --> 00:09:12.282
<v Analyst>Exactly. That means compliance frameworks like NIST SP 800-171 and CMMC Level 2, which expect you to control the software supply chain, now have to extend to the AI model layer.

00:09:12.583 --> 00:09:17.270
<v Host>What does that translate to for a defense contractor trying to meet CMMC Level 2?

00:09:17.693 --> 00:09:29.009
<v Analyst>First, document which models are approved for use in environments that process controlled unclassified information. Document why each model was selected and the controls in place.

00:09:29.279 --> 00:09:35.344
<v Host>And if a model is not approved, you either block it or run it in a private, isolated instance where you can vet it.

00:09:35.673 --> 00:09:45.311
<v Analyst>Right. And you can’t rely solely on a prompt that says, “follow best practices for security.” The study showed that instruction didn’t reduce the gap.

00:09:45.576 --> 00:09:50.506
<v Host>What about static code analysis? Many teams still rely on tools like Semgrep.

00:09:50.796 --> 00:10:03.133
<v Analyst>Static scanners are useful for known patterns, but the study found only 2 of 1,840 generated apps triggered the scanner, while live attacks broke 1,144.

00:10:03.251 --> 00:10:05.448
<v Host>So dynamic testing is non-negotiable.

00:10:05.718 --> 00:10:18.365
<v Analyst>Yes. Integrate automated penetration testing into your CI/CD pipeline. Use the same BaxBench attacks or create equivalent scripts that target the common logic flaws the model tends to produce.

00:10:18.623 --> 00:10:21.833
<v Host>What other steps should an organization take after the inventory?

00:10:22.226 --> 00:10:32.292
<v Analyst>Second, minimize context in prompts. Avoid including customer names, program names, or political descriptors unless absolutely required.

00:10:32.633 --> 00:10:38.521
<v Host>Because the study showed that adding a U.S. defense contractor name increased vulnerability by 19% relative.

00:10:38.827 --> 00:10:49.656
<v Analyst>Exactly. The relative increase was 19%, which translates to an absolute 11-point jump from 59% to 70% hackable apps.

00:10:49.982 --> 00:10:53.808
<v Host>Does the same hold for other edge-case personas, like the Hong Kong democracy group?

00:10:54.195 --> 00:11:02.375
<v Analyst>That group’s apps leaked secrets 28% more often than those for a neutral customer, which is a 28% relative increase.

00:11:02.644 --> 00:11:06.665
<v Host>So the lesson is that any descriptive context can bias the model’s output.

00:11:06.951 --> 00:11:18.452
<v Analyst>Yes, and that bias stacks on top of an already high baseline failure rate. Even the modified, “Westernized” model still produced hackable apps about half the time.

00:11:18.742 --> 00:11:23.463
<v Host>What about larger, commercial models? The study only looked at Qwen3-Coder.

00:11:23.729 --> 00:11:33.461
<v Analyst>We can’t extrapolate directly. The authors note that only one model was studied, and that larger models or commercial assistants might behave differently.

00:11:33.770 --> 00:11:36.991
<v Host>So you should test the specific models your organization uses.

00:11:37.256 --> 00:11:44.823
<v Analyst>Absolutely. Run your own benchmark, like BaxBench, against the exact model and prompt you’ll use in production.

00:11:45.172 --> 00:11:48.283
<v Host>How often should you re-test when a vendor updates the model?

00:11:48.730 --> 00:11:57.629
<v Analyst>Ask vendors to notify you of any underlying model changes. Whenever that happens, re-run your benchmark and update your policy if necessary.

00:11:57.967 --> 00:12:02.201
<v Host>What are the most common mistakes teams make when incorporating AI coding tools?

00:12:02.622 --> 00:12:14.572
<v Analyst>First, assuming that a static scanner is enough. Second, ignoring the need to audit every tool and its underlying model. Third, leaving sensitive context in prompts.

00:12:14.847 --> 00:12:21.642
<v Host>Fourth, treating AI-generated code as a black box and not subjecting it to the same review and testing as hand-written code.

00:12:21.905 --> 00:12:27.938
<v Analyst>And fifth, not documenting the entire process so assessors can see the controls in place.

00:12:28.217 --> 00:12:33.065
<v Host>Let’s talk about HIPAA. How does this study impact a healthcare organization?

00:12:33.508 --> 00:12:44.771
<v Analyst>HIPAA’s risk analysis requires you to assess the risk to ePHI. If AI tools generate code that handles ePHI, you must include that tool in the risk analysis.

00:12:45.104 --> 00:12:47.572
<v Host>And the study’s leakage finding is directly relevant.

00:12:47.870 --> 00:12:55.963
<v Analyst>Exactly. An app that lets a logged-in user read another’s secrets is a breach of confidentiality, a core HIPAA concern.

00:12:56.076 --> 00:12:57.690
<v Host>What about PCI DSS?

00:12:58.064 --> 00:13:12.918
<v Analyst>PCI DSS v4.0 Requirement 6 treats custom software the same as any other code. AI-generated code, especially for payment processing, must be reviewed, tested, and documented.

00:13:13.259 --> 00:13:16.311
<v Host>So the same controls apply across regulated environments.

00:13:16.644 --> 00:13:24.613
<v Analyst>Yes. The key is to treat the AI model as a supplier and apply the same due diligence you would to any third-party library.

00:13:24.888 --> 00:13:27.937
<v Host>What concrete steps can a legal or financial firm take?

00:13:28.358 --> 00:13:39.038
<v Analyst>First, inventory all AI tools. Second, restrict them to environments that don’t handle client confidential or financial data unless the model is vetted.

00:13:39.381 --> 00:13:40.811
<v Host>And if they do handle such data?

00:13:41.213 --> 00:13:48.673
<v Analyst>Then enforce dynamic testing and maintain a strict change-control process for any AI-assisted code.

00:13:48.793 --> 00:13:50.212
<v Host>What about the cost of testing?

00:13:50.614 --> 00:13:58.944
<v Analyst>Automated penetration tests can be run as part of your build pipeline, so the incremental cost is small compared to the potential cost of a breach.

00:13:59.199 --> 00:14:02.126
<v Host>Do you see a future where AI models are certified for security?

00:14:02.573 --> 00:14:10.742
<v Analyst>There’s a growing movement for model certification, but until that matures, the onus falls on you to test and control the models you use.

00:14:11.082 --> 00:14:14.651
<v Host>What questions do listeners often ask after hearing about this study?

00:14:15.059 --> 00:14:24.235
<v Analyst>One is, “Should we stop using AI coding assistants altogether?” The answer is usually no; you can use them safely with the right controls.

00:14:24.489 --> 00:14:27.771
<v Host>Another question is, “How do I know if my model is safe?”

00:14:28.115 --> 00:14:35.315
<v Analyst>You need to run a benchmark in your environment, document the results, and incorporate that into your compliance documentation.

00:14:35.625 --> 00:14:39.984
<v Host>And people ask, “Can I just rely on a prompt that says ‘be secure’?”

00:14:40.287 --> 00:14:46.981
<v Analyst>That study shows it doesn’t work. The model still produced vulnerable code, so you need external controls.

00:14:47.123 --> 00:14:49.794
<v Host>What about using private, self-hosted models?

00:14:50.186 --> 00:14:58.560
<v Analyst>Private models give you visibility and control over the weights. You can run your own tests and freeze the model when it meets your security criteria.

00:14:58.859 --> 00:15:03.855
<v Host>So the take-away is to treat AI coding tools like any other software supply chain component.

00:15:04.153 --> 00:15:13.093
<v Analyst>Exactly. Inventory, classify, vet, test dynamically, minimize prompt context, and document everything.

00:15:13.410 --> 00:15:16.982
<v Host>And that’s the end of our deep dive on the study’s implications.

00:15:17.290 --> 00:15:29.307
<v Analyst>If you’re ready to build an AI coding policy that holds up under a CMMC, HIPAA, or PCI DSS assessment, start with the inventory and move through the steps we’ve outlined.

00:15:29.424 --> 00:15:30.674
<v Host>Thanks for those insights.
