
Security News
Follow-up and Clarification on Recent Malicious Ruby Gems Campaign
A clarification on our recent research investigating 60 malicious Ruby gems.
ExecCSSLint is a thin Ruby wrapper that uses ExecJS to execute [csslint]. It is heavily inspired by Dean Strelau's https://github.com/mintdigital/execjslint.
$ gem install execcsslint
require 'execcsslint'
css = File.open('path/to/my.css')
results = CSSLint.run(css)
if !result.valid?
# There were errors
puts "Check your CSS"
puts result.error_messages
elsif !result.error_messages.empty?
# There were warnings
puts "You may want to take at look at your CSS"
puts result.error_messages
else
puts "Great job pal"
end
CSSLint.run
accepts an IO object (that responds to read()
) or a string.
If you're looking to use this in a Rails app, take a look at [examples/csslint.rake](the example rake task).
You'll need one of the [execjs-runtimes](supported ExecJS runtimes). OS X comes with JavaScriptCore by default, so you likely don't need to install anything.
Right now, ExecCSSLint
does not support setting global csslint options, so you'll
have to include them in a /*csslint */
comment at the top of each file.
csslint.js
will automatically parse and apply options specified like this. A
full list of options is available on [csslint.net].
ExecCSSLint depends on the csslint-source
gem, which is a ruby packaging
of the official csslint.js. By default, ExecCSSLint depends on the
latest version of the csslint-source
gem. As there are no official releases
of csslint, csslint-source
is versioned according to [the date at the top of
csslint.js][csslint-date] (eg, 2012.03.16
). rubygems.org has a [full list of
csslint-source
gem versions][source-versions].
To override this, you can specify an explicit dependency on csslint-source
,
for example, using bundler:
gem 'execcsslint'
gem 'csslint-source', '2012.03.17'
You can also explicitly specify a local copy of csslint.js
to use by setting
the CSSLINT_PATH
env variable.
$ CSSLINT_PATH=../lib/csslint.js rake csslint
FAQs
Unknown package
We found that execcsslint demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 2 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.
Security News
A clarification on our recent research investigating 60 malicious Ruby gems.
Security News
ESLint now supports parallel linting with a new --concurrency flag, delivering major speed gains and closing a 10-year-old feature request.
Research
/Security News
A malicious Go module posing as an SSH brute forcer exfiltrates stolen credentials to a Telegram bot controlled by a Russian-speaking threat actor.