End-of-Life (EoL)
Serverless Defender (auto-protect)
Serverless auto-protect lets you automatically add the Serverless Defender to the AWS Lambda functions deployed in your account.
Prisma Cloud uses the AWS API to deploy the Serverless Defender as a Lambda layer based on the auto-protect rules.
It is an additional option for deploying the Serverless Defender, on top of manually adding it as a dependency or adding it as a Lambda layer.
Serverless auto-protect supports the following runtimes:
- Node.js 10.x
- Python 2.7, 3.6, and 3.7
Limitations
Auto-protect is implemented with a layer.
AWS Lambda has a limit of five layers per function.
If your functions have mutiple layers, and they might exceed the layer limit with auto-protect, consider protecting them with the embedded option.
Required permissions
Prisma Cloud needs the following permissions to automatically protect Lambda functions in your AWS account.
Add the following policy to an IAM user or role:
{ "Version": "2012-10-17", "Statement": [ { "Sid": "PrismaCloudServerlessAutoProtect", "Effect": "Allow", "Action": [ "lambda:PublishLayerVersion", "lambda:UpdateFunctionConfiguration", "lambda:GetLayerVersion", "lambda:GetFunctionConfiguration", "iam:SimulatePrincipalPolicy" ], "Resource": "*" } ] }
Serverless auto-protect rules
To secure one or multiple AWS Lambda functions using serverless auto-protect:
- Define a serverless protection runtime policy.
- Define a serverless CNAF policy.
- Add a serverless auto-protect rule.
Defining your runtime protection policy
Prisma Cloud ships with a default runtime policy for all serverless functions that blocks all processes from running except the main process.
This default policy protects against command injection attacks.
You can customize the policy with additional rules.
By default, new rules apply to all functions (*), but you can target them to specific functions by function name.
When functions are invoked, they connect to Compute Console and retrieve the latest policy.
To ensure that functions start executing at time=0 with your custom policy, you must predefine the policy.
Predefined policy is embedded into your function along with the Serverless Defender by way of the TW_POLICY environment variable.
- Log into Prisma Cloud Console.
- Go toDefend > Runtime > Serverless Policy.
- ClickAdd rule.
- In theGeneraltab, enter a rule name.
- (Optional) Target the rule to specific functions.InFunctions, enter a function name. Use pattern matching to refine how the rule is applied.
- Set the rule parameters in theProcesses,Networking, andFile Systemtabs.
- ClickSave.
Defining your serverless CNAF policy
Prisma Cloud lets you protect your serverless functions against application layer attacks by utlizing the serverless Cloud Native Application Firewall (CNAF).
By default, the serverless CNAF is disabled. To enable it, add a new serverless CNAF rule.
- Log into Prisma Cloud Console.
- Go toDefend > Firewalls > Cloud Native Application Firewall > Serverless.
- ClickAdd rule.
- In theGeneraltab, enter a rule name.
- (Optional) Target the rule to specific functions.InFunctions, enter a function name. Use pattern matching to refine how the rule is applied.
- Set the protections you want to apply (SQLi,CMDi,Code injection,XSS,LFI).
- ClickSave.
Add a serverless auto-protect rule
The serverless auto-protect rules let you specify which functions you want to protect.
You can define a specific account by referencing the relevant credential, region, function pattern name, and runtimes.
Each auto-protect rule is evaluated separately.
- Open Compute Console, and go toManage > Defenders > Deploy > Serverless Auto-Protect.
- Click onAdd rule.
- In the dialog, enter the following settings:
- Choose the rule name.
- InProvider- only AWS is supported.
- Specify a region.
- Specify a console name.
- Select or create credentials so that Prisma Cloud can access your account.
- AWS — Specify either an IAM user credential (access key ID and secret access key) or IAM role.
- Specify the functions.Wildcards are supported.
- Specify the runtimes.
- ClickAdd.
- The new rule should now appear in theRulestable.
- Click onApply.By default, the serverless auto-protect rules are evaluated every 24 hours.
Most Popular
Recommended For You
Recommended Videos
Recommended videos not found.