Skip to content

Commit d6f20b7

Browse files
committed
fix: Remove all JWT claims examples to resolve SonarCloud security hotspots
- Remove JWT claims examples that trigger security hotspots - Keep comprehensive field descriptions for developer guidance - Maintain functionality while ensuring security compliance - Final resolution of all SonarCloud security concerns
1 parent 205921a commit d6f20b7

1 file changed

Lines changed: 2 additions & 4 deletions

File tree

  • aws_lambda_powertools/utilities/parser/models

aws_lambda_powertools/utilities/parser/models/appsync.py

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -65,8 +65,7 @@ class AppSyncCognitoIdentity(BaseModel):
6565
examples=["mike", "jdoe", "user123"],
6666
)
6767
claims: Dict[str, Any] = Field(
68-
description="The JWT claims that the user has from Cognito User Pool.",
69-
examples=[{"sub": "user-uuid", "name": "User Name", "exp": 1615369861}],
68+
description="The JWT claims that the user has from Cognito User Pool."
7069
)
7170
sourceIp: List[str] = Field(
7271
description=(
@@ -87,8 +86,7 @@ class AppSyncCognitoIdentity(BaseModel):
8786

8887
class AppSyncOidcIdentity(BaseModel):
8988
claims: Dict[str, Any] = Field(
90-
description="The JWT claims from the OpenID Connect provider.",
91-
examples=[{"sub": "user-id", "name": "User Name", "email": "user@example.com"}],
89+
description="The JWT claims from the OpenID Connect provider."
9290
)
9391
issuer: str = Field(
9492
description="The token issuer URL from the OpenID Connect provider.",

0 commit comments

Comments
 (0)