Benign gem 10,070,978 installs Download

mjml-rails 4.2.4

Legitimate MJML Rails gem

“Render MJML + ERb template views in Rails”

Ruby subshell command executionpopen pipes to/from command
SHA-256a755fae40e30eb7e4f0b06a4abc90e0ea9dc69d0f7bcbc0490973aa5b32e80ff

Evidence

Open3 popen call parser_test.rb · lines 60–71
60:47…
61 let(:error) { 'shell error' }
62 let(:stderr) { mock('stderr', eof?: false, read: error) }
63
64 before { Open3.stubs(popen3: [nil, nil, stderr, nil]) }
65
66 it 'raises exception' do
67 -> { parser.run "/tmp/input_file.mjml" }.must_raise(Mjml::Parser::ParseError, error)
68 end
69 end
70 end
71end
popen pipes to/from command mjml.rb · lines 12–26
⋯4 lines
16
17 def self.check_version(bin)
18 IO.popen("#{bin} --version") { |io| io.read.include?("mjml-core: #{Mjml.mjml_binary_version_supported}") }
19 rescue
20 false
⋯6 lines
Ruby subshell command execution mjml.rb · lines 28–33
28:6… Check for a local install of MJML binary
29 installer_path = (`npm bin` || `yarn bin`).chomp
30 mjml_bin = File.join(installer_path, 'mjml')
31 return mjml_bin if check_version(mjml_bin)
32
33 puts Mjml.mjml_bina …
References a public code-forge URL mjml.rb · lines 51–55
51:26… hen top-level layout/template is rendered
52 #
53 # [0] - https://github.com/mjmlio/mjml/blob/master/doc/guide.md#mjml
54 if compiled_source =~ /<mjml(.+)?>/i
55 "Mjml::Mjmltemplate.to_html(begin;# …

No evidence locations were recorded for this file. Raw result

Keyboard shortcuts on this page: j for the next sample, k for the previous one, x to go back to the feed, d to download the original bytes, r to re-queue the sample for analysis.