Skip to content

chore: rename YamlLoader to SafeLoader#296

Merged
epmog merged 1 commit into
OpenJobDescription:mainlinefrom
epmog:rename-safeyaml
Jun 29, 2026
Merged

chore: rename YamlLoader to SafeLoader#296
epmog merged 1 commit into
OpenJobDescription:mainlinefrom
epmog:rename-safeyaml

Conversation

@epmog

@epmog epmog commented Jun 29, 2026

Copy link
Copy Markdown
Contributor

What was the problem/requirement? (What/Why)

Scanner flagging yaml.load instead of yaml.safe_load.

What was the solution? (How)

safe_load does what we do, but we also allow the c-extension if it exists: https://github.com/yaml/pyyaml/blob/34a9bf82357f4952d8f194a5a31f1c39743652d0/lib/yaml/__init__.py#L125

Probably won't stop it, but changed the import aliases to reflect we're using SafeLoader regardless of c-extension.

What is the impact of this change?

Scanner reports reduced.

How was this change tested?

hatch run fmt
hatch run lint

Was this change documented?

N/A

Is this a breaking change?

N/a

Does this change impact security?

N/A


By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.

Signed-off-by: Morgan Epp <60796713+epmog@users.noreply.github.com>
@epmog
epmog requested a review from a team as a code owner June 29, 2026 14:13
@epmog
epmog enabled auto-merge (squash) June 29, 2026 14:29
@godobyte

Copy link
Copy Markdown

Curious what's the context for this change, which scanner you're referring to?

@epmog
epmog merged commit 6e335e9 into OpenJobDescription:mainline Jun 29, 2026
31 checks passed
@epmog
epmog deleted the rename-safeyaml branch June 29, 2026 21:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants