
Research
/Security News
Critical Vulnerability in NestJS Devtools: Localhost RCE via Sandbox Escape
A flawed sandbox in @nestjs/devtools-integration lets attackers run code on your machine via CSRF, leading to full Remote Code Execution (RCE).
A gem for managing ldap groups used with hydra
Add this line to your application's Gemfile:
gem 'hydra-ldap'
And then execute:
$ bundle
Or install it yourself as:
$ gem install hydra-ldap
Create the config file (config/ldap.yml) by running:
rails generate hydra-ldap
Made the filters, attributes and result parsing all parameters as frequently as possible, to try and make this usable to many LDAP directory set ups.
It might be helpful to look at the hydra-ldap-example.ldif, config/hydra-ldap.yml and spec/integration/ldap_spec.rb to see what type of configuration the tests are running for comparison purposes.
The attributes here would change based on LDAP configuration.
attrs = { :cn => 'Test' :objectclass => 'groupofnames' :description => 'my test group contains users, and owners' :owner => 'uid=abc123' :member => ['john', 'jane', 'fido'] } Hydra::LDAP.create_group(group_code, attributes{})
Examples of how to customize the results being returned, print out the cn attribute for the groups owned by this user (hoping these are helpful for NU).
filter = Net::LDAP::Filter.construct("(owner=uid=quentin,ou=people,dc=example,dc=org)") Hydra::LDAP.groups_owned_by_user(filter, ['owner', 'cn']){ |result| result.map{ |r| puts r[:cn].first } }
uid = 'uid' filter=Net::LDAP::Filter.construct("(&(objectClass=groupofnames)(member=uid=#{uid}))") attributes = ['cn'] Hydra::LDAP.groups_for_user(filter, attributes){ |result| result.map { |r| r[:cn].first }}
filter = Net::LDAP::Filter.construct("(cn=#{group_code})") attributes = ['default attribute is description'] Hydra::LDAP.title_of_group(group_code, filter, attributes){ |result| result.first[:description].first }
filter = Net::LDAP::Filter.construct("(cn=#{group_code})") Hydra::LDAP.users_for_group(group_code, filter, ['member']){ |result| result.first[:uniquemember].map{ |r| r.sub(/^uid=/, '') }}
filter = Net::LDAP::Filter.construct("(cn=#{group_code})") Hydra::LDAP.owner_for_group(group_code, filter, ['owner']) { |result| result.first[:owner].map{ |r| r.sub(/^uid=/, '') }}
These are all pretty similar to previous calls, if not the same signatures.
Hydra::LDAP.delete_group(group_code).should be_true
Hydra::LDAP.add_users_to_group(group_code, ['bruce', 'beth'])
Hydra::LDAP.remove_users_from_group(group_code, ['bruce'])
git checkout -b my-new-feature
)git commit -am 'Added some feature'
)git push origin my-new-feature
)FAQs
Unknown package
We found that hydra-ldap 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
A flawed sandbox in @nestjs/devtools-integration lets attackers run code on your machine via CSRF, leading to full Remote Code Execution (RCE).
Product
Customize license detection with Socket’s new license overlays: gain control, reduce noise, and handle edge cases with precision.
Product
Socket now supports Rust and Cargo, offering package search for all users and experimental SBOM generation for enterprise projects.