Ai generated code review in banking? | Moring
Banks should review code written by AI through the same gates as any other change: a named human reviewer who did not author the prompt, evidence that tests passed, and a recorded approval before the change merges. Federal model risk guidance explicitly leaves generative tools outside its formal scope while expecting banks to govern them under existing risk-management practice, so the review record, not the tool's reputation, is what an examiner sees [7]. Running the assistant as local AI inside the bank's perimeter makes those records easier to produce and inspect [1].
On this page
Short answer
Banks should review code written by AI through the same gates as any other change: a named human reviewer who did not author the prompt, evidence that tests passed, and a recorded approval before the change merges. Federal model risk guidance explicitly leaves generative tools outside its formal scope while expecting banks to govern them under existing risk-management practice, so the review record, not the tool's reputation, is what an examiner sees [7]. Running the assistant as local AI inside the bank's perimeter makes those records easier to produce and inspect [1].
How it works
Reviewing code that a model wrote starts from a simple regulator position: the tool does not carry the accountability. SR 26-2, the 2026 update to federal model risk guidance, explicitly places generative AI outside its formal scope while making clear that institutions are still expected to govern these tools under their existing risk-management practices [7]. A bank therefore cannot point to the coding assistant as a mitigating control; it has to show that each change itself was reviewed, tested, and approved by people whose names appear in the record.
The review design should borrow the gated-pipeline pattern that on-premises deployments already use. In a typical regulated architecture, each stage of a four-stage pipeline ends at a gate that produces auditable artifacts: benchmark results, a bias audit, and a model card at validation, then an independent sign-off and risk-tier classification at approval by the model risk team [2]. Translated to code review, the artifacts are equally concrete: which model produced the diff, whether the prompt carried customer data, what tests ran, who reviewed, and who approved. A change that cannot produce these artifacts does not merge.
Three checks deserve standing status in the review template. First, prompt provenance: does the change trace to an approved tool, and did anyone paste customer information into the prompt, an act that pulls the data into the institution's information-security program regardless of intent [7]? Second, data handling: the reviewer confirms the code touches only the systems and fields it is authorized to touch, under the same access-control expectations applied to any system holding customer information [3]. Third, reviewer independence: the approver should not be the person who engineered the prompt, preserving the effective-challenge habit that model risk guidance such as SR 11-7 has long required [1].
The OCC's supervisory framework for banks' use of advanced, agentic systems gives examiners the vocabulary for what adequate review looks like: defined purpose and permitted use, risk classification by criticality, human-in-the-loop controls, testing, and documentation that makes actions auditable [6]. AI-written code sits squarely in that frame. A merge without a human review record is an undocumented action by a non-human actor; a merge with one is ordinary change management of the kind the FFIEC IT handbook's development expectations already describe [2].
Running the assistant locally changes the mechanics of review, not its standard. On-premises deployment keeps the code, the prompts, the documents the tools read, and the logs they produce inside infrastructure the bank controls, which makes the system easier to audit and easier to explain to examiners [1]. The alternative, routing review evidence through a vendor's cloud, creates a data-egress vector that security reviewers identify immediately, because the telemetry generated by policy checks leaves the perimeter along with the data [5]. Enforcement and evidence belong inside the boundary.
Testing stays non-negotiable regardless of where the model runs. The safeguards that apply to any system holding customer information, access control, encryption, logging, change management, and testing, apply to the model server and the build pipeline exactly as they do to core banking systems [3]. AI-generated code adds one requirement: the generator itself should sit on the technology inventory with a version, a risk tier, and an owner, so a defective model update can be traced to every change it influenced.
The failure mode is familiar. Banks that assume a popular assistant produces reviewable code, or that a locally hosted model is exempt from scrutiny because it never leaves the data center, both get the same examiner answer: use of a third party does not diminish or remove the bank's responsibility for safe and sound operation, including the security of customer information [4]. Running a model yourself does not remove the rules; it moves the work [3]. The work lands in the review queue.
A bank that operationalizes this treats every AI-assisted change as change management with two extra fields: the model that produced the code and the prompt history behind it. With those fields populated, an examiner can walk from a production defect back to the diff, the review, the approver, and the tool version without leaving the bank's own logs [1]. Without them, the same walk dead-ends at a vendor's assurance that the model is enterprise-grade. The first posture passes; the second does not.
Frequently asked questions
What does a defensible AI code review look like at a bank?
A defensible review treats the change, not the tool, as the object of scrutiny: a named human reviewer who did not author the prompt, test evidence attached to the merge, and a recorded approval from someone other than the prompt's engineer. The record should also name the model and tool version that produced the code, because a defective model update must be traceable to every change it influenced. Federal guidance leaves generative tools outside formal model risk scope but holds banks to their existing risk-management practices, which is exactly the standard this record demonstrates.
If the coding model runs inside our own data center, is it still governed?
Yes. Running a model yourself does not remove the rules; it moves the work onto your own team. The same safeguards that apply to any system holding customer information, access control, encryption, logging, change management, testing, and incident response, apply to the model server and the build pipeline. On-premises deployment does help in one concrete way: the code, the prompts, and the logs stay inside infrastructure the bank controls, so the review evidence is yours to produce rather than something to request from a vendor.
What should the review record contain for an AI-assisted change?
Four things: the identity of the tool and model version behind the diff, a statement of whether the prompt contained customer data or credentials, the test evidence attached to the change, and the names of the reviewer and approver, with the approver independent of whoever engineered the prompt. Regulators evaluating banks' use of advanced agentic systems look for defined purpose and permitted use, human-in-the-loop controls, testing, and documentation that makes each action auditable, and this record supplies all four at once.
Which regulatory expectations apply to AI-generated code at a bank?
The 2026 model risk guidance update, SR 26-2, places generative AI outside its formal scope while expecting banks to govern it under existing risk-management practices, so there is no AI-specific checklist but also no exemption. The OCC's supervisory framework for advanced AI use adds defined purpose, risk classification, human-in-the-loop controls, testing, and auditability as the components examiners assess. In practice, AI-written code is judged as ordinary change management with added provenance: which model, which prompt, and which human signed off on the result.