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

Hardening suggestions for codemodder-python / sonar-timezone #818

Merged
merged 2 commits into from
Aug 30, 2024

Conversation

pixeebot[bot]
Copy link
Contributor

@pixeebot pixeebot bot commented Aug 30, 2024

I've reviewed the recently opened PR (802 - Timezone find and fix and sonar codemod) and have identified some area(s) that could benefit from additional hardening measures.

These changes should help prevent potential security vulnerabilities and improve overall code quality.

Thank you for your consideration!
🧚🤖 Powered by Pixeebot

Feedback | Community | Docs

@@ -74,9 +74,8 @@ def leave_Call(self, original_node: cst.Call, updated_node: cst.Call):
return updated_node

def _determine_module_and_kwarg(self, original_node: cst.Call):
maybe_name = self.get_aliased_prefix_name(original_node, self._module_name)

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Replaces multiple expressions involving if operator with 'walrus' operator.

Copy link

@clavedeluna clavedeluna merged commit e6da90f into sonar-timezone Aug 30, 2024
1 of 2 checks passed
@clavedeluna clavedeluna deleted the pixeebot/sonar-timezone branch August 30, 2024 17:32
github-merge-queue bot pushed a commit that referenced this pull request Aug 30, 2024
* add core codemod

* document

* add sonar codemod

* update pygoat findings

* Hardening suggestions for codemodder-python / sonar-timezone (#818)

* update pygoat findings

* Use Assignment Expression (Walrus) In Conditional

---------

Co-authored-by: clavedeluna <[email protected]>
Co-authored-by: pixeebot[bot] <104101892+pixeebot[bot]@users.noreply.github.com>

---------

Co-authored-by: pixeebot[bot] <104101892+pixeebot[bot]@users.noreply.github.com>
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.

1 participant