* [Blog](https://origin-researchcenter.paloaltonetworks.com/blog) * [Cloud Security](https://origin-researchcenter.paloaltonetworks.com/blog/cloud-security/) * [Application Security](https://origin-researchcenter.paloaltonetworks.com/blog/cloud-security/category/application-security/) * Secure AI-Generated Code ... # Secure AI-Generated Code in Claude Code and Cursor with Cortex Cloud [](https://www.facebook.com/sharer/sharer.php?u=https%3A%2F%2Forigin-researchcenter.paloaltonetworks.com%2Fblog%2Fcloud-security%2Fcortex-cloud-secure-ai-generated-code-claude-code-cursor%2F) [](https://twitter.com/share?text=Secure+AI-Generated+Code+in+Claude+Code+and+Cursor+with+Cortex+Cloud&url=https%3A%2F%2Forigin-researchcenter.paloaltonetworks.com%2Fblog%2Fcloud-security%2Fcortex-cloud-secure-ai-generated-code-claude-code-cursor%2F) [](https://www.linkedin.com/shareArticle?mini=true&url=https%3A%2F%2Forigin-researchcenter.paloaltonetworks.com%2Fblog%2Fcloud-security%2Fcortex-cloud-secure-ai-generated-code-claude-code-cursor%2F&title=Secure+AI-Generated+Code+in+Claude+Code+and+Cursor+with+Cortex+Cloud&summary=&source=) [](https://www.paloaltonetworks.com//www.reddit.com/submit?url=https://origin-researchcenter.paloaltonetworks.com/blog/cloud-security/cortex-cloud-secure-ai-generated-code-claude-code-cursor/&ts=markdown) \[\](mailto:?subject=Secure AI-Generated Code in Claude Code and Cursor with Cortex Cloud) Link copied By [Cameron Hyde](https://www.paloaltonetworks.com/blog/author/cameron-hyde/?ts=markdown "Posts by Cameron Hyde") and [Ofer Hakimi](https://www.paloaltonetworks.com/blog/author/ofer-hakimi/?ts=markdown "Posts by Ofer Hakimi") Nov 12, 2026 3 minutes [Application Security](https://www.paloaltonetworks.com/blog/cloud-security/category/application-security/?ts=markdown) [Code Security](https://www.paloaltonetworks.com/blog/cloud-security/category/code-security/?ts=markdown) [Uncategorized](https://www.paloaltonetworks.com/blog/category/uncategorized/?ts=markdown) [Anthropic](https://www.paloaltonetworks.com/blog/tag/anthropic/?ts=markdown) [AppSec](https://www.paloaltonetworks.com/blog/tag/appsec/?ts=markdown) [Cursor](https://www.paloaltonetworks.com/blog/tag/cursor/?ts=markdown) [Secure coding](https://www.paloaltonetworks.com/blog/tag/secure-coding/?ts=markdown) AI coding assistants are accelerating software development by [17x](https://www.ftc.gov/system/files/ftc_gov/pdf/musolffdemireryang.pdf), yet [45%](https://proceedings.mlr.press/v267/vero25a.html) of AI-generated code introduces security issues. As developers generate more code at greater speed, vulnerabilities, insecure configurations and risky dependencies can enter applications faster than security teams can identify and remediate them. Traditional shift-left security brought vulnerability detection earlier in development, but it still largely focuses on finding and fixing issues after code is written. As AI agents accelerate code generation, security must extend shift-left practices into the code-generation process itself, helping prevent vulnerabilities from being introduced in the first place. ## Introducing Cortex Cloud Integrations with Claude Code and Cursor Cortex CloudTM brings application security directly into Anthropic's Claude Code and Cursor, enabling developers to start secure with security best practices and code scanning built into the AI coding process. Through native integrations powered by the Cortex Cloud AppSec MCP Server and developer tooling, AI coding agents can access enterprise security policies, evaluate software dependencies and run security checks as code is generated. Security becomes part of how code is written, rather than a separate step after development. Developers can focus on building at the speed of AI without having to manage security as a separate task. By equipping coding agents with security intelligence and guardrails, Cortex Cloud delivers a true secure-by-design approach, helping generate more secure code from the start. ## How Cortex Cloud Helps Secure AI-Generated Code Cortex Cloud brings security into three critical moments of AI-assisted coding, helping prevent insecure code from being generated in the first place. ### 1. Generate Code Without Security Weaknesses After a developer submits a prompt, the AI coding agent retrieves Cortex Cloud's SAST secure coding rules through the Cortex Cloud MCP Server before generating code. The agent then applies these rules during code generation to help prevent common software weaknesses (CWEs) from being introduced. For example, when building an API endpoint, the agent can apply security rules for authentication and input validation to help avoid weaknesses such as improper input validation (CWE-20), rather than relying on scans to catch them later. ### 2. Prevent Risky Dependencies from Entering Applications Before installing or importing an open-source package, the AI coding agent uses the Cortex Cloud AppSec MCP Server to check for malicious or suspicious dependencies. If a risk is identified, such as a malicious package impersonating a trusted library, the agent can block installation, explain the risk and recommend a safer alternative, helping prevent compromised dependencies from entering the codebase. ### 3. Scan Code as It's Written As AI agents create or modify files, Cortex Cloud automatically runs security checks before and after the agent writes code. These checks identify exposed secrets, vulnerable open-source packages and infrastructure-as-code (IaC) misconfigurations, helping ensure that coding agents don't introduce insecure code into applications. For instance, if an AI coding agent attempts to write a file containing a hardcoded API key, Cortex Cloud can flag the exposed secret before the file is written. The agent can then remove the credential and retry, with Cortex Cloud scanning the updated code again to verify the issue has been addressed. ![](https://www.paloaltonetworks.com/blog/wp-content/uploads/2026/11/Cortex-MCP-Decision-Tree-scaled.png) Together, these three capabilities help developers build at the speed of AI with security built into the coding process, while giving AppSec teams a way to extend enterprise security standards across AI-assisted development. ## Start Secure with Cortex Cloud Cortex Cloud's native integrations with Claude Code and Cursor bring enterprise security intelligence and guardrails directly into AI-assisted development, helping developers build faster without having to manage security as a separate step. Get started with the Cortex Cloud integrations in the [Claude plugin directory](https://claude.ai/customize/plugins/id/300a692b-81d2-47a5-a52b-3cf2718f08f9%40anthropic-plugin-directory) or [Cursor Marketplace](https://cursor.com/marketplace/palo-alto-networks), or [request a demo](https://www.paloaltonetworks.com/cortex/cloud/demo) to see them in action. *** ** * ** *** ## Related Blogs ### [Application Security](https://www.paloaltonetworks.com/blog/cloud-security/category/application-security/?ts=markdown), [Cloud Security](https://www.paloaltonetworks.com/blog/category/cloud-security/?ts=markdown) [#### Security Theater: Who Cares About Your AppSec Findings?](https://origin-researchcenter.paloaltonetworks.com/blog/cloud-security/vulerability-findings-security-theater/) ### [Application Security](https://www.paloaltonetworks.com/blog/cloud-security/category/application-security/?ts=markdown), [Cloud Security](https://www.paloaltonetworks.com/blog/category/cloud-security/?ts=markdown), [Compliance](https://www.paloaltonetworks.com/blog/cloud-security/category/compliance/?ts=markdown) [#### Security Theater: Don't Hang your Hat on Compliance](https://origin-researchcenter.paloaltonetworks.com/blog/cloud-security/compliance-security-theater/) ### [API Security](https://www.paloaltonetworks.com/blog/cloud-security/category/api-security/?ts=markdown), [Application Security](https://www.paloaltonetworks.com/blog/cloud-security/category/application-security/?ts=markdown), [Cloud Workload Protection Platform](https://www.paloaltonetworks.com/blog/cloud-security/category/cloud-workload-protection-platform/?ts=markdown), [Code Security](https://www.paloaltonetworks.com/blog/cloud-security/category/code-security/?ts=markdown), [Code to Cloud](https://www.paloaltonetworks.com/blog/cloud-security/category/code-to-cloud/?ts=markdown), [Products and Services](https://www.paloaltonetworks.com/blog/category/products-and-services/?ts=markdown) [#### API Security and Threat Intelligence Reduce Attack Surface in Prisma Cloud Workload Protection Release](https://origin-researchcenter.paloaltonetworks.com/blog/cloud-security/api-security-threat-intel-reduce-attack-surface/) ### [AI and Cybersecurity](https://www.paloaltonetworks.com/blog/security-operations/category/ai-and-cybersecurity/?ts=markdown), [Email Security](https://www.paloaltonetworks.com/blog/security-operations/category/email-security/?ts=markdown), [Endpoint security](https://www.paloaltonetworks.com/blog/security-operations/category/endpoint-security/?ts=markdown), [Uncategorized](https://www.paloaltonetworks.com/blog/category/uncategorized/?ts=markdown) [#### Transforming Email Incident Response: Unifying Alert Triage, AI Summaries, and Evasion Analysis with Cortex Advanced Email Security](https://origin-researchcenter.paloaltonetworks.com/blog/security-operations/transforming-email-incident-response-unifying-alert-triage-ai-summaries-and-evasion-analysis-with-cortex-advanced-email-security/) ### [Must-Read Articles](https://www.paloaltonetworks.com/blog/security-operations/category/must-read-articles/?ts=markdown), [News and Events](https://www.paloaltonetworks.com/blog/security-operations/category/news-and-events/?ts=markdown), [Product Features](https://www.paloaltonetworks.com/blog/security-operations/category/product-features/?ts=markdown), [Uncategorized](https://www.paloaltonetworks.com/blog/category/uncategorized/?ts=markdown) [#### Meet Cortex XSIAM 4.0: AI That Knows Your Enterprise](https://origin-researchcenter.paloaltonetworks.com/blog/security-operations/cortex-xsiam-4-0-ai-knows-your-enterprise/) ### [Agent Security](https://www.paloaltonetworks.com/blog/ai-security/category/agent-security/?ts=markdown), [AI Application Security](https://www.paloaltonetworks.com/blog/network-security/category/ai-application-security/?ts=markdown), [AI Governance](https://www.paloaltonetworks.com/blog/ai-security/category/ai-governance/?ts=markdown), [AI Security](https://www.paloaltonetworks.com/blog/cloud-security/category/ai-security/?ts=markdown), [Cybersecurity](https://www.paloaltonetworks.com/blog/category/cybersecurity/?ts=markdown), [Points of View](https://www.paloaltonetworks.com/blog/category/points-of-view/?ts=markdown), [Secure AI Coding](https://www.paloaltonetworks.com/blog/ai-security/category/secure-ai-coding/?ts=markdown) [#### Securing the AI Systems of Tomorrow](https://origin-researchcenter.paloaltonetworks.com/blog/ai-security/securing-the-ai-systems-of-tomorrow/) ### Subscribe to Cloud Security Blogs! Sign up to receive must-read articles, Playbooks of the Week, new feature announcements, and more. ![spinner](https://origin-researchcenter.paloaltonetworks.com/blog/wp-content/themes/panwblog2023/dist/images/ajax-loader.gif) Sign up Please enter a valid email. By submitting this form, you agree to our [Terms of Use](https://www.paloaltonetworks.com/legal-notices/terms-of-use?ts=markdown) and acknowledge our [Privacy Statement](https://www.paloaltonetworks.com/legal-notices/privacy?ts=markdown). Please look for a confirmation email from us. If you don't receive it in the next 10 minutes, please check your spam folder. This site is protected by reCAPTCHA and the Google [Privacy Policy](https://policies.google.com/privacy) and [Terms of Service](https://policies.google.com/terms) apply. {#footer} {#footer} Products and Services * [AI-Powered Network Security Platform](https://www.paloaltonetworks.com/network-security?ts=markdown) * [Secure AI by Design](https://www.paloaltonetworks.com/ai-security?ts=markdown) * [Prisma AIRS](https://www.paloaltonetworks.com/ai-security/prisma-airs?ts=markdown) * [AI Access Security](https://www.paloaltonetworks.com/sase/ai-access-security?ts=markdown) * [Cloud Delivered Security Services](https://www.paloaltonetworks.com/network-security/security-subscriptions?ts=markdown) * [Advanced Threat Prevention](https://www.paloaltonetworks.com/network-security/advanced-threat-prevention?ts=markdown) * [Advanced URL Filtering](https://www.paloaltonetworks.com/network-security/advanced-url-filtering?ts=markdown) * [Advanced WildFire](https://www.paloaltonetworks.com/network-security/advanced-wildfire?ts=markdown) * [Advanced DNS Security](https://www.paloaltonetworks.com/network-security/advanced-dns-security?ts=markdown) * [Enterprise Data Loss Prevention](https://www.paloaltonetworks.com/sase/enterprise-data-loss-prevention?ts=markdown) * [Enterprise IoT Security](https://www.paloaltonetworks.com/network-security/enterprise-device-security?ts=markdown) * [Medical IoT Security](https://www.paloaltonetworks.com/network-security/medical-device-security?ts=markdown) * [Industrial OT Security](https://www.paloaltonetworks.com/network-security/ot-security-solution?ts=markdown) * [SaaS Security](https://www.paloaltonetworks.com/sase/saas-security?ts=markdown) * [Next-Generation Firewalls](https://www.paloaltonetworks.com/network-security/next-generation-firewall?ts=markdown) * [Hardware Firewalls](https://www.paloaltonetworks.com/network-security/hardware-firewall-innovations?ts=markdown) * [Software Firewalls](https://www.paloaltonetworks.com/network-security/software-firewalls?ts=markdown) * [Strata Cloud Manager](https://www.paloaltonetworks.com/network-security/strata-cloud-manager?ts=markdown) * [SD-WAN for NGFW](https://www.paloaltonetworks.com/network-security/sd-wan-subscription?ts=markdown) * [PAN-OS](https://www.paloaltonetworks.com/network-security/pan-os?ts=markdown) * [Panorama](https://www.paloaltonetworks.com/network-security/panorama?ts=markdown) * [Secure Access Service Edge](https://www.paloaltonetworks.com/sase?ts=markdown) * [Prisma SASE](https://www.paloaltonetworks.com/sase?ts=markdown) * [Application Acceleration](https://www.paloaltonetworks.com/sase/app-acceleration?ts=markdown) * [Autonomous Digital Experience Management](https://www.paloaltonetworks.com/sase/adem?ts=markdown) * [Enterprise DLP](https://www.paloaltonetworks.com/sase/enterprise-data-loss-prevention?ts=markdown) * [Prisma Access](https://www.paloaltonetworks.com/sase/access?ts=markdown) * [Prisma Browser](https://www.paloaltonetworks.com/sase/prisma-browser?ts=markdown) * [Prisma SD-WAN](https://www.paloaltonetworks.com/sase/sd-wan?ts=markdown) * [Remote Browser Isolation](https://www.paloaltonetworks.com/sase/remote-browser-isolation?ts=markdown) * [SaaS Security](https://www.paloaltonetworks.com/sase/saas-security?ts=markdown) * [AI-Driven Security Operations Platform](https://www.paloaltonetworks.com/cortex?ts=markdown) * [Cloud Security](https://www.paloaltonetworks.com/cortex/cloud?ts=markdown) * [Cortex Cloud](https://www.paloaltonetworks.com/cortex/cloud?ts=markdown) * [Application Security](https://www.paloaltonetworks.com/cortex/cloud/application-security?ts=markdown) * [Cloud Posture Security](https://www.paloaltonetworks.com/cortex/cloud/cloud-posture-security?ts=markdown) * [Cloud Runtime Security](https://www.paloaltonetworks.com/cortex/cloud/runtime-security?ts=markdown) * [Prisma Cloud](https://www.paloaltonetworks.com/prisma/cloud?ts=markdown) * [AI-Driven SOC](https://www.paloaltonetworks.com/cortex?ts=markdown) * [Cortex XSIAM](https://www.paloaltonetworks.com/cortex/cortex-xsiam?ts=markdown) * [Cortex XDR](https://www.paloaltonetworks.com/cortex/cortex-xdr?ts=markdown) * [Cortex XSOAR](https://www.paloaltonetworks.com/cortex/cortex-xsoar?ts=markdown) * [Cortex Xpanse](https://www.paloaltonetworks.com/cortex/cortex-xpanse?ts=markdown) * [Unit 42 Managed Detection \& Response](https://www.paloaltonetworks.com/unit42/respond/managed-detection-response?ts=markdown) * [Managed XSIAM](https://www.paloaltonetworks.com/cortex/managed-xsiam?ts=markdown) * Observability * [Cortex XCOR](https://www.paloaltonetworks.com/cortex/xcor?ts=markdown) * [Next-Generation Identity Security](https://www.paloaltonetworks.com/idira?ts=markdown) * [Privileged Access Management](https://www.paloaltonetworks.com/idira/human/privileged-access-management?ts=markdown) * [Identity and Access Management](https://www.paloaltonetworks.com/idira/human/identity-and-access-management?ts=markdown) * [Endpoint Privilege Manager](https://www.paloaltonetworks.com/idira/human/endpoint-privilege-manager?ts=markdown) * [Identity Governance](https://www.paloaltonetworks.com/idira/human/identity-governance?ts=markdown) * [Workforce Password Management](https://www.paloaltonetworks.com/idira/human/workforce-password-management?ts=markdown) * [Agentic Identities](https://www.paloaltonetworks.com/idira/agentic?ts=markdown) * [Secrets Management](https://www.paloaltonetworks.com/idira/machine/secrets-management?ts=markdown) * [Unified Secrets Governance](https://www.paloaltonetworks.com/idira/machine/unified-secrets-governance?ts=markdown) * [Application Credentials Delivery](https://www.paloaltonetworks.com/idira/machine/application-credentials-delivery?ts=markdown) * [Vendor Privileged Access](https://www.paloaltonetworks.com/idira/human/vendor-privileged-access?ts=markdown) * [Threat Intel and Incident Response Services](https://www.paloaltonetworks.com/unit42?ts=markdown) * [Prepare for Emerging Risks](https://www.paloaltonetworks.com/unit42/prepare-for-emerging-risks/continuous-frontier-ai-defense?ts=markdown) * [Strengthen Your Defenses](https://www.paloaltonetworks.com/unit42/strengthen-your-defenses?ts=markdown) * [Build Your Security Strategy](https://www.paloaltonetworks.com/unit42/build-your-security-strategy?ts=markdown) * [Understand the Adversary](https://www.paloaltonetworks.com/unit42/threat-intelligence?ts=markdown) * [Respond to a Cyber Attack](https://www.paloaltonetworks.com/unit42/respond?ts=markdown) Company * [About Us](https://www.paloaltonetworks.com/about-us?ts=markdown) * [Careers](https://jobs.paloaltonetworks.com/en/) * [Contact Us](https://www.paloaltonetworks.com/company/contact-sales?ts=markdown) * [Corporate Responsibility](https://www.paloaltonetworks.com/about-us/corporate-responsibility?ts=markdown) * [Customers](https://www.paloaltonetworks.com/customers?ts=markdown) * [Investor Relations](https://investors.paloaltonetworks.com/) * [Location](https://www.paloaltonetworks.com/about-us/locations?ts=markdown) * [Newsroom](https://www.paloaltonetworks.com/company/newsroom?ts=markdown) Popular Links * [Blog](https://www.paloaltonetworks.com/blog/?ts=markdown) * [Communities](https://www.paloaltonetworks.com/communities?ts=markdown) * [Content Library](https://www.paloaltonetworks.com/resources?ts=markdown) * [Cyberpedia](https://www.paloaltonetworks.com/cyberpedia?ts=markdown) * [Event Center](https://events.paloaltonetworks.com/) * [Manage Email Preferences](https://start.paloaltonetworks.com/preference-center) * [Products A-Z](https://www.paloaltonetworks.com/products/products-a-z?ts=markdown) * [Product Certifications](https://www.paloaltonetworks.com/legal-notices/trust-center/certifications?ts=markdown) * [Report a Vulnerability](https://www.paloaltonetworks.com/security-disclosure?ts=markdown) * [Sitemap](https://www.paloaltonetworks.com/sitemap?ts=markdown) * [Tech Docs](https://docs.paloaltonetworks.com/) * [Unit 42](https://unit42.paloaltonetworks.com/) * [Do Not Sell or Share My Personal Information](https://panwedd.exterro.net/portal/dsar.htm?target=panwedd) ![Palo Alto Networks Logo](https://www.paloaltonetworks.com/etc/clientlibs/clean/imgs/pan-logo-dark.svg) * [Privacy](https://www.paloaltonetworks.com/legal-notices/privacy?ts=markdown) * [Trust Center](https://www.paloaltonetworks.com/legal-notices/trust-center?ts=markdown) * [Terms of Use](https://www.paloaltonetworks.com/legal-notices/terms-of-use?ts=markdown) * [Documents](https://www.paloaltonetworks.com/legal?ts=markdown) Copyright © 2026 Palo Alto Networks. All Rights Reserved * [![Youtube](https://www.paloaltonetworks.com/etc/clientlibs/clean/imgs/social/youtube-black.svg)](https://www.youtube.com/user/paloaltonetworks) * [![Podcast](https://www.paloaltonetworks.com/content/dam/pan/en_US/images/icons/podcast.svg)](https://www.paloaltonetworks.com/podcasts/threat-vector?ts=markdown) * [![Facebook](https://www.paloaltonetworks.com/etc/clientlibs/clean/imgs/social/facebook-black.svg)](https://www.facebook.com/PaloAltoNetworks/) * [![LinkedIn](https://www.paloaltonetworks.com/etc/clientlibs/clean/imgs/social/linkedin-black.svg)](https://www.linkedin.com/company/palo-alto-networks) * [![Twitter](https://www.paloaltonetworks.com/etc/clientlibs/clean/imgs/social/twitter-x-black.svg)](https://twitter.com/PaloAltoNtwks) * EN Select your language