Repository: ckan/ckan

Issue:
[Snyk] Security upgrade certifi from 2021.10.8 to 2023.7.22
<p>This PR was automatically created by Snyk using the credentials of a real user.</p><br /><h3>Snyk has created this PR to fix one or more vulnerable packages in the `pip` dependencies of this project.</h3>



#### Changes included in this PR

- Changes to the following files to upgrade the vulnerable dependencies to a fixed version:
    - requirements.txt



#### Vulnerabilities that will be fixed





##### By pinning:
Severity                   | Priority Score (*)                   | Issue                   | Upgrade                   | Breaking Change                   | Exploit Maturity
:-------------------------:|-------------------------|:-------------------------|:-------------------------|:-------------------------|:-------------------------
![low severity](https://res.cloudinary.com/snyk/image/upload/w_20,h_20/v1561977819/icon/l.png "low severity")  |  **471/1000**  <br/> **Why?** Recently disclosed, Has a fix available, CVSS 3.7  | Improper Following of a Certificate&#x27;s Chain of Trust <br/>[SNYK-PYTHON-CERTIFI-5805047](https://snyk.io/vuln/SNYK-PYTHON-CERTIFI-5805047) |  `certifi:` <br> `2021.10.8 -> 2023.7.22` <br>  |  No  | No Known Exploit 

(*) Note that the real score may have changed since the PR was raised.




Some vulnerabilities couldn't be fully fixed and so Snyk will still find them when the project is tested again. This may be because the vulnerability existed within more than one direct dependency, but not all of the affected dependencies could be upgraded.


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:  <img src="https://api.segment.io/v1/pixel/track?data=eyJ3cml0ZUtleSI6InJyWmxZcEdHY2RyTHZsb0lYd0dUcVg4WkFRTnNCOUEwIiwiYW5vbnltb3VzSWQiOiI0ZDYxMTQxYy02YTc4LTRjMTctYmU3ZS02OTQ4YjlmODQzMTAiLCJldmVudCI6IlBSIHZpZXdlZCIsInByb3BlcnRpZXMiOnsicHJJZCI6IjRkNjExNDFjLTZhNzgtNGMxNy1iZTdlLTY5NDhiOWY4NDMxMCJ9fQ==" width="0" height="0"/>
🧐 [View latest project report](https://app.snyk.io/org/wardi/project/7696de9f-5904-4fe5-8767-91ee8e4d2b04?utm_source&#x3D;github&amp;utm_medium&#x3D;referral&amp;page&#x3D;fix-pr)

🛠 [Adjust project settings](https://app.snyk.io/org/wardi/project/7696de9f-5904-4fe5-8767-91ee8e4d2b04?utm_source&#x3D;github&amp;utm_medium&#x3D;referral&amp;page&#x3D;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":"4d61141c-6a78-4c17-be7e-6948b9f84310","prPublicId":"4d61141c-6a78-4c17-be7e-6948b9f84310","dependencies":[{"name":"certifi","from":"2021.10.8","to":"2023.7.22"}],"packageManager":"pip","projectPublicId":"7696de9f-5904-4fe5-8767-91ee8e4d2b04","projectUrl":"https://app.snyk.io/org/wardi/project/7696de9f-5904-4fe5-8767-91ee8e4d2b04?utm_source=github&utm_medium=referral&page=fix-pr","type":"auto","patch":[],"vulns":["SNYK-PYTHON-CERTIFI-5805047"],"upgrade":[],"isBreakingChange":false,"env":"prod","prType":"fix","templateVariants":["updated-fix-title","priorityScore"],"priorityScoreList":[471],"remediationStrategy":"vuln"})

---

**Learn how to fix vulnerabilities with free interactive lessons:**

 🦉 [Learn about vulnerability in an interactive lesson of Snyk Learn.](https://learn.snyk.io/?loc&#x3D;fix-pr)



Discussion:

Resolving patch:
diff --git a/ckan/lib/jobs.py b/ckan/lib/jobs.py
--- a/ckan/lib/jobs.py
+++ b/ckan/lib/jobs.py
@@ -287,7 +287,7 @@ def execute_job(self, job: Job, *args: Any, **kwargs: Any) -> None:
         meta.engine.dispose()
 
         # The original implementation performs the actual fork
-        queue = remove_queue_name_prefix(cast(str, job.origin))
+        queue = remove_queue_name_prefix(job.origin)
 
         if not job.meta:
             job.meta = {}


Test patch:
diff --git a/ckan/tests/test_coding_standards.py b/ckan/tests/test_coding_standards.py
--- a/ckan/tests/test_coding_standards.py
+++ b/ckan/tests/test_coding_standards.py
@@ -233,7 +233,7 @@ def test_building_the_docs():
     """
     try:
         output = subprocess.check_output(
-            [b"python", b"setup.py", b"build_sphinx"], stderr=subprocess.STDOUT
+            [b"sphinx-build", b"doc", b"build/sphinx"], stderr=subprocess.STDOUT
         )
     except subprocess.CalledProcessError as err:
         assert (