Research
Security News
Malicious npm Packages Inject SSH Backdoors via Typosquatted Libraries
Socket’s threat research team has detected six malicious npm packages typosquatting popular libraries to insert SSH backdoors.
Use google-api-ruby-client and Google Drive to convert files from one mime-type to another. For available formats see Google Drive API Export Formats.
Simply add it to your Gemfile:
gem 'file-convert'
FileConvert
exposes .configure
which accepts a block and passes the config hash.
Example:
FileConvert.configure do |config|
config['google_service_account'] = {
'email' => '<strange-hash>@developer.gserviceaccount.com',
'pkcs12_file_path' => 'config/file_convert_key.p12'
}
end
# converts `path_to_some_file` from <txt> to <pdf>
conversion = FileConvert.convert('path_to_some_file.txt', 'text/plain', 'application/pdf')
# converted body is accessible via `#body`
conversion.body
# .. or define a path to save the converted document to
conversion.save('path_to_new_file.pdf')
$ bundle exec rake
for rspec
and rubocop
.$ bundle exec rake build
to also run the integration
tests located at spec/integration/**/*_integration.rb
.
Note that you need to configure valid Google API credentials (i.e. set ENV['email']
and ENV['pkcspath']
) for these tests to work, since we want to actually test the integration with the Google API here. (Do not worry, TravisCI will run these tests as well.)In lieu of a formal styleguide, take care to maintain the existing coding style. Add unit tests for any new or changed functionality. Lint and test your code using the ways described above.
file-convert is Copyright © 2014 Roman Ernst and tolingo GmbH and may be redistributed under the terms specified in the LICENSE file.
FAQs
Unknown package
We found that file-convert demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 3 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Research
Security News
Socket’s threat research team has detected six malicious npm packages typosquatting popular libraries to insert SSH backdoors.
Security News
MITRE's 2024 CWE Top 25 highlights critical software vulnerabilities like XSS, SQL Injection, and CSRF, reflecting shifts due to a refined ranking methodology.
Security News
In this segment of the Risky Business podcast, Feross Aboukhadijeh and Patrick Gray discuss the challenges of tracking malware discovered in open source softare.