code4craft / webmagic

A scalable web crawler framework for Java.
http://webmagic.io/
Apache License 2.0
11.37k stars 4.18k forks source link

[Snyk] Security upgrade org.seleniumhq.selenium:selenium-java from 3.141.59 to 4.14.1 #1134

Closed code4craft closed 9 months ago

code4craft commented 9 months ago

This PR was automatically created by Snyk using the credentials of a real user.


Snyk has created this PR to fix one or more vulnerable packages in the `maven` dependencies of this project.

#### Changes included in this PR - Changes to the following files to upgrade the vulnerable dependencies to a fixed version: - pom.xml #### Vulnerabilities that will be fixed ##### With an upgrade: Severity | Priority Score (*) | Issue | Upgrade | Breaking Change | Exploit Maturity :-------------------------:|-------------------------|:-------------------------|:-------------------------|:-------------------------|:------------------------- ![high severity](https://res.cloudinary.com/snyk/image/upload/w_20,h_20/v1561977819/icon/h.png "high severity") | **768/1000**
**Why?** Proof of Concept exploit, Recently disclosed, Has a fix available, CVSS 7.5 | NULL Pointer Dereference
[SNYK-JAVA-ORGSELENIUMHQSELENIUM-6062318](https://snyk.io/vuln/SNYK-JAVA-ORGSELENIUMHQSELENIUM-6062318) | `org.seleniumhq.selenium:selenium-java:`
`3.141.59 -> 4.14.1`
| Yes | Proof of Concept (*) Note that the real score may have changed since the PR was raised. Check the changes in this PR to ensure they won't cause issues with your project. ------------ **Note:** *You are seeing this because you or someone else with access to this repository has authorized Snyk to open fix PRs.* For more information: 🧐 [View latest project report](https://app.snyk.io/org/code4craft/project/9dcd29e5-d56d-4949-8c21-0e901ff2de06?utm_source=github&utm_medium=referral&page=fix-pr) 🛠 [Adjust project settings](https://app.snyk.io/org/code4craft/project/9dcd29e5-d56d-4949-8c21-0e901ff2de06?utm_source=github&utm_medium=referral&page=fix-pr/settings) 📚 [Read more about Snyk's upgrade and patch logic](https://support.snyk.io/hc/en-us/articles/360003891078-Snyk-patches-to-fix-vulnerabilities) [//]: # (snyk:metadata:{"prId":"a7ba535c-9956-455d-97c8-987cc92fb0c9","prPublicId":"a7ba535c-9956-455d-97c8-987cc92fb0c9","dependencies":[{"name":"org.seleniumhq.selenium:selenium-java","from":"3.141.59","to":"4.14.1"}],"packageManager":"maven","projectPublicId":"9dcd29e5-d56d-4949-8c21-0e901ff2de06","projectUrl":"https://app.snyk.io/org/code4craft/project/9dcd29e5-d56d-4949-8c21-0e901ff2de06?utm_source=github&utm_medium=referral&page=fix-pr","type":"auto","patch":[],"vulns":["SNYK-JAVA-ORGSELENIUMHQSELENIUM-6062318"],"upgrade":["SNYK-JAVA-ORGSELENIUMHQSELENIUM-6062318"],"isBreakingChange":true,"env":"prod","prType":"fix","templateVariants":["updated-fix-title","priorityScore"],"priorityScoreList":[768],"remediationStrategy":"vuln"}) --- **Learn how to fix vulnerabilities with free interactive lessons:** 🦉 [NULL Pointer Dereference](https://learn.snyk.io/lesson/null-dereference/?loc=fix-pr)
sutra commented 5 months ago

This change, requires to upgrade Java from 1.8(Class file version 52.0) to 11(Class file version 55.0) as well:

[ERROR] Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:3.10.1:compile (default-compile) on project webmagic-selenium: Compilation failure
[ERROR] /Users/xxx/workspace/webmagic/webmagic-selenium/src/main/java/us/codecraft/webmagic/downloader/selenium/WebDriverPool.java:[15,27] cannot access org.openqa.selenium.WebDriver
[ERROR]   bad class file: /Users/xxx/.m2/repository/org/seleniumhq/selenium/selenium-api/4.14.1/selenium-api-4.14.1.jar(org/openqa/selenium/WebDriver.class)
[ERROR]     class file has wrong version 55.0, should be 52.0
[ERROR]     Please remove or make sure it appears in the correct subdirectory of the classpath.