How to set up Serverless function scanning in Prisma Cloud Compute
7824
Created On 12/15/21 20:24 PM - Last Modified 12/06/22 01:08 AM
Objective
The objective of this article is to show you how to set up Serverless function scanning in Prisma Cloud Compute.
Environment
- Prisma Cloud Compute SaaS version
- Prisma Cloud Compute Self-Hosted version 22.01 and above
Procedure
Follow the following steps to create a policy in AWS for Serverless function scanning:
- Search IAM in the search bar
- Select Policies from Access Management options list on the left-hand side.
- Select Add Policy
- Select JSON tab and paste the following JSON to create the Policy.
{
"Version": "2012-10-17",
"Statement": [
{
"Sid": "PrismaCloudComputeServerlessAutoProtect",
"Effect": "Allow",
"Action": [
"iam:SimulatePrincipalPolicy",
"iam:ListAttachedRolePolicies",
"iam:GetPolicy",
"iam:GetPolicyVersion",
"iam:ListRolePolicies",
"iam:GetRole",
"iam:GetRolePolicy",
"lambda:GetFunction",
"lambda:GetFunctionConfiguration",
"lambda:GetLayerVersion",
"lambda:ListFunctions",
"lambda:PublishLayerVersion",
"lambda:UpdateFunctionConfiguration",
"lambda:ListLayerVersions",
"lambda:ListLayers",
"lambda:DeleteLayerVersion",
"kms:decrypt"
],
"Resource": "*"
}
]
}
- Once the Policy is created, go to the user to whom you want to attach this policy to.
- After you have selected that user, select Add Permissions button.
- Select Attach existing policies directly tab
- Search for the policy you created in step 4 and attach it to the user.
- Go to the Prisma Cloud Compute console.
- Go to the following path:
Defend > Vulnerabilities > Functions > Functions
- Click Add the first item button and you will see the following
- Add the credentials of the AWS service user.
- Once the scope is added, click the green Save button.
- Go to the following path to view the scan results of the Serverless function scan
Monitor > Vulnerabilities > Functions > Scanned functionsAdditional Information
Refer to the documentation for the Serverless function scanning.
Note for SaaS version users:
IAM roles cannot be used in Prisma Cloud serverless scanning as the Console is not hosted within AWS for Enterprise Edition.