Use the Prisma Cloud Plugin for IntelliJ IDEA
With the Prisma Cloud Enterprise edition license, you can install the IntelliJ IDEA plugin that enables you to check Infrastructure-as-Code (IaC) templates and deployment files against Prisma Cloud IaC policies, within your integrated development environment (IDE). The following steps show how simple it is to install and check your IaC templates and files for potential security misconfigurations.
If you were using version 1.2 or earlier of the Prisma Cloud plugin for IntelliJ IDEA, you must update the plugin to version 1.3 or later. Use the instructions in this section to set up the plugin with the updated Prisma Cloud API URL and enter the credentials that are required to authenticate to Prisma Cloud.
Install the Prisma Cloud Plugin for IntelliJ
The Prisma Cloud plugin supports IntelliJ IDEA version 2016.2 and above.
- In IntelliJ IDEA, select(on macOS, selectFileSettingsPlugins).PreferencesPlugins
- On thePluginspage, selectMarketplaceand search forPrisma Cloud.
- Installthe plugin.Restart the IDE and verify that the Prisma Cloud plugin displays in the list ofInstalledplugins.
Configure the Prisma Cloud Plugin for IntelliJ
After you install the plugin, you must provide the Prisma Cloud API URL and Prisma Cloud access key information to authenticate and start scanning you IaC templates. If your access key changes, you’ll need to update the access key information in this configuration.
- In IntelliJ IDEA, select(on macOS, selectSettingsToolsPrisma Cloud PluginPreferencesToolsPrisma Cloud Plugin
- Enter the following information to set up the plugin.
- 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. Replaceappin the URL withapiand enter it here. Refer to the Prisma Cloud REST API Reference, which is accessible from the Help Center within the Prisma Cloud web interface for more details.
- Access Key.The access key enables programmatic access to Prisma Cloud. If you do not have a key, you must Create and Manage Access Keys.
- Secret Key.You should have saved this secret key when you generated it. You cannot view it on the Prisma Cloud web interface.
Scan Using the Prisma Cloud Plugin for IntelliJ
Now, you are ready to scan your templates and view the results before you check it in to the repository or pipeline.
You must have a Prisma Cloud Enterprise edition license and valid credentials to scan IaC templates.
- Scan the files for insecure configurations.Right-click to scan your template file or folder in the IDEAProjectwindow and selectPrisma Scan.
- View the results of the scan in theScan Resulttool window.The title of the Scan Result window includes the date and time of the scan. For each scan, a new scan result window is added. The tab situated furthest to the right displays the results of the latest scan.If the scan detects no potential issues, the message displays as follows:If the scan detects any policy violations, the scan result displays the following details for each violation.
By default, the results are sorted by severity. You can sort theScan Resultusing the policy name also.
- Name of the violated policy
- Severity of the violation