Commit Graph
10 Commits
Author SHA1 Message Date
Jacques Le Roux ab83703e2d Fixed: Fix OFBiz speficic Javascript securiy issues reported by GH CodeQL (OFBIZ-12366)
Today commits were useless, forgot that node_modules are not committed :)
2021-11-10 19:03:37 +01:00
Jacques Le Roux 26dfde1bcf Fixed: Fix OFBiz speficic Javascript securiy issues reported by GH CodeQL (OFBIZ-12366)
Not very funny :/
2021-11-10 17:13:48 +01:00
Jacques Le Roux 30d9b81388 Fixed: Fix OFBiz speficic Javascript securiy issues reported by GH CodeQL (OFBIZ-12366)
I think I simply forgot the single quotes
2021-11-10 17:09:37 +01:00
Jacques Le Roux e054176f89 Fixed: Fix OFBiz speficic Javascript securiy issues reported by GH CodeQL (OFBIZ-12366)
Incorrect codeql-analysis.yml syntax, trying something else...
2021-11-10 16:30:33 +01:00
Jacques Le Roux 9e89930e00 Fixed: Fix OFBiz speficic Javascript securiy issues reported by GH CodeQL (OFBIZ-12366)
Previously in commit dfc7ee4 I blindly followed GH CodeQL's advice about js CSS.
I had a doubt, indeed it was irrelevant. I misinterpreted the advice.

Then I tried to follow OWASP's advice about using node-esapi but was unable to
make it work in a reasonable time. Neither with "node require" nor requireJS;
ie using either CommonJS or AMD format, I guess I missed something there.

Anyway, I finally I set my sights on DOMPurify which is doing the job.

There is only one "foot-gun potential":
https://github.com/cure53/DOMPurify#user-content-is-there-any-foot-gun-potential
"If you first sanitize HTML and then modify it afterwards, you might easily void
the effects of sanitization. If you feed the sanitized markup to another library
after sanitization, please be certain that the library doesn't mess around with
the HTML on its own."

Fortunately, that's not a concern in our simple case.

This commit
* fixes the 3 remaining js vulnerabilty reported by
* prevents checking all under node_modules since it's done by npm in console
  (a bit weak though, ie not clearly on purpose)
* gives more information about 'ci' vs 'install' in npmInstallCommand
2021-11-10 16:08:02 +01:00
Jacques Le Roux 6bbe2ed4ed Improved: Try to reduce the SARIF file used by CodeQL for Java classes (OFBIZ-12361)
No Java check for now, it'd irremediably fail because of a too large SARIF file
2021-11-04 13:25:38 +01:00
Jacques Le Roux 849159dd7a Improved: Try to reduce the SARIF file used by CodeQL for Java classes (OFBIZ-12361)
Run only when a Java or Javascript file has been modified.
Java will still fails OFBiz is too big and there are no ways to restrict the
files to check.
2021-11-03 11:13:20 +01:00
Jacques Le Roux 2a0532326a Improved: Try to reduce the SARIF file used by CodeQL for Java classes (OFBIZ-12361)
Try the simpler solution to test if it get other files than *.java
2021-11-03 08:32:55 +01:00
Jacques Le Roux 24ba8fa328 Fixed: Adds ASL2 header to prevent RAT report 2021-10-18 18:05:15 +02:00
Jacques Le Roux 69b100ac61 Create .github/workflows/codeql-analysis.yml
This will be used to check vulnerability in Java and Js code. It's directly committed from GH
2021-10-17 10:12:38 +02:00