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 adds some basic helpers to rails that let you use the Fatcow icon set in all of it's early-2010s glory.
You can browse the icons via wikimedia.
To install, simply add it to your gemfile,
gem 'fatcow'
then add the (optional) stylesheet to your template:
<%= stylesheet_link_tag 'fatcow/application', "data-turbo-track": "reload" %>
and you're good to go!
In any view, just use the fci
helper to place an arbitrary icon.
<%= fci :note %>
You can also include a status, which is a small icon placed in the bottom left hand corner of the icon.
<%= fci :note, :add %>
You can also assign an icon to a model,
which will then be displayable with a status reflecting the current state of the record.
Add the has_icon
macro into your model definition, and you're good to go.
class Alert < ActiveRecord
has_icon :bell
end
There are some default statuses (:add
for new records, :edit
for persisted records in a form, etc.)
but you can include + overwrite statues using the same macro.
Provide show
statuses to be used with record.show_icon
and form
statuses to be used with record.form_icon
.
Include the name of the status as the key, and the value should be a Proc
that returns true/false,
and is executed in the context of the record instance.
class Alert < ActiveRecord
has_icon :bell, show: { attach: -> { has_attachment? } }, form: { warning: -> { invalid? } }
end
Then, to show your icon in a view, just call either #show_icon
(when showing the resource) or #form_icon
(when
displaying a form) on a record instance, and pass it to fci
.
You cannot do this on collections, though that may be coming later.
<%= fci @alert.show_icon %>
FatCow web icons are licensed under a Creative Commons Attribution 3.0 License. This library has opted to do the same because I'm not a lawyer and I have no idea what I'm doing.
All icons are attributed to FatCow, who formerly hosted the icons at http://www.fatcow.com/free-icons. (Archive)
FAQs
Unknown package
We found that fatcow demonstrated a healthy version release cadence and project activity because the last version was released less than 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.