Gathering detailed insights and metrics for casbin-sequelize-adapter
Gathering detailed insights and metrics for casbin-sequelize-adapter
Gathering detailed insights and metrics for casbin-sequelize-adapter
Gathering detailed insights and metrics for casbin-sequelize-adapter
npm install casbin-sequelize-adapter
Typescript
Module System
Node Version
NPM Version
TypeScript (98.43%)
JavaScript (1.57%)
Total Downloads
0
Last Day
0
Last Week
0
Last Month
0
Last Year
0
Apache-2.0 License
63 Stars
82 Commits
33 Forks
3 Watchers
2 Branches
18 Contributors
Updated on May 15, 2025
Latest Version
2.7.1
Package Id
casbin-sequelize-adapter@2.7.1
Unpacked Size
32.95 kB
Size
9.15 kB
File Count
9
NPM Version
10.2.3
Node Version
18.19.0
Published on
Dec 09, 2023
Cumulative downloads
Total Downloads
Last Day
0%
NaN
Compared to previous day
Last Week
0%
NaN
Compared to previous week
Last Month
0%
NaN
Compared to previous month
Last Year
0%
NaN
Compared to previous year
3
1
Sequelize Adapter is the Sequelize adapter for Node-Casbin. With this library, Node-Casbin can load policy from Sequelize supported database or save policy to it.
Based on Officially Supported Databases, the current supported databases are:
You may find other 3rd-party supported DBs in Sequelize website or other places.
NPM Install
1npm install casbin-sequelize-adapter --save
Yarn Install
1yarn add casbin-sequelize-adapter
Start mysql for tests:
1docker compose up -d
1yarn test
1import casbin from 'casbin'; 2import { SequelizeAdapter } from 'casbin-sequelize-adapter'; 3 4async function myFunction() { 5 // Initialize a Sequelize adapter and use it in a Node-Casbin enforcer: 6 // The adapter can not automatically create database. 7 // But the adapter will automatically and use the table named "casbin_rule". 8 // The second boolean argument: autoCreateTable determines whether the adapter will automatically create the "casbin_rule" table. 9 // ORM should not create databases automatically. 10 const a = await SequelizeAdapter.newAdapter( 11 { 12 username: 'root', 13 password: '', 14 database: 'casbin', 15 dialect: 'mysql', 16 }, 17 true, 18 ); 19 20 const e = await casbin.newEnforcer('examples/rbac_model.conf', a); 21 22 // Check the permission. 23 e.enforce('alice', 'data1', 'read'); 24 25 // Modify the policy. 26 // await e.addPolicy(...); 27 // await e.removePolicy(...); 28 29 // Save the policy back to DB. 30 await e.savePolicy(); 31}
This project is under Apache 2.0 License. See the LICENSE file for the full license text.
No vulnerabilities found.
Reason
no binaries found in the repo
Reason
no dangerous workflow patterns detected
Reason
license file detected
Details
Reason
Found 17/21 approved changesets -- score normalized to 8
Reason
0 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 0
Reason
dependency not pinned by hash detected -- score normalized to 0
Details
Reason
detected GitHub workflow tokens with excessive permissions
Details
Reason
no effort to earn an OpenSSF best practices badge detected
Reason
security policy file not detected
Details
Reason
project is not fuzzed
Details
Reason
branch protection not enabled on development/release branches
Details
Reason
SAST tool is not run on all commits -- score normalized to 0
Details
Reason
17 existing vulnerabilities detected
Details
Score
Last Scanned on 2025-07-07
The Open Source Security Foundation is a cross-industry collaboration to improve the security of open source software (OSS). The Scorecard provides security health metrics for open source projects.
Learn More