Join our Newsletter — 33% off our NHI Course

What should organisations do when AI-generated code is already being introduced by third parties or contractors?

Organisations should assume AI-generated code is already entering the stack through vendors, contractors, and low-code platforms, then extend governance to those sources. That means requiring secure development standards, security testing evidence, and remediation accountability in delivery chains. Without that oversight, AI-assisted code can create hidden exposure even when internal teams never directly use a model.

Vendor and contractor code needs the same governance as internal code

When AI-generated code arrives through third parties, the core problem is not whether the model was used inside your organisation. The problem is that code provenance, review depth, test coverage, and accountability can become opaque once delivery shifts to suppliers, contractors, or low-code providers. NIST SP 800-53 Rev 5 Security and Privacy Controls is useful here because the issue is governance of supplied code and the control evidence around it, not the novelty of the tooling. In practice, many security teams discover the gap only after supplier delivery has already normalised weaker review and testing expectations.

How to inspect AI-assisted code when you did not author it

Organisations should treat externally delivered AI-assisted code as they would any other high-risk software supply chain input: define what must be evidenced, verify what can be independently checked, and make remediation obligations explicit before acceptance. That usually means requiring the supplier or contractor to show secure coding standards, code review outcomes, dependency checks, secrets scanning, and security test results that match the risk of the component being delivered. If the work is being delivered through a platform or managed service, the same expectation applies to the artefacts you receive, even when you do not get direct visibility into the model workflow.

  • Ask for evidence of human review, not just a statement that AI tools were used responsibly.
  • Require clear ownership for fixing defects found after delivery, including timelines.
  • Check whether generated code introduces unsafe defaults, weak input handling, or over-permissive access patterns.
  • Validate that dependency selection and update processes are part of the supplier’s controls, not assumed.

Where this guidance breaks down is when the supplier will not provide enough artefacts to distinguish controlled AI assistance from uncontrolled code generation.

Contract terms, acceptance criteria, and exception handling

Tighter oversight often increases procurement and delivery friction, so organisations need to balance speed against the cost of accepting opaque code sources. The practical choice is not between using contractors and avoiding them, but between contractually defined assurance and informal trust. If the code has security impact, acceptance criteria should be explicit: what tests must pass, what defects are blocking, what evidence must be retained, and who signs off on residual risk. Where there is disagreement about whether AI use itself matters, the operational consensus is still forming, but there is broad agreement that the delivery standard should be measurable even if the tooling method is not.

Organisations should also define escalation rules for exceptions. If a supplier cannot provide review evidence or will not remediate serious findings, the right response is to treat the delivery as untrusted until compensating controls are in place. That is especially important when a third party ships code repeatedly, because a single weak control can scale across many releases and many systems.

Standards & Framework Alignment

This section maps relevant standards and security frameworks to the operational risks and controls described in this guidance.

CIS Controls v8 and NIST CSF 2.0 set the governance and control requirements practitioners need to meet.

Framework Control / Reference Relevance
CIS Controls v8 16 — Application Software Security Third-party AI-assisted code needs secure development and review evidence.
Recommendation — Apply Control 16 to require secure coding, testing, and review evidence before acceptance.
NIST CSF 2.0 GV.SC-01 — Cyber Supply Chain Risk Management The issue is governance of externally sourced code and supplier accountability.
PR.DS-01 — Data-at-Rest Protection Externally produced code can expose secrets, data paths, and unsafe handling patterns.
DE.CM-08 — Vulnerability Monitoring AI-assisted code should still be tested and monitored for introduced weaknesses.
Recommendation — Use GV.SC-01 to define supplier security requirements and acceptance evidence. Use PR.DS-01 to check that supplied code does not weaken data protection controls. Use DE.CM-08 to validate supplied code through security testing and vulnerability checks.

Practitioner Guidance

What to prioritise: Put the evidence requirement ahead of the tool debate. The most useful question is not whether a contractor used AI, but whether the delivered code can be independently trusted through review, testing, and traceability.

Decision rule: If a supplier cannot show how security issues are detected and fixed before handover, treat the delivery as incomplete rather than “done.” Organisations that accept vague assurances usually inherit the debugging and remediation cost later, when context is thinner and the blast radius is larger.

What good looks like: Security teams can tie each external delivery to named review steps, test artefacts, defect ownership, and a clear acceptance decision. That gives procurement, engineering, and security a shared basis for rejecting risky output without arguing about which model produced it.

Practitioner takeaway: AI-generated code from third parties should be governed as supply-chain risk, with proof of control required at acceptance rather than assumed after deployment.