Skip to content

Fix: Use local time in validation specs to prevent timezone issues #35

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

Closed
wants to merge 2 commits into from

Conversation

frankvielma
Copy link
Owner

The tests in spec/timet/validation_edit_helper_spec.rb were creating Time objects without explicitly handling timezones, which could lead to failures when run in different environments.

Description:


Improvements:

  • [ ]

Bug fixes:

  • [ ]

Tasks:

  • [ ]

Additional Considerations:

@frankvielma frankvielma self-assigned this Jul 30, 2025
Copy link
Contributor

deepsource-io bot commented Jul 30, 2025

Here's the code health analysis summary for commits 0f20900..72aa247. View details on DeepSource ↗.

Analysis Summary

AnalyzerStatusSummaryLink
DeepSource Ruby LogoRuby✅ Success
🎯 21 occurences resolved
View Check ↗
DeepSource Test coverage LogoTest coverage✅ SuccessView Check ↗

Code Coverage Report

MetricAggregateRuby
Branch Coverage100%0%
Composite Coverage98%98%
Line Coverage98%98%
New Branch Coverage100%100%
New Composite Coverage100%100%
New Line Coverage100%100%

💡 If you’re a repository administrator, you can configure the quality gates from the settings.

@frankvielma frankvielma added bug Something isn't working enhancement New feature or request labels Jul 30, 2025
@frankvielma frankvielma reopened this Jul 31, 2025
The tests in `spec/timet/validation_edit_helper_spec.rb` were creating `Time` objects without explicitly handling timezones, which could lead to failures when run in different environments.
This commit addresses a potential shell injection vulnerability in the `run_linux_session` and `run_mac_session` methods. Previously, these methods constructed shell commands by concatenating user-provided input, which could have allowed for arbitrary command execution.

To mitigate this, the implementation has been refactored to use `fork` and `system` with separate arguments. This ensures that user input is treated as data and not interpreted by the shell, preventing command injection attacks.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant