Skip to content

Commit 682dc9a

Browse files
committed
fix: adding .safety-policy.json to ignore the vulnerabilities related to version upgrade found for black and boto3 versions, as their versions have already been upgraded; fixing argument types for ignore
1 parent ece5d86 commit 682dc9a

File tree

3 files changed

+16
-2
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

+16
-2
lines changed

.safety-policy.json

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
{
2+
"security": {
3+
"ignore-vulnerabilities": [
4+
{
5+
"vulnerability-id": "66742",
6+
"reason": "Black version updated to ^24.0.0 in pyproject.toml, vulnerability will be resolved when dependencies are refreshed"
7+
},
8+
{
9+
"vulnerability-id": "77744",
10+
"reason": "Boto3 version updated to ^1.35.0 in pyproject.toml, urllib3 vulnerability will be resolved when dependencies are refreshed"
11+
}
12+
]
13+
}
14+
}

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"]) # type: ignore[arg-type]
149+
config_client.put_evaluations(Evaluations=[evaluation], ResultToken=event["resultToken"]) # type: ignore
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: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -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"]) # type: ignore[arg-type]
283+
config_client.put_evaluations(Evaluations=[evaluation], ResultToken=event["resultToken"]) # type: ignore[list-item]
284284

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

0 commit comments

Comments
 (0)