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.
omniauth-amazon-sp-api
Advanced tools
Website authorization flow for Amazon Selling Partner APIs.
Here's an example for adding the middleware to a Rails app in config/initializers/omniauth.rb
:
Rails.application.config.middleware.use OmniAuth::Builder do
provider :amazon_sp_api, ENV['AMAZON_SP_API_CLIENT_ID'], ENV['AMAZON_SP_API_CLIENT_SECRET'],
redirect_uri: "https://example.com/auth/amazon_sp_api/callback", # if you need to override the default URL generated by the gem
authorize_params: {
application_id: ENV['AMAZON_SP_API_APPLICATION_ID'],
version: 'beta', # If you app is in Draft state, this is required.
},
client_options: {
authorize_url: 'https://sellercentral.amazon.com/apps/authorize/consent',
site: Rails.env.production? ? 'https://sellingpartnerapi-na.amazon.com' : 'https://sandbox.sellingpartnerapi-na.amazon.com'
}
end
Here's an example if you are using Devise. Add this to config/initializers/devise.rb
:
config.omniauth :amazon_sp_api, ENV['AMAZON_SP_API_CLIENT_ID'], ENV['AMAZON_SP_API_CLIENT_SECRET'], {
redirect_uri: "https://example.com/auth/amazon_sp_api/callback", # if you need to override the default URL generated by the gem
authorize_params: {
application_id: ENV['AMAZON_SP_API_APPLICATION_ID'],
version: 'beta', # If you app is in Draft state, this is required.
},
}
Then update your User
model:
devise(
# Other Devise options
omniauth_providers: [:amazon_sp_api],
)
FAQs
Unknown package
We found that omniauth-amazon-sp-api 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.