← Back to issue list

yaml: replace yaml.safe_load() with CSafeLoader

View original Github issue

Metadata

Project
snapcraft
Number
#2218
Type
pull request
State
merged
Author
chipaca
Labels
Created
Updated
Closed

Current evaluation

Merged. Replaces yaml.safe_load() with CSafeLoader to fix bug lp:1787373. Reviewers requested extracting the logic into a dedicated helper function, which was implemented. The change improves parsing performance and was merged after code review.

Suggested action:

No scores available.

Issue body

that is, yaml.safe_load(...) -> yaml.load(..., Loader=yaml.CSafeLoader) This fixes [lp:1787373](https://bugs.launchpad.net/snapcraft/+bug/1787373). - [x] Have you followed the [guidelines for contributing](https://github.com/snapcore/snapcraft/blob/master/CONTRIBUTING.md)? - [x] Have you signed the [CLA](http://www.ubuntu.com/legal/contributors/)? - [x] If this is a bugfix. Have you checked that there is a bug report open for the issue you are trying to fix on [bug reports](https://bugs.launchpad.net/snapcraft)? - [ ] If this is a new feature. Have you discussed the design on the [forum](https://forum.snapcraft.io)? - [ ] Have you successfully run `./runtests.sh static`? - [ ] Have you successfully run `./runtests.sh tests/unit`? the tests fail, but they're failing for me on master as well (I'm probably missing something).

Evaluation history

Date Model Scores Action Summary
qwen/qwen3.6-35b-a3b Merged. Replaces yaml.safe_load() with CSafeLoader to fix bug lp:1787373. Reviewers requested extracting the logic into a dedicated helper function, which was implemented. The change improves parsing performance and was merged after code review.
qwen3.6-35b-a3b-mtp-q6 Merged. Replaced yaml.safe_load() with CSafeLoader to fix bug #1787373. Maintainers added commits to handle architecture concerns and loader wrapping before final merge.
qwen3.6-35b-a3b-mtp-q6 Merged after addressing reviewer feedback on helper functions and coverage. Replaces yaml.safe_load() with yaml.CSafeLoader to improve performance and security, resolving launchpad bug #1787373.

Update history

No update history recorded yet.

Related issues

Issue Project State Summary Similarity
#2065 many: update the yaml loading logic snapcraft merged Merged after approval and CI checks, updating YAML loading to use safe loading where possible and resolving issue #2033.
74%