| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
| } | ||
|
|
||
| /** Models `attachEventCartridge` method of Velocity Templating Engine. */ | ||
| class MethodVelocityAttachEventCartridge extends Method { |
There was a problem hiding this comment.
Unused?
Check other class/method defns to see if they're still used.
Sorry, something went wrong.
|
I'd completely lost track of this; are you applying to the bounty program for this PR? |
Sorry, something went wrong.
|
@smowton I am sorry for the delay in addressing the review. There is already an issue open github/securitylab#94 for this PR. I can see the bot has marked that as closed but on Github it is reflected as open. You may want to check what happening here. The PR push should have triggered the issue open. Anyways, I have now made some changes. The PR is now ready for review. |
Sorry, something went wrong.
|
@porcupineyhairs please create a fresh bounty application for this |
Sorry, something went wrong.
|
This is under review by the security lab; comments should be directed to github/securitylab#410 about that. The CodeQL team will review as and when it passes their review. |
Sorry, something went wrong.
There was a problem hiding this comment.
I added some inline comments. Also, I made a commit with a trivial change (added this. to some predicate calls).
Sorry, something went wrong.
There was a problem hiding this comment.
Currently lacks tests: please add test cases to java/ql/test/experimental/query-tests/security/CWE-094, as well as stubs of your dependencies to https://github.com/github/codeql/tree/main/java/ql/test/experimental/stubs
There are many examples at https://github.com/github/codeql/tree/main/java/ql/test/experimental/query-tests/security to crib off, but do ask if you have any questions about writing codeql tests.
Sorry, something went wrong.
|
@smowton Sorry for the long wait. I have added the necessary tests and a qhelp. This PR is now ready for a review. |
Sorry, something went wrong.
|
Why is this being added direct to the main query suite rather than experimental? (for experimental additions you won't need a change note either) |
Sorry, something went wrong.
|
@smowton I moved it from experimental to stable as this meets all the requirements for a supported stable query as listed here. The PR includes a well documented query along with units tests, and a qhelp. The only divergence from the norm is that I include all of these in a single PR instead of two separate ones. Do you want me to split this one into two parts? |
Sorry, something went wrong.
|
@porcupineyhairs to enter the main query suite we'll want to do a more detailed study into false positives and ways they could be remediated. Please commit this to the experimental area for the time being. |
Sorry, something went wrong.
File "ql/java/ql/test/experimental/query-tests/security/CWE-094/JinJavaSSTI.java" contains a non-ASCII character at the location marked with `|` in: tring, Object> context = new HashMap<>(); // String render| |
Sorry, something went wrong.
[2022-02-22 15:31:28] This is codeql generate query-help -vvv --log-to-stderr --output out --format markdown --search-path . -- ql/java/ql/src/experimental/Security/CWE/CWE-094/TemplateInjection.qhelp
Error: 2-22 15:31:29] [ERROR] generate query-help> ql/java/ql/src/experimental/Security/CWE/CWE-094/TemplateInjection.qhelp: Could not find sample SSTIBad.py
Error: 2-22 15:31:29] [ERROR] generate query-help> ql/java/ql/src/experimental/Security/CWE/CWE-094/TemplateInjection.qhelp: Could not find sample SSTIGood.py
[2022-02-22 15:31:29] Exception caught at top level: 1 qhelp files could not be processed.
com.semmle.cli2.generate.QueryHelpCommand.executeSubcommand(QueryHelpCommand.java:205)
com.semmle.cli2.picocli.SubcommandCommon.call(SubcommandCommon.java:500)
com.semmle.cli2.picocli.SubcommandMaker.runMain(SubcommandMaker.java:205)
com.semmle.cli2.picocli.SubcommandMaker.runMain(SubcommandMaker.java:214)
com.semmle.cli2.CodeQL.main(CodeQL.java:98)
A fatal error occurred: 1 qhelp files could not be processed.
|
Sorry, something went wrong.
| Back | FazBrowse Home | New Git URL |
This adds a query to detect server side template injections in Java.
This is a continuation of #3353. Since, that one is quite stale, I am closing that and opening a new one .