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.
mikowitz-feed-normalizer
Advanced tools
== Feed Normalizer
An extensible Ruby wrapper for Atom and RSS parsers.
Feed normalizer wraps various RSS and Atom parsers, and returns a single unified object graph, regardless of the underlying feed format.
== Download
== Usage
require 'feed-normalizer'
require 'open-uri'
feed = FeedNormalizer::FeedNormalizer.parse open('http://www.iht.com/rss/frontpage.xml')
feed.title # => "International Herald Tribune"
feed.url # => "http://www.iht.com/pages/index.php"
feed.entries.first.url # => "http://www.iht.com/articles/2006/10/03/frontpage/web.1003UN.php"
feed.class # => FeedNormalizer::Feed
feed.parser # => "RSS::Parser"
Now read an Atom feed, and the same class is returned, and the same terminology applies:
feed = FeedNormalizer::FeedNormalizer.parse open('http://www.atomenabled.org/atom.xml')
feed.title # => "AtomEnabled.org"
feed.url # => "http://www.atomenabled.org/atom.xml"
feed.entries.first.url # => "http://www.atomenabled.org/2006/09/moving-toward-atom.php"
The feed representation stays the same, even though a different parser was used.
feed.class # => FeedNormalizer::Feed
feed.parser # => "SimpleRSS"
== Cleaning / Sanitizing
feed.title # => "My Feed > Your Feed"
feed.entries.first.content # => "<p x='y'>Hello</p><object></object></html>"
feed.clean!
All elements should now be either clean HTML, or HTML escaped strings.
feed.title # => "My Feed > Your Feed"
feed.entries.first.content # => "<p>Hello</p>"
== Extending
Implement a parser wrapper by extending the FeedNormalizer::Parser class and overriding the public methods. Also note the helper methods in the root Parser object to make mapping of output from the particular parser to the Feed object easier.
See FeedNormalizer::RubyRssParser and FeedNormalizer::SimpleRssParser for examples.
== Authors
This library is released under the terms of the BSD License (see the License.txt file for details).
FAQs
Unknown package
We found that mikowitz-feed-normalizer 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.