GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — Java: Add comments about use of sink kind `regex-use` by owen-mc · Pull Request #17053 · github/codeql

Conversation

@owen-mc

@owen-mc owen-mc commented Jul 23, 2024 •
edited
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown
Contributor

The sink kind regex-use doesn't match the code which parses regex-use sink kinds for regex injection. It turns out this is intentional, but not clearly documented. This PR adds comments explaining that.

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
@owen-mc
owen-mc requested a review from a team as a code owner July 23, 2024 15:58
@github-actions github-actions Bot added the Java label Jul 23, 2024
@github-actions

github-actions Bot commented Jul 23, 2024 •
edited
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown
Contributor

⚠️ The head of this PR and the base branch were compared for differences in the framework coverage reports. A recent commit removed the previously reported differences.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@github-actions github-actions Bot added the documentation label Jul 23, 2024
jcogs33
jcogs33 reviewed Jul 23, 2024
View reviewed changes

@jcogs33 jcogs33 left a comment

Copy link
Copy Markdown
Contributor

There was a problem hiding this comment.

Choose a reason for hiding this comment

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

@owen-mc The regex-use sink kind intentionally does not match the regex-use parsing code in order to avoid excess FPs in the java/regex-injection query. Some prior discussion here. Changing this kind to regex-use[0] will break java/regex-injection test cases.

There is an existing issue about adjusting the regex-use% kind to resolve this situation, which I'll send you a link to. @atorralba and I had previously discussed that the appropriate adjustment would not be simple and that is why we left it as an issue.

Perhaps it would be best to simply add a comment in the org.apache.commons.lang3.model.yml file for now to avoid future confusion?

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
owen-mc added 2 commits July 23, 2024 21:38
@owen-mc
Mention regex-use sink kind in QLDoc for regexSinkKindInfo
89f9581
@owen-mc
Add comment by models using regex-use sink kind
3edeb82
@owen-mc
owen-mc force-pushed the java/fix/regex-use-sink-kind branch from 01f78cd to 3edeb82 Compare July 23, 2024 20:40
@owen-mc owen-mc added the no-change-note-required This PR does not need a change note label Jul 23, 2024
@github-actions github-actions Bot removed documentation no-change-note-required This PR does not need a change note labels Jul 23, 2024
@owen-mc

owen-mc commented Jul 23, 2024

Copy link
Copy Markdown
Contributor Author

@jcogs33 Thanks for explaining that. I've updated this PR to add comments in the two places that I think would be most useful.

jcogs33 reacted with thumbs up emoji
All reactions
  • 👍 1 reaction

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@owen-mc owen-mc changed the title Use valid sink kind which encodes location of matched string Java: Add comments about use of sink kind regex-use Jul 23, 2024
@owen-mc owen-mc added the no-change-note-required This PR does not need a change note label Jul 23, 2024
jcogs33
jcogs33 approved these changes Jul 24, 2024
View reviewed changes
@owen-mc
owen-mc merged commit 5a39610 into github:main Jul 24, 2024
@owen-mc
owen-mc deleted the java/fix/regex-use-sink-kind branch July 24, 2024 20:08
@joefarebrother

joefarebrother commented Jul 24, 2024

Copy link
Copy Markdown
Contributor

Is it accurate to say that the rexex-use kind is "used for regular expression injection sinks that should not be used
as polynomial ReDoS sinks."?
From my understanding, it would be nice to consider the regex injection sinks to also be redos sinks, but the difficulty in actually doing that would be that there are redos sinks that need to not be considered as injection sinks.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@jcogs33

jcogs33 commented Jul 25, 2024

Copy link
Copy Markdown
Contributor

ah sorry, @owen-mc I misread the comments when I reviewed this. Joe is correct.
Thanks for catching @joefarebrother! 🙏

I'll open a PR to fix.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@jcogs33 jcogs33 mentioned this pull request Jul 25, 2024
Java: fix comments about use of sink kind regex-use #17074
Merged
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

@jcogs33 jcogs33 jcogs33 approved these changes

Uh oh!

There was an error while loading. Please reload this page.

Assignees

No one assigned

Labels

Java no-change-note-required This PR does not need a change note

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

Uh oh!

There was an error while loading. Please reload this page.

3 participants

@owen-mc @joefarebrother @jcogs33
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
You are visitor 01402775 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.