ServerlessFunction
FaaS (Lambda/Functions/Cloud Functions/Cloud Run jobs).
class: Compute
Realizing resources
aws aws
| resource | scope | enumerate | required permissions |
|---|---|---|---|
aws:lambda:function |
regional | lambda:ListFunctions |
lambda:ListFunctions lambda:GetFunction |
gcp gcp
| resource | scope | enumerate | required permissions |
|---|---|---|---|
gcp:cloudfunctions:function |
global | cloudfunctions.projects.locations.functions.list |
cloudfunctions.functions.list |
As edge source
CanDecryptCanDeleteDataCanExfiltrateCanNetworkReachCanReachPortCanReadCredentialCanReadDataCanReadSecretCanRetrieveTokenCanWriteDataContainsCredentialContainsResourceReferenceContainsSecretExecutesAsExposedToAccountExposedToInternetExposedToTenantExposesCredentialHasPolicyLocatedInPrivateReachabilityAs edge target
AttachedToAuthenticatesToCanAdministerCanAttachIdentityCanControlCanCreateCanDeleteCanDeployCanExecuteOnCanInvokeCanModifyCanModifyCodeCanModifyConfigurationCanModifyPolicyCanNetworkReachCanReachPortCanReadCanReplaceCanStartCanTakeOwnershipCanTriggerCanWriteContainsContainsResourceReferenceControlsHasPermissionPrivateReachabilityExposure sites
None.
Rules that touch ServerlessFunction 31
An API Gateway API that invokes a Lambda backend is an event source for that Lambda; invoking the API triggers the Lambda.
aws
CanTriggerAPI Gateway invokes a Lambda authorizer function to evaluate access on every request (TOKEN or REQUEST type).
aws
CanTriggerA principal with athena:StartQueryExecution on a LAMBDA-catalog workgroup can trigger the registered Lambda connector function.
aws
CanTriggerAn Athena workgroup configured with a LAMBDA data catalog triggers the registered Lambda connector function.
aws
CanTriggerA stack's service role (Identity) triggers the Custom:: resource Lambda during stack lifecycle events via lambda:InvokeFunction; principals who CanExecuteAs the service role inherit this CanTrigger path.
aws
CanTriggerA principal with cloudfront:UpdateFunction and cloudfront:PublishFunction can modify CloudFront Functions code. While CloudFront Functions cannot call AWS APIs (no IAM escalation), modified code can forge trusted headers to origins, enabling application-layer bypass attacks.
aws
CanModifyCodeCodeDeploy invokes the pre/post-traffic hook Lambda function specified in the AppSpec; CreateDeployment on a Lambda-platform group lets the attacker choose which Lambda gets invoked.
aws
CanInvokeAn image push to ECR emits EventBridge events (ecr:PutImage action emits ECR Image Action event) that can trigger downstream Compute workloads (Lambda, CodePipeline, deploy workers), enabling trigger-based code execution.
aws
CanTriggerSwap an existing function's execution role via UpdateFunctionConfiguration.
Replace function code, then run it, to execute as the function's role.
aws
CanExecuteAsInject code via env/layer/handler config change, then run, as the role.
aws
CanExecuteAsA function leaks its execution-role credentials to any code it runs.
Function URL with AuthType NONE + public resource policy is internet-invocable.
s3:PutObject on a bucket that is a verified code-artifact deployment source (Lambda, CodePipeline, CloudFormation) for a compute workload equals modifying that workload's code.
aws
CanModifyCodeAn available Interface VPC Endpoint (PrivateLink) makes the backing AWS or third-party service reachable from compute within the VPC via private networking, without traversing the public internet. Source is any Compute node in the VPC that has network access to the endpoint ENI.
An available Interface VPC Endpoint (PrivateLink) makes the backing AWS or third-party service reachable from compute within the VPC via private networking, without traversing the public internet. Derived from the endpoint state and VPC co-location facts.
An active Event Grid event subscription binds a topic to a Compute consumer (Azure Function, Logic App, webhook); this is the CanTrigger fact consumed by messaging-chains rule 1.
azure
CanTriggerCode modification on a Function app + the app runs as an MI => execute as that MI (via the identity endpoint).
azure
CanExecuteAsConfig modification (run-from-package / image / startup) + ExecutesAs => execute as the MI.
azure
CanExecuteAsModify the buildspec/pipeline/runbook/template a runner executes, then run it, to execute as the runner's service identity.
Triggering a pipeline reaches each downstream stage runner it orchestrates; propagate CanTrigger to those runners.
Trigger/start a runner whose current definition already runs attacker-influenced code, executing as the runner's identity.
Modify function source + (invoke/call OR existing trigger) + ExecutesAs.
gcp
CanExecuteAsUpdate the runtime SA of an existing function to a more-privileged actAs-able SA.
gcp
CanExecuteAsConfig change (env/secret/entry point) that injects code + run + ExecutesAs.
gcp
CanExecuteAsAn object write to a GCS bucket with Pub/Sub notification config pointing to a Cloud Function/Cloud Run service triggers downstream compute execution as the function's service account.
gcp
CanTriggerModify code/config of an existing Cloud Run resource; it runs as its existing runtime SA.
gcp
CanExecuteAsPushing/overwriting an image in a registry poisons every workload that pulls it - code control propagates from the registry to each consuming Compute/KubernetesWorkload.
A workload poisoned via a registry image push runs as its identity, so the pusher executes as that identity.