Security News
Research
Data Theft Repackaged: A Case Study in Malicious Wrapper Packages on npm
The Socket Research Team breaks down a malicious wrapper package that uses obfuscation to harvest credentials and exfiltrate sensitive data.
This is an api to utilize RedCAP api with ruby.
To start:
Test cases are the best place to look for examples. Here are some simple examples.
r = RedcapSurveyApi::RedcapApi.new({:token => "abc123", :url => "http://localhost/redcap/api"}) # Authentication token provided by RedCAP, server API url.
r = RedcapSurveyApi::RedcapApi.new({:token => "abc123", :url => "http://localhost/redcap/api", :parser => JSON}) # Set the parser, default is JSON, other parsers are Nokogiri::XML, CSV, RedcapSurveyApi::EmptyParser. See tests for examples.
r.export() # returns all records in 'parser' format, provide additional hash of parameters in you want to override or add any additional RedCAP options.
r.export_metadata() # returns all metadata records in JSON format, provide additional hash of parameters in you want to override or add any additional RedCAP options.
r.export_metadata_fields() # returns all fields (this is a sub-set of metadata).
r.import() # imports new records.
r.export({:parser => RedcapSurveyApi::EmptyParser}) # returns the raw data, this allows you to get data without going through the parser.
There is also a helper class added to ruby Hash allowing you to convert a ruby array to a http-post style array. I created this after having some issues filtering on 'forms' and 'fields'
Example:
params = {:fields => ['record_id', 'lab_id'], :forms => ['slide_tracking', 'id_shipping']} # This is the data I want to send to RedCAP, limiting the fields and forms
r.export_metadata(params.to_http_post_array()) # This gets the metadata for only those fields/forms by using the newly added method on Hash 'to_http_post_array'.
git checkout -b my-new-feature
)git commit -am 'Add some feature'
)git push origin my-new-feature
)FAQs
Unknown package
We found that redcap-survey-api demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer 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.
Security News
Research
The Socket Research Team breaks down a malicious wrapper package that uses obfuscation to harvest credentials and exfiltrate sensitive data.
Research
Security News
Attackers used a malicious npm package typosquatting a popular ESLint plugin to steal sensitive data, execute commands, and exploit developer systems.
Security News
The Ultralytics' PyPI Package was compromised four times in one weekend through GitHub Actions cache poisoning and failure to rotate previously compromised API tokens.