aws-samples / aws-samples/aws-trip-aggregation-sample

API Gateway endpoint

Open
#1 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
TypeScript
Stars
1
Forks
0
PR merge metrics
No merged PRs in 30d

Description

No authorizer (IAM, Cognito, API key, or Lambda authorizer) is configured on the API. Anyone who discovers the API Gateway URL can query any trip by ID. Combined with the SQL injection above, an attacker could extract all trip data.

Possible Fix: Add at minimum an IAM authorizer or API key:

byTripIdResource.addMethod(HttpMethod.GET, integration, {
authorizationType: AuthorizationType.IAM,
// ... rest of config
});

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.