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 gem adds the ability to swap words in strings marked for translation. It is an extension to fast_gettext.
For example, given you have set the system to replace <my project>
with GettextSwap
:
swapped = _('Welcome to <my project')
# => 'Welcome to GettextSwap'
Add this line to your application's Gemfile:
gem 'gettext_swap'
And then execute:
$ bundle
First you have to build a yaml file that will contain the rules for the swapper.
swap
search
- regular expression to search in the source, and replace
- the string to use for replacement.Example:
swap:
- search: '\bForeman\b(?!-)'
replace: 'Satellite'
- search: '\bsmart proxy\b(?!-)'
replace: 'capsule'
- search: '\bproxy\b(?!-)'
replace: 'Capsule'
To apply the rules, point GettextSwap to the file containing the rules.
GettextSwap.configure 'config/test/test.yaml'
This gem uses rubocop to validate styling and minitest framework for testing.
Run rubocop
and rake test
to verify your code.
Bug reports and pull requests are welcome on GitHub at https://github.com/ShimShtein/gettext_swap.
See LICENSE file.
FAQs
Unknown package
We found that gettext_swap 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.