Connect VScode with Prisma Cloud Application security
Table of Contents
Prisma Cloud Enterprise Edition
Expand all | Collapse all
-
- Quick Start for Beginners
- Enable Application Security on Prisma Cloud
- Application Security Licenses
- Manage Roles and Permissions
- Generate Access Key
-
-
- Add Azure Repos to Prisma Cloud Application Security
- Add Bitbucket to Prisma Cloud Application Security
- Add Bitbucket Server to Prisma Cloud Application Security
- Add GitHub to Prisma Cloud Application Security
- Add GitHub Server to Prisma Cloud Application Security
- Add GitLab Self-Managed to Prisma Cloud Application Security
- Add GitLab to Prisma Cloud Application Security
-
- Add AWS Code Build to Prisma Cloud Application Security
- Add CircleCI to Prisma Cloud Application Security
- Add Checkov to Prisma Cloud Application Security
- Add GitHub Actions to Prisma Cloud Application Security
- Add Jenkins to Prisma Cloud Application Security
- Add Terraform Cloud (Sentinel)
- Add Terraform Cloud (Run Tasks)
- Add Terraform Enterprise (Sentinel)
- Add Terraform Enterprise (Run Tasks)
-
- Pre-receive Hooks
- Set up IaC Tag and Trace
- Setup Drift Detection
- Secrets Scanning
- Manage Workspaces
- Create and Manage Code Category views
Connect VScode with Prisma Cloud Application security
Integrating VScode (Visual Studio Code) with Prisma Cloud Application security makes it possible for you to identify misconfigurations before you commit your code, and avoid pull requests that can potentially fail builds due to undetected misconfigurations. Using Checkov, a code analysis tool that scans Infrastructure-as-code (IaC) files from frameworks such as Terraform_plan, CloudFormation, Azure Resource Manager (ARM), Secrets, Serverless, Dockerfile (only code), and Kubernetes on VScode (Visual Studio Code) gives you immediate detection of misconfigurations and inline code fixes.
Apart from the scanning the default Prisma Cloud policies, Checkov also scans for policy violations in custom policies that you can configure during custom build-time checks.
- Verify the pre-requisites.
- Access Key.The access key enables access to Prisma Cloud. If you do not have the access key, refer to generate access key. Every IDE user, who needs access to the Prisma Cloud console requires the Developer (minimum) role with access to specific repositories. The Developer role provides view and access toFix and Submitchanges to the relevant VCS repositories. If a user has more than one Prisma Cloud Role assigned to them, the access key associated with the default role is used when accessing Prisma Cloud.
- Secret Key.The secret key generates with your access key. Save your secret key when you generate it, as you cannot view it again on Prima Cloud.
- Python Installation.Checkov needs Python to run, install Python version 3.7 or above. If you have a versatile working environment of both pip and virtual environment install Pipenv or Docker.
- Prisma Cloud API URL.When you configure Checkov plugin to VScode (Visual Studio Code) you need Prisma Cloud API URL. The URL for Prisma Cloud varies depending on the region and cluster on which your tenant is deployed. The tenant provisioned for you is, for example, https://app2.prismacloud.io or https://app.eu.prismacloud.io. For Prisma Cloud API URL, replaceappin the URL withapi.
- Prisma Cloud IP addresses and hostnames that need to be allowed.See enable access to the Prisma Cloud Console for what IP addresses and hostnames for Application security need to be allowed for successfully integrating with Prisma Cloud.
- Access VScode (Visual Studio Code) on Prisma Cloud Application security.
- SelectSettings > Code & Build Provider > Add.
- SelectVScode.You will be directed to Visual Studio Code Marketplace.
- Install and Enable Checkov on VScode.
- SelectInstall > Continue > Open Visual Studio Codeand then selectInstallto install Checkov Extension on VScode (Visual Studio Code).You can optionally choose to access VScode (Visual Studio Code) directly from your system and access Checkov plugin fromExtensionsand then search for the Checkov plugin to install.
- Configure Checkov plugin on VScode (Visual Studio Code).
- SelectExtension > Extension Settings.
- Add your Prisma Cloud application API forCheckov:Prisma URLfor example .
- Add your Prisma Cloud access key and secret key as"Access Key::Secret Key"forCheckov:Token.You can optionally choose to add a custom CA-Certificate and enter the certificate path to configure forCheckov:Certificate. Ensure your CA-Certificate is in ".pem" format.A Checkov scan runs each time you access a file on VScode (Visual Studio Code).
- Fix scanned files for policy misconfiguration in build-time checks.
- Select a file. Checkov runs an immediate scan on the file.
- View the highlighted policy misconfiguration inline.
- SelectQuick Fixto fix the misconfiguration inline.You can optionally selectView Problemto know more about the misconfiguration.Each misconfiguration has details on the policy violation and guidelines to fix the policy. See here to know more about each of misconfigurations in all supported environments. For custom policy and out-of-the-box misconfigurations you can access the Prisma Cloud Administrator console to know more.
Troubleshoot Logs
In case of a Checkov scan fail, you can access Checkov logs to know see more details.
- Access VScode (Visual Studio Code)Command Paletteor enterCtrl + Shift + Pfor Windows orCmd + Shift + Pfor Mac and then run commandDeveloper: Open Extensions Logs Folder.
- AccessBridgecrew.checkov > checkov.logto see the log details.