Skip to content

Conversation

@andrecsilva
Copy link
Contributor

@andrecsilva andrecsilva commented Nov 21, 2024

Rewrote StackTraceExposureCodemod with the remediator API. Also added support for a new case.

Fixed a node position matching bug. Had to adjust/fix some codemods and tests.

Fixed flakyness from a codemod.

\close #work

@andrecsilva andrecsilva changed the title Iss 2415/cql info exposure New CodeQL Error Message Exposure codemod Nov 21, 2024
@andrecsilva andrecsilva marked this pull request as ready for review November 21, 2024 10:26
@andrecsilva andrecsilva requested a review from nahsra November 21, 2024 10:26
import java.util.Optional;
import javax.inject.Inject;

/** A codemod for automatically fixing SQL injection from CodeQL. */
Copy link
Contributor

Choose a reason for hiding this comment

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

Comment is wrong

@andrecsilva andrecsilva requested a review from nahsra November 21, 2024 13:47
import java.util.Optional;

/** Removes exposure from error messages. */
public final class ErrorMessageExposureFixStrategy extends MatchAndFixStrategy {
Copy link
Contributor

Choose a reason for hiding this comment

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

Does this need to be public? Shouldn't this be package-protected?

@andrecsilva andrecsilva force-pushed the ISS-2415/cql-info-exposure branch from 2530d1d to ccaad27 Compare November 21, 2024 16:58
@sonarqubecloud
Copy link

Quality Gate Passed Quality Gate passed

Issues
1 New issue
0 Accepted issues

Measures
0 Security Hotspots
0.0% Coverage on New Code
0.0% Duplication on New Code

See analysis details on SonarQube Cloud

@andrecsilva andrecsilva merged commit 9fe0a17 into main Nov 21, 2024
6 checks passed
@andrecsilva andrecsilva deleted the ISS-2415/cql-info-exposure branch November 21, 2024 17:12
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.

2 participants