Sitelet https://web.archive.org/web/20260602224954/https://github.com/github/codeql/pull/6062
Skip to content

Java: Promote Groovy Code Injection from experimental#6062

Merged
aschackmull merged 27 commits into
github:mainfrom
atorralba:atorralba/promote-groovy-injection
Aug 3, 2021
Merged

Java: Promote Groovy Code Injection from experimental#6062
aschackmull merged 27 commits into
github:mainfrom
atorralba:atorralba/promote-groovy-injection

Conversation

@atorralba
Copy link
Copy Markdown
Contributor

PR to promote the Groovy Code Injection query created in #5467

Changes

  • Existing files were moved out of experimental
  • The GroovyInjectionLib.qll file was renamed and refactored to use the CSV sink model. Also, added some additional sinks and taint steps.
  • Added tests using InlineExpectationsTest and added some Groovy stubs.

Evaluation

CVE-2019-1003000 and CVE-2019-1003005 are correctly detected by this query (after adding some ad-hoc modeling for the Stapler framework)

To Consider

Added a flow summary for the new url(/sitelet?url=https%3A%2F%2Fweb.archive.org%2Fweb%2F20260602224954%2Fhttps%3A%2F%2Fgithub.com%2Fgithub%2Fcodeql%2Fpull%2Ftainted) constructor that will probably affect other things apart from this query. Open to move that to a different PR if necessary.

@atorralba atorralba requested a review from a team as a code owner June 11, 2021 16:14
Comment thread java/ql/src/semmle/code/java/security/GroovyInjection.qll
Comment thread java/ql/src/semmle/code/java/security/GroovyInjection.qll Outdated
@atorralba atorralba force-pushed the atorralba/promote-groovy-injection branch from 1fe9366 to 66a8f57 Compare June 16, 2021 11:04
@atorralba
Copy link
Copy Markdown
Contributor Author

Force-pushed after rebasing main because the tests for HttpsUrls needed fixing after adding the new URL flow summary.

@github-actions
Copy link
Copy Markdown
Contributor

⚠️ The head of this PR and the base branch were compared for differences in the framework coverage reports. The generated reports are available in the artifacts of this workflow run. The differences will be picked up by the nightly job after the PR gets merged. The differences can be found in the comparison artifact of this workflow run.

@atorralba atorralba added the ready-for-doc-review This PR requires and is ready for review from the GitHub docs team. label Jul 20, 2021
@atorralba
Copy link
Copy Markdown
Contributor Author

@github/docs-content-codeql please review the qhelp file. Even though changes aren't introduced in this PR, it wasn't reviewed when this query was merged to experimental.

@docs-bot
Copy link
Copy Markdown
Contributor

:octocat:📚 Thanks for the docs ping! 🛎️ This was added to our docs first-responder project board. A team member will be along shortly to respond. To request changes to the docs you can also open a CodeQL docs issue.

mchammer01
mchammer01 previously approved these changes Jul 27, 2021
Copy link
Copy Markdown
Contributor

@mchammer01 mchammer01 left a comment •

Choose a reason for hiding this comment

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

@atorralba - this LGTM ✨
A few minor comments for your consideration:

  • minor nit on the change notes
  • for the qhelp file, I've suggested a couple of minor updates but for some reason, I had to commit them onto your branch and could add them as suggestion (probably because the file hasn't been updated in your PR, sorry about that).

Hope this helps!

Comment thread java/change-notes/2021-06-14-groovy-code-injection-query.md Outdated
@github-actions
Copy link
Copy Markdown
Contributor

⚠️ The head of this PR and the base branch were compared for differences in the framework coverage reports. The generated reports are available in the artifacts of this workflow run. The differences will be picked up by the nightly job after the PR gets merged. The differences can be found in the comparison artifact of this workflow run.

Co-authored-by: mc <42146119+mchammer01@users.noreply.github.com>
@atorralba
Copy link
Copy Markdown
Contributor Author

@atorralba - this LGTM ✨
A few minor comments for your consideration:

  • minor nit on the change notes
  • for the qhelp file, I've suggested a couple of minor updates but for some reason, I had to commit them onto your branch and could add them as suggestion (probably because the file hasn't been updated in your PR, sorry about that).

Hope this helps!

@mchammer01 I committed your suggestion, thanks for the review!

mchammer01
mchammer01 previously approved these changes Jul 28, 2021
Copy link
Copy Markdown
Contributor

@mchammer01 mchammer01 left a comment

Choose a reason for hiding this comment

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

Re-approving this PR from a docs perspective

Comment thread java/ql/src/semmle/code/java/security/GroovyInjection.qll Outdated
Comment thread java/ql/src/semmle/code/java/security/GroovyInjection.qll Outdated
Comment thread java/ql/src/semmle/code/java/security/GroovyInjection.qll Outdated
@@ -0,0 +1,84 @@
edges
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Is this an accidental commit? It looks unrelated to this PR.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Yes, it's a mistake from a merge in which this should have been removed. Thanks for spotting this! Fixed in 3656580

Co-authored-by: Anders Schack-Mulligen <aschackmull@users.noreply.github.com>
RequestForgery.expected in experimental was an artifact from a merge that wasn't adequately removed
@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented Aug 3, 2021

⚠️ The head of this PR and the base branch were compared for differences in the framework coverage reports. The generated reports are available in the artifacts of this workflow run. The differences will be picked up by the nightly job after the PR gets merged. The differences can be found in the comparison artifact of this workflow run.

@aschackmull aschackmull merged commit fb9feab into github:main Aug 3, 2021
@atorralba atorralba deleted the atorralba/promote-groovy-injection branch August 3, 2021 12:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

documentation Java ready-for-doc-review This PR requires and is ready for review from the GitHub docs team.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants