Serverless functions compliance checks
Table of Contents
Expand all | Collapse all
-
- Getting started
- System Requirements
- Cluster Context
-
- Prisma Cloud Container Images
- Kubernetes
- Deploy the Prisma Cloud Console on Amazon ECS
- Console on Fargate
- Onebox
- Alibaba Cloud Container Service for Kubernetes (ACK)
- Azure Container Service (ACS) with Kubernetes
- Azure Kubernetes Service (AKS)
- Amazon Elastic Kubernetes Service (EKS)
- IBM Kubernetes Service (IKS)
- OpenShift v4
-
- Defender Types
- Manage your Defenders
- Redeploy Defenders
- Uninstall Defenders
-
- Deploy Orchestrator Defenders on Amazon ECS
- Automatically Install Container Defender in a Cluster
- Deploy Prisma Cloud Defender from the GCP Marketplace
- Deploy Defenders as DaemonSets
- VMware Tanzu Application Service (TAS) Defender
- Deploy Defender on Google Kubernetes Engine (GKE)
- Google Kubernetes Engine (GKE) Autopilot
- Deploy Defender on OpenShift v4
-
- Agentless Scanning Modes
-
- Onboard AWS Accounts for Agentless Scanning
- Onboard Azure Accounts for Agentless Scanning
- Configure Agentless Scanning for Azure
- Onboard GCP Accounts for Agentless Scanning
- Configure Agentless Scanning for GCP
- Onboard Oracle Cloud Infrastructure (OCI) Accounts for Agentless Scanning
- Configure Agentless Scanning for Oracle Cloud Infrastructure (OCI)
- Agentless Scanning Results
-
- Rule ordering and pattern matching
- Backup and Restore
- Custom feeds
- Configuring Prisma Cloud proxy settings
- Prisma Cloud Compute certificates
- Configure scanning
- User certificate validity period
- Enable HTTP access to Console
- Set different paths for Defender and Console (with DaemonSets)
- Authenticate to Console with Certificates
- Configure custom certs from a predefined directory
- Customize terminal output
- Collections
- Tags
- Logon settings
- Reconfigure Prisma Cloud
- Subject Alternative Names
- WildFire Settings
- Log Scrubbing
- Clustered-DB
- Permissions by feature
-
- Logging into Prisma Cloud
- Integrating with an IdP
- Integrate with Active Directory
- Integrate with OpenLDAP
- Integrate Prisma Cloud with Open ID Connect
- Integrate with Okta via SAML 2.0 federation
- Integrate Google G Suite via SAML 2.0 federation
- Integrate with Azure Active Directory via SAML 2.0 federation
- Integrate with PingFederate via SAML 2.0 federation
- Integrate with Windows Server 2016 & 2012r2 Active Directory Federation Services (ADFS) via SAML 2.0 federation
- Integrate Prisma Cloud with GitHub
- Integrate Prisma Cloud with OpenShift
- Non-default UPN suffixes
- Compute user roles
- Assign roles
-
- Prisma Cloud Vulnerability Feed
- Scanning Procedure
- Vulnerability Management Policies
- Vulnerability Scan Reports
- Scan Images for Custom Vulnerabilities
- Base images
- Vulnerability Explorer
- CVSS scoring
- CVE Viewer
-
- Configure Registry Scans
- Scan Images in Alibaba Cloud Container Registry
- Scan Images in Amazon Elastic Container Registry (ECR)
- Scan images in Azure Container Registry (ACR)
- Scan Images in Docker Registry v2 (including Docker Hub)
- Scan Images in GitLab Container Registry
- Scan images in Google Artifact Registry
- Scan Images in Google Container Registry (GCR)
- Scan Images in Harbor Registry
- Scan Images in IBM Cloud Container Registry
- Scan Images in JFrog Artifactory Docker Registry
- Scan Images in Sonatype Nexus Registry
- Scan images in OpenShift integrated Docker registry
- Scan Images in CoreOS Quay Registry
- Trigger Registry Scans with Webhooks
- Configure VM image scanning
- Configure code repository scanning
- Malware scanning
- Windows container image scanning
- Serverless Functions Scanning
- VMware Tanzu Blobstore Scanning
- Scan App-Embedded workloads
- Troubleshoot Vulnerability Detection
-
- Compliance Explorer
- Enforce compliance checks
- CIS Benchmarks
- Prisma Cloud Labs compliance checks
- Serverless functions compliance checks
- Windows compliance checks
- DISA STIG compliance checks
- Custom compliance checks
- Trusted images
- Host scanning
- VM image scanning
- App-Embedded scanning
- Detect secrets
- OSS license management
-
- Alert Mechanism
- AWS Security Hub
- Cortex XDR alerts
- Cortex XSOAR alerts
- Email alerts
- Google Cloud Pub/Sub
- Google Cloud Security Command Center
- IBM Cloud Security Advisor
- JIRA Alerts
- PagerDuty alerts
- ServiceNow alerts for Security Incident Response
- ServiceNow alerts for Vulnerability Response
- Slack Alerts
- Splunk Alerts
- Webhook alerts
- API
Serverless functions compliance checks
Prisma Cloud Labs has developed compliance checks for serverless functions.
Currently, only AWS Lambda is supported.
In AWS Lambda, every function has an execution role.
Execution roles are identities with permission policies that control what functions can and cannot do in AWS.
When you create a function, you specify an execution role.
When the function is invoked, it assumes this role.
Resource
Specifies the objects to which the permission policy applies.
Resources are specified with ARNs.
ARNs let you unambiguously specify a resource across all of AWS.
ARNs have the following format:
arn:partition:service:region:account-id:resource
Where:
- service — Identifies the AWS product, such as Amazon S3, IAM, or CloudWatch Logs.
- resource — Identies the objects in the service. It often includes the resource type, followed by the resource name itself. For example, the following ARN uniquely identifies the user Francis in the IAM service:arn:aws:iam::586975633310:user/Francis
- --434: Sensitive information provided in environment variablesDetects when functions contain environment variables (such as MYSQL_PASSWORD) that expose sensitive information.
- --435: Private keys stored in functionDetects private keys in functions.
- --436: Unbounded service accessDetects functions with permission to run all actions on all services and their resources.
- --437: Overly permissive service accessDetects functions with permission to run all actions on one or more services.
- --438: Broad resource accessDetects functions that granted access to all resources in one or more services.
- --439: Suspicious function actionsDetects functions with permission to run actions that are used in exploits and attacks. Includes things like cloudtrail:StopLogging, cloudtrail:UpdateTrail that allow disabling and changing the output of CloudTrail logging.
- --440: Unused service API with information disclosure riskDetects functions with permissions to unused APIs that could allow information disclosure.
- --441: Unused service API with data leakage riskDetects functions with permissions to unused APIs that could leak data.
- --442: Unused service API with data tampering riskDetects functions with permissions to unused APIs that could allow data tampering.
- --443: Unused service API with lateral movement riskDetects functions with permissions to unused APIs that could allow an attacker to move laterally.
- --444: Unused service API with denial of service riskDetects functions with permissions to unused APIs that could facilitate a denial of service attack.
- --445: Unused service API with information exfiltration riskDetects functions with permissions to unused APIs that could allow data exfiltration.
- --446: Unused service API with persistent access riskDetects functions with permissions to unused APIs that allow persistent access.
- --447: Unused service API with privilege elevation riskDetects functions with permissions to unused APIs that allow privilege elevation.
- Open Console.
- Go toDefend > Compliance > Functions.
- Click onAdd scope. In the dialog, enter the following settings:
- Specify a cap for the number of functions to scan.Prisma Cloud scans the X most recent functions, where X is the cap value. Set this value to '0' to scan all functions.
- (AWS only) Specify which regions to scan. By default, the scope is applied toRegular regions. Other options includeChina regionsorGovernment regions.
- (AWS only) SelectScan only latest versionsto only scan the latest version of each function. Otherwise, the scanning will cover all versions of each function up to the specifiedcapvalue.
- (AWS only) SelectScan Lambda Layersto enable scanning the function’s Layers as well.
- Select the accounts to scan by credential. If you wish to add an account, click onAdd credential.
- ClickAdd.
- Verify that you have assigned the correct permissions required to scan.
- To view the scan report, go toMonitor > Compliance > Functions.All compliance issues identified in the latest serverless scan report can be exported to a CSV file by clicking on the CSV button in the top right of the table.
- Open Console.
- Make sure you selected theScan Lambda layersin the Defend > Compliance > Functions > Functions > Serverless Accounts >Function scan scope
- Go toMonitor > Compliance > Functions > Scanned functions.
- Filter the table to include functions with the desired Layer by adding theLayersfilter.You can also filter the results by a specific layer name or postfix wildcards. Example: Layers:* OR Layers:arn:aws:lambda:*
- Open theFunction detailsdialog to view the details about the Layers and the Compliance issues associated with them:
- Click on a specific function
- See the Function’s vulnerabilities, compliance issues and package info in the related tabs. Use theFound incolumn to determine if the component is associated with the Function or with the Function’s Layers.
- Use theLayers infotab to see the full list of the function’s the Layers.
Action
Describes the tasks that can be performed on the service.
For example, ec2:StartInstances, iam:ChangePassword, and s3:GetObject.
Wildcards can be used to grant access to all the actions of a given AWS service.
For example, s3:* applies to all S3 actions.
Types of issues
The following permission policy is tightly scoped.
It grants read-write only access to the Books table.
Prisma Cloud would not flag an execution role with this type of permissions policy.
{ "Version": "2012-10-17", "Statement": { "Effect": "Allow", "Action": [ "dynamodb:GetItem", "dynamodb:BatchGetItem" ], "Resource": "arn:aws:dynamodb:us-east-1:125643784111:table/Books" } }
The following permissions policy has been implemented carelessly.
It allows all DyanmoDB operations on all tables owned by the AWS account in the current region, including dynamodb:DeleteTable, which has serious implications for the integrity and availability of your data.
This type of configuration would raise compliance check 437 because the execution role permits all DyanmoDB operations, and it’s unlikely a function actually needs this range of capabilities.
{ "Version": "2012-10-17", "Statement": { "Sid": "AllAPIActionsOnBooks", "Effect": "Allow", "Action": "dynamodb:*", "Resource": "*" } }
Compliance check details
The following checks are supported:
Scanning serverless functions
Configure Prisma Cloud to periodically scan your serverless functions.
Function scanning is handled by Console.
View AWS Lambda Layers scan report
Prisma Cloud can scan the AWS Lambda Layers code as part of the Lambda function’s code scanning.
This capability can help you determine whether the Compliance checks are associated with the function or function Layers.
Follow the steps below to view the Lambda Layers compliance scan results: