
Security News
Nx npm Packages Compromised in Supply Chain Attack Weaponizing AI CLI Tools
Malicious Nx npm versions stole secrets and wallet info using AI CLI tools; Socket’s AI scanner detected the supply chain attack and flagged the malware.
Heap OAuth2 Strategy for OmniAuth.
Read the Heap OAuth docs for more details:
Add to your Gemfile
:
gem 'omniauth-heap'
Then bundle install
.
OmniAuth::Strategies::Heap
is simply a Rack middleware. Read the OmniAuth docs for detailed instructions: https://github.com/intridea/omniauth.
Here's a quick example, adding the middleware to a Rails app in config/initializers/omniauth.rb
:
Rails.application.config.middleware.use OmniAuth::Builder do
provider :heap, ENV['OAUTH_HEAP_KEY'], ENV['OAUTH_HEAP_SECRET'], scope: 'segment'
end
segment
is the only currently supported Scope (as of Feb 2022)
To start the authentication process with Heap you simply need to access /auth/heap
route.
You define a callback URL in Heap that is matched 1-1 (no query string parameters allowed). To make sure the value entered into Heap matches exactly, define the callback URL as an environment variable.
OAUTH_HEAP_CALLBACK_URL="https://auth.example.com/auth/heap/callback"
Here's an example Auth Hash available in request.env['omniauth.auth']
:
{
:provider => 'heap',
:uid => 'fa267e34-ebd3-463f-92db-e065932cee90',
:info => {
:email => 'pam@example.co',
:env_id => '2544353',
},
:credentials => {
:token => 'ehJy6IkiOiJFUzUxGcGnR5cMiXVCJ9.eyJqdGk47eiOiIc209c5eiJod431ce3272dd213a9...',
:expires => false
},
:extra => {
:raw_info => {
:env_id => '2544353',
:partner_app_id => '4',
:authorized_by => 'pam@example.co',
:authorized_scope => 'segment',
:authorized_at_utc => '2022-01-18T17:37:30.119148Z',
}
}
}
FAQs
Unknown package
We found that omniauth-heap 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
Malicious Nx npm versions stole secrets and wallet info using AI CLI tools; Socket’s AI scanner detected the supply chain attack and flagged the malware.
Security News
CISA’s 2025 draft SBOM guidance adds new fields like hashes, licenses, and tool metadata to make software inventories more actionable.
Security News
A clarification on our recent research investigating 60 malicious Ruby gems.