scylladb / scylla-cdc-source-connector

A Kafka source connector capturing Scylla CDC changes
Apache License 2.0
46 stars 18 forks source link

Remove debezium-embedded dependency #26

Closed avelanarius closed 1 year ago

avelanarius commented 1 year ago

Remove debezium-embedded dependency for a few reasons:

  1. It's deprecated by Debezium
  2. One of it's dependencies (org.eclipse.jetty:jetty-server) had CVE-2022-2191 vulnerability
  3. It was unused

After removing this dependency, ConfigSerializerUtil class stopped compiling. Added back commons-lang3 and connect-transforms transitive dependencies (which are not affected by CVE-2022-2191).

avelanarius commented 1 year ago

Before:

$ trivy repo https://github.com/scylladb/scylla-cdc-source-connector

pom.xml (pom)

Total: 6 (UNKNOWN: 0, LOW: 3, MEDIUM: 2, HIGH: 1, CRITICAL: 0)

┌──────────────────────────────────┬────────────────┬──────────┬───────────────────┬───────────────────────────────────┬─────────────────────────────────────────────────────────────┐
│             Library              │ Vulnerability  │ Severity │ Installed Version │           Fixed Version           │                            Title                            │
├──────────────────────────────────┼────────────────┼──────────┼───────────────────┼───────────────────────────────────┼─────────────────────────────────────────────────────────────┤
│ com.google.guava:guava           │ CVE-2020-8908  │ LOW      │ 24.1.1-jre        │ 30.0                              │ guava: local information disclosure via temporary directory │
│                                  │                │          │                   │                                   │ created with unsafe permissions                             │
│                                  │                │          │                   │                                   │ https://avd.aquasec.com/nvd/cve-2020-8908                   │
├──────────────────────────────────┼────────────────┼──────────┼───────────────────┼───────────────────────────────────┼─────────────────────────────────────────────────────────────┤
│ io.netty:netty-handler           │ CVE-2022-24823 │ MEDIUM   │ 4.1.75.Final      │ 4.1.77.Final                      │ netty: world readable temporary file containing sensitive   │
│                                  │                │          │                   │                                   │ data                                                        │
│                                  │                │          │                   │                                   │ https://avd.aquasec.com/nvd/cve-2022-24823                  │
├──────────────────────────────────┼────────────────┼──────────┼───────────────────┼───────────────────────────────────┼─────────────────────────────────────────────────────────────┤
│ org.eclipse.jetty:jetty-http     │ CVE-2022-2047  │ LOW      │ 11.0.2            │ 9.4.46.v20220331, 10.0.9, 11.0.10 │ jetty-http: improver hostname input handling                │
│                                  │                │          │                   │                                   │ https://avd.aquasec.com/nvd/cve-2022-2047                   │
├──────────────────────────────────┼────────────────┼──────────┤                   ├───────────────────────────────────┼─────────────────────────────────────────────────────────────┤
│ org.eclipse.jetty:jetty-server   │ CVE-2022-2191  │ HIGH     │                   │                                   │ jetty-server: Improper release of ByteBuffers in            │
│                                  │                │          │                   │                                   │ SslConnections                                              │
│                                  │                │          │                   │                                   │ https://avd.aquasec.com/nvd/cve-2022-2191                   │
│                                  ├────────────────┼──────────┤                   ├───────────────────────────────────┼─────────────────────────────────────────────────────────────┤
│                                  │ CVE-2021-34428 │ LOW      │                   │ 9.4.40.v20210413, 10.0.3, 11.0.3  │ jetty: SessionListener can prevent a session from being     │
│                                  │                │          │                   │                                   │ invalidated breaking logout                                 │
│                                  │                │          │                   │                                   │ https://avd.aquasec.com/nvd/cve-2021-34428                  │
├──────────────────────────────────┼────────────────┼──────────┼───────────────────┼───────────────────────────────────┼─────────────────────────────────────────────────────────────┤
│ org.eclipse.jetty:jetty-servlets │ CVE-2021-28169 │ MEDIUM   │ 9.4.33.v20201020  │ 9.4.41, 10.0.3, 11.0.3            │ jetty: requests to the ConcatServlet and WelcomeFilter are  │
│                                  │                │          │                   │                                   │ able to access protected...                                 │
│                                  │                │          │                   │                                   │ https://avd.aquasec.com/nvd/cve-2021-28169                  │
└──────────────────────────────────┴────────────────┴──────────┴───────────────────┴───────────────────────────────────┴─────────────────────────────────────────────────────────────┘

After:

$ trivy repo --branch=debezium-embedded-remove https://github.com/avelanarius/scylla

pom.xml (pom)

Total: 2 (UNKNOWN: 0, LOW: 1, MEDIUM: 1, HIGH: 0, CRITICAL: 0)

┌────────────────────────┬────────────────┬──────────┬───────────────────┬───────────────┬─────────────────────────────────────────────────────────────┐
│        Library         │ Vulnerability  │ Severity │ Installed Version │ Fixed Version │                            Title                            │
├────────────────────────┼────────────────┼──────────┼───────────────────┼───────────────┼─────────────────────────────────────────────────────────────┤
│ com.google.guava:guava │ CVE-2020-8908  │ LOW      │ 24.1.1-jre        │ 30.0          │ guava: local information disclosure via temporary directory │
│                        │                │          │                   │               │ created with unsafe permissions                             │
│                        │                │          │                   │               │ https://avd.aquasec.com/nvd/cve-2020-8908                   │
├────────────────────────┼────────────────┼──────────┼───────────────────┼───────────────┼─────────────────────────────────────────────────────────────┤
│ io.netty:netty-handler │ CVE-2022-24823 │ MEDIUM   │ 4.1.75.Final      │ 4.1.77.Final  │ netty: world readable temporary file containing sensitive   │
│                        │                │          │                   │               │ data                                                        │
│                        │                │          │                   │               │ https://avd.aquasec.com/nvd/cve-2022-24823                  │
└────────────────────────┴────────────────┴──────────┴───────────────────┴───────────────┴─────────────────────────────────────────────────────────────┘