Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Apply Ruby and Rails patches #4020

Merged
merged 5 commits into from
Jul 14, 2022
Merged

Apply Ruby and Rails patches #4020

merged 5 commits into from
Jul 14, 2022

Conversation

orien
Copy link
Contributor

@orien orien commented Jul 13, 2022

Changes

orien added 3 commits July 13, 2022 09:29
❯ bundle update rails
❯ bundle lock --add-platform x86_64-linux
@orien orien requested a review from a team July 13, 2022 02:44
@orien orien requested a review from grosser as a code owner July 13, 2022 02:44
Copy link
Contributor

@grosser grosser left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

thanks!
confirmed this at least boots/is deployable 🤞

@orien
Copy link
Contributor Author

orien commented Jul 13, 2022

Thanks

Looks like there are a couple more security issues:

Name: diffy
Version: 3.2.0
CVE: CVE-2022-33127
GHSA: GHSA-5ww9-9qp2-x524
Criticality: Critical
URL: https://github.com/samg/diffy/commit/478f392082b66d38f54a02b4bb9c41be32fd6593
Title: Improper handling of double quotes in file name in Diffy in Windows environment
Solution: upgrade to >= 3.4.1

Name: octokit
Version: 4.18.0
CVE: CVE-2022-31072
GHSA: GHSA-g28x-pgr3-qqx6
Criticality: Low
URL: https://github.com/octokit/octokit.rb/security/advisories/GHSA-g28x-pgr3-qqx6
Title: Octokit gem published with world-writable files
Solution: upgrade to >= 4.25.0

Ok for me to add patches for these in this PR?

@grosser
Copy link
Contributor

grosser commented Jul 13, 2022

feel free to add as many patches as you like as long as they are low-risk, but I'd recommend hunting down these test-bugs first before adding more :)

Psych::DisallowedClass: Tried to load unspecified class: ActiveSupport::TimeWithZone
Psych::DisallowedClass: Tried to load unspecified class: BigDecimal

@grosser
Copy link
Contributor

grosser commented Jul 13, 2022

# https://github.com/collectiveidea/audited/issues/631
# List of classes deemed safe to load by YAML, and required by the Audited
# gem when deserialized audit records.
# As of Rails 6.0.5.1, YAML safe-loading method does not allow all classes
# to be deserialized by default: https://discuss.rubyonrails.org/t/cve-2022-32224-possible-rce-escalation-bug-with-serialized-columns-in-active-record/81017
Rails.application.config.active_record.yaml_column_permitted_classes = [
  ActiveSupport::TimeWithZone,
  ActiveSupport::TimeZone,
  Date,
  Time,
  ActiveSupport::HashWithIndifferentAccess,
  BigDecimal
]

@orien
Copy link
Contributor Author

orien commented Jul 14, 2022

I see there's an octokit monkey patch in this project, upgrading the octokit gem will take a bit of work. It's probably best for someone with more familiarity with the project than me to attempt it.

@grosser
Copy link
Contributor

grosser commented Jul 14, 2022

does octokit need the update ?

@grosser
Copy link
Contributor

grosser commented Jul 14, 2022

ahh

Name: octokit
Version: 4.[18](https://github.com/zendesk/samson/runs/7336090878?check_suite_focus=true#step:7:19).0
CVE: CVE-2022-31072

@grosser grosser merged commit 1be5d56 into zendesk:master Jul 14, 2022
@grosser
Copy link
Contributor

grosser commented Jul 14, 2022

taking care of octokit here #4022

@orien orien deleted the rails branch July 14, 2022 09:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants