Skip to content

Commit ece5d86

Browse files
committed
fix: remove unsafe licenses; update the function argument types; removing type ignore where not required
1 parent a79dc7b commit ece5d86

File tree

3 files changed

+4
-3
lines changed
  • aws_sra_examples/solutions/genai/bedrock_org/lambda/rules
    • sra_bedrock_check_kb_ingestion_encryption
    • sra_bedrock_check_kb_s3_bucket

3 files changed

+4
-3
lines changed

aws_sra_examples/solutions/genai/bedrock_org/lambda/rules/sra_bedrock_check_kb_ingestion_encryption/app.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -146,6 +146,6 @@ def lambda_handler(event: dict, context: Any) -> None: # noqa: U100
146146
LOGGER.info(f"Compliance evaluation result: {compliance_type}")
147147
LOGGER.info(f"Annotation: {annotation}")
148148

149-
config_client.put_evaluations(Evaluations=[evaluation], ResultToken=event["resultToken"])
149+
config_client.put_evaluations(Evaluations=[evaluation], ResultToken=event["resultToken"]) # type: ignore[arg-type]
150150

151151
LOGGER.info("Compliance evaluation complete.")

aws_sra_examples/solutions/genai/bedrock_org/lambda/rules/sra_bedrock_check_kb_s3_bucket/app.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -149,7 +149,7 @@ def check_bucket_configuration(bucket_name: str, rule_parameters: dict) -> list[
149149
return issues
150150

151151

152-
def get_bucket_name_from_data_source(data_source: Dict[str, Any]) -> str | None:
152+
def get_bucket_name_from_data_source(data_source: Any) -> str | None:
153153
"""Extract bucket name from data source configuration.
154154
155155
Args:
@@ -280,6 +280,6 @@ def lambda_handler(event: dict, context: Any) -> None: # noqa: U100
280280
LOGGER.info(f"Compliance evaluation result: {compliance_type}")
281281
LOGGER.info(f"Annotation: {annotation}")
282282

283-
config_client.put_evaluations(Evaluations=[evaluation], ResultToken=event["resultToken"])
283+
config_client.put_evaluations(Evaluations=[evaluation], ResultToken=event["resultToken"]) # type: ignore[arg-type]
284284

285285
LOGGER.info("Compliance evaluation complete.")

pyproject.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -126,6 +126,7 @@ reportTypedDictNotRequiredAccess = "none"
126126
safe_licenses = [
127127
"MIT",
128128
"BSD-2-Clause",
129+
"BSD-3-Clause",
129130
"Apache-2.0",
130131
"MIT License",
131132
"BSD License",

0 commit comments

Comments
 (0)