
Research
Security News
The Growing Risk of Malicious Browser Extensions
Socket researchers uncover how browser extensions in trusted stores are used to hijack sessions, redirect traffic, and manipulate user behavior.
A parser for DSS comments in CSS.
DSS allows documentation of CSS using comments in CSS files, designed to be machine readable for living style guides. For more information on DSS https://github.com/DSSWG/DSS.
This has a couple of additional parsers beyond the DSS spec
Add this line to your application's Gemfile:
gem 'dss-parser'
And then execute:
$ bundle
Or install it yourself as:
$ gem install dss-parser
To use DSS create an instance of dss-parser parsing in a folder containing your css. It will recusivly pass any css/scss files in that directory. And then find any DSS comments.
parser = DssParser.new('/path/to/stylesheets')
dss = parser.get_dss
This will create an array of DSS comments that can be used e.g.
dss.each do |d|
d.name
d.description
d.markup
d.section
d.states.each do |state|
state.name
state.description
end
d.variables.each do |variable|
variable.name
variable.description
end
end
The gem contains parsers for the main DSS attributes but can be extended with your own parsers.
parser = DssParser.new('/path/to/stylesheet')
parser.register_parser(MyParser::AdditionalAttribute)
dss = parser.get_dss
To create your own parser take a look at the parsers in lib/dss_parser/parsers.
git checkout -b my-new-feature
)git commit -am 'Add some feature'
)git push origin my-new-feature
)FAQs
Unknown package
We found that dss_parser 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.
Research
Security News
Socket researchers uncover how browser extensions in trusted stores are used to hijack sessions, redirect traffic, and manipulate user behavior.
Research
Security News
An in-depth analysis of credential stealers, crypto drainers, cryptojackers, and clipboard hijackers abusing open source package registries to compromise Web3 development environments.
Security News
pnpm 10.12.1 introduces a global virtual store for faster installs and new options for managing dependencies with version catalogs.