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.
shiro-perms
Advanced tools
Create, check and manipulate permissions using a Trie data object and Apache Shiro write style.
Module exposes a class that can be used to create permissions objects. Each instance object represents a set of credentials which can be manipulated and verified using instance methods.
const ShiroPerms = require('shiro-perms');
import ShiroPerms from 'shiro-perms';
Use:
npm i shiro-perms
Or
yarn add shiro-perms
Use:
npm run test
Or
yarn test
Using class constructor:
const perms = new ShiroPerms();
Static methods:
const perms = ShiroPerms.from('store:view,edit store:*:1123');
const perms = ShiroPerms.from(['store:view,edit', 'store:*:1123']);
Check ALL permissions - AND
perms.check('store:view:9999')
// True
perms.check('store:view store:edit:*')
// True
perms.check(['store:view', 'store:edit:9999'])
// False
Check ANY permissions - OR
perms.checkAny(['store:view', 'store:edit:9999'])
// True
....
...
...
This project is licensed under the MIT License
FAQs
Apache Shiro permission style using Trie data structure
The npm package shiro-perms receives a total of 112 weekly downloads. As such, shiro-perms popularity was classified as not popular.
We found that shiro-perms 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.