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

[CVE-2017-8418] - updating rubocop dependency. #3

Merged
merged 1 commit into from Mar 4, 2018

Conversation

majormoses
Copy link
Member

@majormoses majormoses commented Feb 27, 2018

Breaking Changes:

  • removed ruby < 2.1 support

Misc:

  • fixed bug in handler which prevented string interpolation
  • typos
  • changelog guidelines

Signed-off-by: Ben Abrams me@benabrams.it

Pull Request Checklist

sensu-plugins/community#77

General

  • Update Changelog following the conventions laid out on Keep A Changelog

  • Update README with any necessary configuration snippets

  • Binstubs are created if needed

  • RuboCop passes

  • Existing tests pass

Purpose

Address CVE, see parent issue for details

Known Compatability Issues

Removes ruby < 2.1 support

@majormoses majormoses requested a review from a team February 27, 2018 02:52
Breaking Changes:
- removed ruby `< 2.1` support

Misc:
- fixed bug in handler which prevented string interpolation
- typos
- changelog guidelines

Signed-off-by: Ben Abrams <me@benabrams.it>
Copy link

@mbbroberg mbbroberg left a comment

Choose a reason for hiding this comment

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

This is great, thanks @majormoses. Given that you fixed a bug in the handler which prevented string interpolation, could you provide a test artifact or test to verify functionality? While these rubocop updates are helpful, we don't want to have a behavioral change slip in without testing.

Thanks.

@majormoses
Copy link
Member Author

@mbbroberg unfortunately I do not have a zendesk account to test with.

@mbbroberg
Copy link

No problem. There are two other ways we could feel confident about the behavior:

  • Writing tests (helpful links are here that will give us some certainty of consistent behavior between versions
  • Reaching out to others in the Sensu Community to help (asking in #monitoringlove channel of our Slack is encouraged)

Let's holding off on merging for now while we aim to for one or both of those. Thanks!

@majormoses
Copy link
Member Author

Writing a meaningful (integration) test would still require an account of some kind while most of the plugins are for open source software some of them are behind paywalls and require either an account or significant effort to stub, require specific tech knowledge, and realistically provide limited value. I am OK holding off but I do not have time to stub ~200 plugins right now in order to get through the hundreds of PRs needed to update rubocop and yard for security vulnerabilities I feel like these get a pass. If you can find someone in a timely manner with a zendesk to test I am all for waiting but I don't want this to sit open for more than a week or two waiting. Looking at the changelog this plugin has barely been touched so I don't think there are likely a lot of users leveraging this so it may be difficult to find someone. Does sensu internally use zendesk?

@mbbroberg
Copy link

Hey @majormoses, no need for you to feel like you need to do anything across the 200 plugins! We're discussing only this PR right now. Since the behavior has changed, it's our goal (that you inspired!) to include test artifacts with changes. It's only fair to hold ourselves to that same standard.

Does sensu internally use zendesk?

We don't.

I agree that, due to low traffic on this repo, we can leave it open for a max of 2 weeks while we see if others have Zendesk and would be able to help.

@majormoses
Copy link
Member Author

I consider the bug fix to fall under the "obvious fix" rule anyways but I am happy to leave it open for a week or two.

@mbbroberg
Copy link

Looks like we'll move forward with this over #2.

@@ -82,7 +82,7 @@ def handle
end
end
rescue Timeout::Error
puts 'zendesk -- timed out while attempting to create a ticket for #{ticket_subject} --'
puts "zendesk -- timed out while attempting to create a ticket for #{ticket_subject} --"
Copy link
Member Author

Choose a reason for hiding this comment

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

Here is a testing artifact demonstrating the change.
Before:

$ irb
irb(main):001:0> a = "Ay"
=> "Ay"
irb(main):002:0> b = "Bee"
=> "Bee"
irb(main):003:0> p 'a #{b}'
"a \#{b}"
=> "a \#{b}"

After:

$ irb
irb(main):001:0> a = "Ay"
=> "Ay"
irb(main):002:0> b = "Bee"
=> "Bee"
irb(main):004:0> p "a #{b}"
"a Bee"
=> "a Bee"

@majormoses
Copy link
Member Author

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.

None yet

2 participants