This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2023-08-21
Channels
- # announcements (1)
- # beginners (30)
- # calva (3)
- # cider (23)
- # clerk (5)
- # clj-kondo (16)
- # clojure (39)
- # clojure-brasil (3)
- # clojure-europe (19)
- # clojure-nl (1)
- # clojure-norway (54)
- # clojure-seattle (1)
- # clojure-uk (2)
- # clojurescript (9)
- # cursive (3)
- # datahike (13)
- # datomic (4)
- # emacs (7)
- # events (1)
- # fulcro (32)
- # hyperfiddle (17)
- # jobs-discuss (3)
- # meander (5)
- # missionary (132)
- # music (2)
- # nyc (1)
- # off-topic (33)
- # polylith (22)
- # proletarian (3)
- # scittle (106)
- # shadow-cljs (23)
Hello! FYI Clojurescript apparently has some vulnerabilities, according to nvd-clojure... More info in ๐งต!
On a project that has a single dependency on Clojurescript {:deps {org.clojure/clojurescript {:mvn/version "1.11.60"}}}
, I'm getting this report:
| dependency | status |
+------------------------------------------------------------------------------------------+------------------------------+
| clojurescript-1.11.60.jar | CVE-2023-0247 |
| closure-compiler-unshaded-v20220502.jar/META-INF/maven/com.google.code.gson/gson/pom.xml | CVE-2022-25647 |
| closure-compiler-unshaded-v20220502.jar/META-INF/maven/com.google.guava/guava/pom.xml | CVE-2023-2976, CVE-2020-8908 |
| google-closure-library-0.0-20211011-0726fdeb.jar | CVE-2020-8910 |
| jackson-core-2.8.7.jar | CVE-2018-1000873 |
+------------------------------------------------------------------------------------------+------------------------------+
If I use the latest version on github,
{:deps {org.clojure/clojurescript {:git/sha "15539d253059e52dba600616b2a812206b29a171"
:git/url ""}}}
I get this report instead:
+------------------------------------------------------------------------------------------+------------------------------+
| dependency | status |
+------------------------------------------------------------------------------------------+------------------------------+
| closure-compiler-unshaded-v20220502.jar/META-INF/maven/com.google.code.gson/gson/pom.xml | CVE-2022-25647 |
| closure-compiler-unshaded-v20220502.jar/META-INF/maven/com.google.guava/guava/pom.xml | CVE-2023-2976, CVE-2020-8908 |
| google-closure-library-0.0-20230227-c7c0a541.jar | CVE-2020-8910 |
| jackson-core-2.8.7.jar | CVE-2018-1000873 |
+------------------------------------------------------------------------------------------+------------------------------+
If I modify my deps.edn to something like this:
:deps {org.clojure/clojurescript {:git/sha "15539d253059e52dba600616b2a812206b29a171"
:git/url ""
:exclusions [com.google.javascript/closure-compiler-unshaded
com.fasterxml.jackson.core/jackson-core]}
com.google.javascript/closure-compiler-unshaded {:mvn/version "v20230802"
:exclusions [com.google.guava/guava]}
com.fasterxml.jackson.core/jackson-core {:mvn/version "2.15.2"}
com.google.guava/guava {:mvn/version "32.1.2-jre"}}
I get this report:
+--------------------------------------------------+---------------+
| dependency | status |
+--------------------------------------------------+---------------+
| closure-compiler-unshaded-v20230802.jar | CVE-2020-8910 |
| google-closure-library-0.0-20230227-c7c0a541.jar | CVE-2020-8910 |
+--------------------------------------------------+---------------+
which is the closest I've managed to get to zero reported vulnerabilities.
I'm going to suppress all of these anyway because they're not important enough but I'd like to request:
1. a version bump of the dependencies that can actually be fixed
2. a new patch release if that's possible...
3. a way to fix closure-compiler and google closure library so I don't have to tell nvd-clojure to shush ๐
So is anything like this already on your radar, or should I open an ask? (I searched on http://ask.clojure.org but didn't find anything, apologies if I missed something)
edit: CVE-2020-8910 suspiciously looks like a false positive :thinking_face:Note that this is a faq on the #C03S1L9DN channel, please check out the previous threads for understanding why this typically doesn't matter, and how you may want to set up nvd-clojure to not bother you with cljs deps (tldr: analyze it for your backend classpath, and making sure clojurescript is not in it. Which typically is good dependency management!) Thanks for using nvd-clojure.
You're right, I should have searched here too before I asked... ๐ > analyze it for your backend classpath, and making sure clojurescript is not in it That's good advice! The thing is I'm using datahike, which brings in clojurescript. I asked them first and they said they're going to remove that dependency eventually but I thought I'd share my findings here too, just in case. Thanks again!
It's no issue @UEQPKG7HQ !
I quite often add :exclusions [org.clojure/clojurescript]
, for reasons other than NVD. e.g. it can bloat/complicate the dependency tree.
@UEQPKG7HQ, notwithstanding all the above, you could start a question on http://ask.clojure.org. The problem (as explained above) is usually not a security hole, the problem is tedious and burdensome questions about why the ClojureScript compiler involves CVEs. A ClojureScript kept tidy of CVEs would require fewer tedious explanations.
I would love some input on this: https://ask.clojure.org/index.php/13176/how-to-transform-js-error-to-a-clojurescript-map
I do this with js exceptions:
(defn error->data [ex]
(merge
(when-let [data (.-data ex)]
{:data data})
{:runtime :cljs
:cause (.-message ex)
:via [{:type (symbol (.-name (type ex)))
:message (.-message ex)}]
:stack (.-stack ex)}))
Although, I think the next release will have something similar baked into cljs via https://github.com/clojure/clojurescript/blob/master/src/main/cljs/cljs/core.cljs#L11825-L11860map>