Skip to content

Conversation

dkotter
Copy link
Collaborator

@dkotter dkotter commented Jul 24, 2025

Description of the Change

We recently ran ClassifAI through a handful of security audits. One of those was a SAST scan and while no major issues were flagged, quite a few smaller issues were highlighted. This PR fixes quite a few of those, though there are still some we may want to look at fixing in follow-up PRs.

I know there's a lot of file changes here but most of these changes fall in the following buckets:

  • Simplifying unnecessarily nested if statements (error message Merge this if statement with the enclosing one)
  • Directly returning values instead of assigning those to a variable and then immediately returning that variable (error message Immediately return this expression instead of assigning it to the temporary variable)
  • Removing variables that aren't used (error message Remove this unused "$example" local variable)

How to test the Change

Ensure all tests pass

If desired, could use some smoke testing across the entire plugin to ensure all functionality works as expected

Changelog Entry

Fixed - Address minor issues reported by a SAST scan

Credits

Props @dkotter

Checklist:

@dkotter dkotter added this to the 3.6.0 milestone Jul 24, 2025
@dkotter dkotter self-assigned this Jul 24, 2025
@dkotter dkotter requested review from a team and jeffpaul as code owners July 24, 2025 17:36
@github-actions github-actions bot added the needs:code-review This requires code review. label Jul 24, 2025
@dkotter dkotter removed request for a team and jeffpaul July 24, 2025 17:37
@dkotter
Copy link
Collaborator Author

dkotter commented Jul 25, 2025

Note I'm holding this for now. While I think some of these fixes are good to have, others I'm not entirely sure I agree with. There also may be other scans coming so going to wait on those before proceeding

@github-actions github-actions bot added the needs:refresh This requires a refreshed PR to resolve. label Aug 18, 2025
Copy link

@dkotter thanks for the PR! Could you please rebase your PR on top of the latest changes in the base branch?

@dkotter dkotter modified the milestones: 3.6.0, Future Release Aug 18, 2025
@jeffpaul jeffpaul moved this to In Progress in Open Source Practice Aug 18, 2025
@dkotter dkotter marked this pull request as draft August 19, 2025 21:51
@jeffpaul jeffpaul modified the milestones: Future Release, 3.9.0 Oct 9, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

needs:code-review This requires code review. needs:refresh This requires a refreshed PR to resolve.

Projects

Status: In Progress

Development

Successfully merging this pull request may close these issues.

2 participants