You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
No actionable findings. Residual risk is low: existing tests exercise both CloudFormation templates through the new loader helper, though tests were not run per review constraints.
Reviewed commit 13b9a1a5de5de773a0abdb1441bfc8858e7572f1. Workflow run
The PR replaces a CodeQL-flagged yaml.load(stream, Loader=CfnLoader) call with a _safe_load_cfn helper and documents the rule in AGENTS.md. The helper (CfnLoader(stream) → get_single_data() → dispose() in a finally) is a faithful reproduction of PyYAML's internal yaml.load implementation, so behavior is unchanged while removing the unsafe call form. CfnLoader subclasses yaml.SafeLoader and registers its short-form tag constructor at the class level, so direct instantiation preserves both safe-loading and CloudFormation tag support. The Any return type is compatible with the caller's dict[str, Any] annotation, and empty-stream handling matches the prior path.
No findings. The change is correct and behavior-preserving. Residual test risk is low: no new test is added, but the existing template/long_running_template fixtures already exercise load_template, so the refactored code path stays covered, which is appropriate for an isolated fix under the AGENTS.md testing rules.
Reviewed commit 13b9a1a5de5de773a0abdb1441bfc8858e7572f1. Workflow run
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Issue #, if available:
N/A
Description of changes:
yaml.load()occurrence with a helper function_safe_load_cfnyaml.load()is flagged as a security riskyaml.load(stream, Loader=CfnLoader)andCfnLoaderextendsyaml.SafeLoader_safe_load_cfnis the equivalent ofyaml.load(stream, Loader=CfnLoader)except it does not flag as a security riskTesting:
hatch run test:all packages/aws-durable-execution-sdk-python-conformance-tests-otel/tests/test_otel_examples.pyand all tests passedBy submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.