I just read an ASF members thread about this article:
https://medium.com/@alex.birsan/dependency-confusion-4a5d60fec610
One member mentioned that the Groovy project is using the Gradle's dependency
verification feature[1] in the Apache Groovy build.
I suggest we do the same, even after the move from JCenter to MavenCentral where
things should be safer.
[1] https://docs.gradle.org/current/userguide/dependency_verification.html
This commit includes:
The verification-metadata.xml and verification-keyring.gpg used by the
verification task
*.gpg as binary in .gitattrubtes for verification-keyring.gpg
The documentation about the verification in sy-dependency-verification.adoc
with a link and some unrelated changes in security.adoc about security for
OFBiz in production
An empty line removed in build.gradle
(OFBIZ-12149)
This helps IDEs navigate to the scripts' dependencies, making it easier
to spot issues during development.
However we don't want gradle to attempt to compile groovyScripts,
therefore the compileGroovyScriptsGroovy task is disabled.
(OFBIZ-12136)
Allows people to add configuration files and jars (database drivers) when
using the binary distribution.
Thanks: Eugen Stan for improvement
Forget about upgrading org.jdom to v2 we need only JDOMException and it works
as is. So this reverts to org.jdom to v1. We still need the updated entry in
build.gradle
This fixes integration tests with framework only
After last changes jdom is missing when using framework only, certainly due to a
3rd party lib change that included it.
This fixes the issue, by not only adding last jdom lib ('org.jdom:jdom:2.0.2')
in build.gradle but also changing the import where used: they changed to jdom2!
According to BuildBot after last changes jdom is missing, certainly due to a 3rd
party lib change.
I could not reproduce locally, I guess if I had cleared the cache it would.
Anyway here it is.
Some times ago, we were forced to stop and quickly restart the demos because of
the Gradle daemons logging taking all the place; though we don't use Gradle
daemons in demos. Weird isn't ?
The reason is that by default org.gradle.logging.level=lifecycle is verbose.
Anyway, all org.gradle.logging.level are verbose. I mean they also duplicate
OFBiz information, have a look into your own Gradle daemon dir!
And that even if you don't use daemons, as we do for demos. Because Gradle
always uses at least 1 daemon to run.
So I was looking for a solution to not uselessly clutter the VM disk demos and
stumbled upon <<Gradle logging hygiene - Issue #2688>> - gradle/gradle (github.com)
This uses Evgeny Naumenko's solution at
https://discuss.gradle.org/t/gradle-daemon-produces-a-lot-of-logs/9905
I backport because it's needed by demos
org.apache.xmlgraphics:batik:1.13 does not include batik-svg-dom it's in
batik:batik-svg-dom:1.6-1.
It's also in org.eclipse.birt.runtime:viewservlets:4.5.0 that's why it worked
only with plugins
2020/08/10 the OFBiz security team received a security report by Harshit Shukla
<harshit.shukz@gmail.com>, roughly it was (quoting part of it to simplify):
<<I have identified a Remote Code Execution (RCE) Vulnerability. The reason
behind this RCE is lack of file extension check at
catalog/control/UploadCategoryImage?productCategoryId=CATALOG1_BEST_SELL&pload_file_type=category>>
Using this post-auth RCE in OFBiz demos, Harshit was able to get some AWS
credentials by uploading a webshell (based on [0]).
By security, it was then decided by the Infra and OFBiz security teams to shut
down the demos.
After discussing the elements reported with Mark J Cox (VP of ASF security team)
we in common decided that no CVE was necessary.
* modification in gradle generateOfbizDocumentation task to copy the
image/${components.name} subdirectory in the general
docs/asciidoc/images/ directory before generation
and remove it after.
* correction in generateAllPluginsDocumentation to put copy of OFBiz-Logo in doFirst to avoid it's run during gradle Configure project
AsciiDoc files (OFBIZ-11893)
* Add allow-uri-read when generated html and pdf to be able to allow
image from external uri, it's used for apache2.0 image;
Generalize usage of apache2.0 image for all main documents
* Put Trunk Version in gradle generation parameter and so remove in all
documents (to avoid Version unspecified)
Removes last remaining "Must have at least one statement" issues by using
Debug.logVerbose
Decreases tasks.checkstyleMain.maxErrors from 543 to 535
Thanks: Suraj for report