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.
This gem creates a S2S authentication header to make S2S API requests. S2S header format: Bearer
Add this line to your application's Gemfile:
gem 's2s-auth'
And then execute:
$ bundle
Or install it yourself as:
$ gem install s2s-auth
You need to setup the gem by setting four values:
require "s2s/auth"
# setup
S2S::Auth.setup({secret: "this is my secret",
app: "test",
salt: "f7b5763636f4c1f3ff4bd444eacccca2",
sign_salt: "95d87b990cc104124017ad70550edcfd22b8e89465338254e0b608592a9aac29"
})
# generate http authorization header
S2S::Auth.header
# => {:Authorization=>"Bearer bUcweFFKcUpCcWxPQTczcjZTMm1yYkxBL3RDUFk1L2xKVVY4VjU2R1EwbkExTE00eUI0RkxmNzFwbWM4WS8waS0tQ1hiUWVMZ0FwVVZCOGVqQVc5cFJGQT09--afa1f7353e789cc8fc1a332b0c355fb07a7efb03"}
# generate just the token
S2S::Auth.generate_token
# => "TWRsNE16ZzR3dG9qVjcwKzlEc1B4R0h4UGwyTHcyVTlRZ0szV0EybE1jV3R6VjF1WHpPSnNDcjRaRVdIeGFlYS0tT3FqQktYbmU2cVpvVzdTZzM3ditMdz09--09144f0202ef708622ac8d778cc062f5d62c22a3"
# parse the token
S2S::Auth.parse_token(S2S::Auth.generate_token)
# => {"app"=>"test", "ts"=>"2014-02-11T06:33:39Z"}
FAQs
Unknown package
We found that s2s-auth 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’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.