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.
Rails' default update_attributes
behavior is that when any validation fails,
none of the data gets saved. However, in some instances this is not the most
ideal behavior. If you import partial data which users then have the task of
completing, not saving partially completed forms can create a really negative
user experience and decrease overall completion (or conversion) rates.
For example, some users complained when their incomplete changes didn't stick bceause they had intended to send the remainder of the form to a colleague to complete the rest.
This gem encapsulates the logic I've used to ensure that partially completed forms still persist.
class Person < ActiveRecord::Base
# Include the module.
include SaveWhatsValid
# These are the attributes available on the model.
attr_accessible :age, :description, :first_name, :last_name, :middle_initial
# These two attributes are required.
validates_presence_of :first_name
validates_presence_of :last_name
# These are the attributes we want to save any valid value for.
save_whats_valid :age, :description, :first_name, :last_name
end
FAQs
Unknown package
We found that save_whats_valid 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.