`jsoup` needs to be updated btw. <github.com/advis...
# dokka
e
jsoup
needs to be updated btw. github.com/advisories/GHSA-pmhh-3w7g-xqp8
o
Thanks! I will take a look at it! We do use a pretty old version though... Hope there were no big changes there.
e
In the meantime I'm attempting to override it with a constraint, but well, not going as planned, at least for a Dokka dependency declared in
buildSrc
o
So, we previously had similar problems with Jackson, and here are my recommendations for enforcing newer versions there. • github.com/Kotlin/dokka/issues/3472#… - uses
resolutionStrategy
• github.com/Kotlin/dokka/issues/3194#… - uses BOM, not sure if jsoup has one Hope this helps you!
👀 1
Note that jsoup is used only during Dokka execution, and should not be used in the Dokka Gradle Plugin, so you need only to enforce it for
dokka*
configurations.
e
Perfect, I'll give this a go. The vulnerability policies we have now are extremely strict, so anything the scanner finds must be remediated.
👍 1
o
Or, you might also just add dependency on newer version of jsoup into
dokkaPlugin
configuration:
Copy code
dependencies {
  dokkaPlugin("org.jsoup:jsoup:XXX")
}
it might also work as intended
e
Probably the configurations approach is better, I don't want to pollute all the modules.
o
This is the configuration used to resolve plugins and their dependencies, so hopefully Gradle is smart enough to select the correct version here.
> Probably the configurations approach is better, I don't want to pollute all the modules. But you need this configuration in all projects (with Dokka) anyway (as stated in #3194), because dependencies are resolved per subproject during Dokka execution. If you have a dokka convention plugin (which I hope you have), you can put it there.
e
If you have a dokka convention plugin
I have a
Plugin
under
buildSrc
, not a convention one : (
o
That's also fine! You can use the same approach there with dependencies:
Copy code
project.dependencies.add("dokkaPlugin", "org.jsoup:jsoup:XXX")
thank you color 1
e
So basically:
Copy code
project.apply<DokkaPlugin>()
project.dependencies.add("dokkaPlugin", "org.jsoup:jsoup:1.23.1")
Seems like it is working. I'll see whether Mend still reports it.
o
yeah, like this! 🤞