A developer accepts an AI code assistant's suggested function that parses user input. What should the pipeline require before this code is merged?
Show the answer
Correct answerB. Apply the same peer review and static analysis as human-written code
AWhy not this: Notifying the vendor gives no security assurance about the code itself.
BWhy this is right: Generated code is untrusted, so review and static analysis catch insecure suggestions before merge.
CWhy not this: Generated documentation does not verify security, and skipping testing leaves flaws undetected.
DWhy not this: Public training data includes vulnerable code, so suggestions can reproduce insecure patterns.
AI-generated code is untrusted output and can contain injection flaws, insecure defaults or outdated patterns. It must pass the same peer review and static analysis as any other code. Training on public code does not make suggestions secure, because public code includes vulnerable examples.