ServerlessFunction

FaaS (Lambda/Functions/Cloud Functions/Cloud Run jobs).

class: Compute

Realizing resources

aws aws

resourcescopeenumeraterequired permissions
aws:lambda:function regional lambda:ListFunctions lambda:ListFunctions lambda:GetFunction

gcp gcp

resourcescopeenumeraterequired permissions
gcp:cloudfunctions:function global cloudfunctions.projects.locations.functions.list cloudfunctions.functions.list

Exposure 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.
API Gateway invokes a Lambda authorizer function to evaluate access on every request (TOKEN or REQUEST type).
A principal with athena:StartQueryExecution on a LAMBDA-catalog workgroup can trigger the registered Lambda connector function.
An Athena workgroup configured with a LAMBDA data catalog triggers the registered Lambda connector function.
A 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.
A 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.
CodeDeploy 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.
An 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.
Swap an existing function's execution role via UpdateFunctionConfiguration.
Replace function code, then run it, to execute as the function's role.
Inject code via env/layer/handler config change, then run, as the role.
A 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.
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. 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.
Code modification on a Function app + the app runs as an MI => execute as that MI (via the identity endpoint).
Config modification (run-from-package / image / startup) + ExecutesAs => execute as the MI.
Modify 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.
Update the runtime SA of an existing function to a more-privileged actAs-able SA.
Config change (env/secret/entry point) that injects code + run + ExecutesAs.
An 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.
Modify code/config of an existing Cloud Run resource; it runs as its existing runtime SA.
Pushing/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.
move · open · esc close