Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

harden-pyyaml codemod now also handles inheritance #205

Merged
merged 1 commit into from
Jan 9, 2024

Conversation

clavedeluna
Copy link
Contributor

@clavedeluna clavedeluna commented Jan 5, 2024

Overview

Update harden-pyyaml codemod to handle cases when a custom class inherits an unsafe loader class

Copy link

codecov bot commented Jan 5, 2024

Codecov Report

Attention: 1 lines in your changes are missing coverage. Please review.

Comparison is base (03c3782) 96.37% compared to head (970725a) 96.37%.
Report is 1 commits behind head on main.

Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff             @@
##             main     #205      +/-   ##
==========================================
- Coverage   96.37%   96.37%   -0.01%     
==========================================
  Files          86       86              
  Lines        3942     3968      +26     
==========================================
+ Hits         3799     3824      +25     
- Misses        143      144       +1     
Files Coverage Δ
src/codemodder/codemods/api/__init__.py 95.45% <100.00%> (+0.14%) ⬆️
src/core_codemods/harden_pyyaml.py 97.72% <96.96%> (-2.28%) ⬇️

@clavedeluna clavedeluna changed the title Pyyaml inherit harden-pyyaml codemod now also handles inheritance Jan 5, 2024
@clavedeluna clavedeluna marked this pull request as ready for review January 5, 2024 13:21
src/core_codemods/harden_pyyaml.py Show resolved Hide resolved
src/core_codemods/harden_pyyaml.py Show resolved Hide resolved
src/core_codemods/harden_pyyaml.py Outdated Show resolved Hide resolved
@clavedeluna clavedeluna force-pushed the pyyaml-inherit branch 2 times, most recently from 733ba9b to a2d2c8b Compare January 5, 2024 16:26
@clavedeluna clavedeluna requested a review from drdavella January 5, 2024 16:27
Copy link
Member

@drdavella drdavella left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good but one more suggestion for simplification/clarity.

src/core_codemods/harden_pyyaml.py Outdated Show resolved Hide resolved
Copy link
Member

@drdavella drdavella left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM just need to fix the pylint failure.

Copy link

sonarqubecloud bot commented Jan 9, 2024

Quality Gate Passed Quality Gate passed

The SonarCloud Quality Gate passed, but some issues were introduced.

1 New issue
0 Security Hotspots
No data about Coverage
0.0% Duplication on New Code

See analysis details on SonarCloud

@clavedeluna clavedeluna added this pull request to the merge queue Jan 9, 2024
Merged via the queue into main with commit 993c151 Jan 9, 2024
14 checks passed
@clavedeluna clavedeluna deleted the pyyaml-inherit branch January 9, 2024 11:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants