Microsoft patents system to block fake code suggested by AI
Microsoft describes a system that checks code packages recommended by AI models before developers use them. If the suggested package does not exist or is not found in a trusted library, the system automatically isolates or blocks it to prevent security risks.
In the filing’s own words
Techniques are described herein that are capable of triggering a security action based on an AI-generated recommendation of a code package. An AI model is caused to recommend an identified code package to resolve a coding problem by providing an AI prompt to the AI model. The AI prompt requests identification of a code package that is written in a programming language and that comprises a designated functionality that resolves the coding problem. A response to the AI prompt is received from the AI model. The response identifies the identified code package. Based at least on confirmation of non-existence of the identified code package or absence of publication of the identified code package in a verified code repository or a value of an attribute of the identified code package satisfying a criterion associated with non-trustworthiness, automatic execution of a security action with regard to the identified code package is triggered.
What exactly they claim (claim 1)
1. A system comprising: a processor system; and a memory that stores computer-executable instructions that are executable by the processor system to at least: cause an artificial intelligence (AI) model to recommend an identified code package to resolve a coding problem by providing an AI prompt to the AI model, wherein the AI prompt requests that the AI model identify a code package that is written in a programming language and that comprises a designated functionality that resolves the coding problem; receive a response to the AI prompt from the AI model, the response comprising a package identifier that identifies the identified code package; in response to receipt of the response, which comprises the package identifier that identifies the identified code package, from the AI model, analyze a plurality of code packages for non-existence of the identified code package or absence of publication of the identified code package in a verified code repository; and in response to receipt of the response, which comprises the package identifier that identifies the identified code package, from the AI model, based at least on confirmation of the non-existence of the identified code package or the absence of the publication of the identified code package in the verified code repository, quarantine the identified code package in a sandbox or block access to the identified code package.
Facts
- Company
- Microsoft (Microsoft Technology Licensing, LLC)
- Official title
- Triggering a security action based on an AI-generated code package recommendation
- Patent number
- US12737477B2
- Application number
- 18622986
- Filed
- Mar 31, 2024
- Granted
- Sep 15, 2026
- Inventors
- 2
- Claims
- 22
Classified under
G06F 21/577 Physics & computingG06F 8/36 Physics & computingG06F 21/563 Physics & computingMore from Microsoft in Security & privacy
- Microsoft patents system to call 911 for others during video calls Sep 22, 2026
- Microsoft patents one-way data flow to block network attacks Sep 10, 2026
- Microsoft patents voice coding that hides speaker identity for secure calls Sep 17, 2026
- Microsoft patents security checks for AI chats using user and model profiles Oct 1, 2026
- Microsoft patents math model to spot ransomware attacks in real time Sep 1, 2026
Summaries are simplified from the filing’s own abstract and first claim. A patent filing is not a product announcement.
Patent data and drawings: U.S. Patent and Trademark Office (USPTO). Nebula is not affiliated with or endorsed by the USPTO.