Research
Security News
Malicious npm Packages Inject SSH Backdoors via Typosquatted Libraries
Socket’s threat research team has detected six malicious npm packages typosquatting popular libraries to insert SSH backdoors.
librariesio-url-parser
Advanced tools
Repository URL parsing library for https://libraries.io
Parse a org/repo string from an input string:
GithubURLParser.parse("https://github.com/rails/rails/") #=> rails/rails
GithubURLParser.parse("git@github.com:rails/rails.git") #=> rails/rails
GithubURLParser.parse("https://github.com/rails/rails.git") #=> rails/rails
GithubURLParser.parse("https://github.com") #=> nil
Parse a full url from an input string:
GithubURLParser.parse_to_full_url("https://github.com/rails/rails/") #=> https://github.com/rails/rails
GithubURLParser.parse_to_full_url("git@github.com:rails/rails.git") #=> https://github.com/rails/rails
GithubURLParser.parse_to_full_url("https://github.com/rails/rails.git") #=> https://github.com/rails/rails
GithubURLParser.parse_to_full_url("https://github.com") #=> nil
Parse an org/user url from an input string:
GithubURLParser.parse_to_full_user_url("https://github.com/rails/rails/") #=> nil
GithubURLParser.parse_to_full_user_url("git@github.com:rails/rails.git") #=> nil
GithubURLParser.parse_to_full_user_url("https://github.com/rails/rails.git") #=> nil
GithubURLParser.parse_to_full_user_url("https://github.com") #=> nil
GithubURLParser.parse_to_full_user_url("https://github.com/rails") #=> https://github.com/rails
Parse a full url from an input string where the repository is unknown
URLParser.try_all("git@github.com:rails/rails.git") #=> https://github.com/rails/rails
URLParser.try_all("git@gitlab.com:inkscape/inkscape.git") #=> "https://gitlab.com/inkscape/inkscape"
URLParser.try_all("git@bitbucket.org:tildeslash/monit.git") #=> "https://bitbucket.org/tildeslash/monit"
After checking out the repo, run bundle install
to install dependencies. Then, run rake spec
to run the tests.
Bug reports and pull requests are welcome on GitHub at https://github.com/librariesio/librariesio-url-parser. This project is intended to be a safe, welcoming space for collaboration, and contributors are expected to adhere to the Contributor Covenant code of conduct.
FAQs
Unknown package
We found that librariesio-url-parser 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.
Research
Security News
Socket’s threat research team has detected six malicious npm packages typosquatting popular libraries to insert SSH backdoors.
Security News
MITRE's 2024 CWE Top 25 highlights critical software vulnerabilities like XSS, SQL Injection, and CSRF, reflecting shifts due to a refined ranking methodology.
Security News
In this segment of the Risky Business podcast, Feross Aboukhadijeh and Patrick Gray discuss the challenges of tracking malware discovered in open source softare.