{"id":21252618,"url":"https://github.com/jcasbin/redis-adapter","last_synced_at":"2025-10-09T04:44:31.622Z","repository":{"id":46621403,"uuid":"353622882","full_name":"jcasbin/redis-adapter","owner":"jcasbin","description":"Redis adapter for Casbin","archived":false,"fork":false,"pushed_at":"2024-10-02T08:48:03.000Z","size":31,"stargazers_count":5,"open_issues_count":0,"forks_count":7,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-06-13T12:05:52.722Z","etag":null,"topics":["access-control","adapter","auth","authorization","authz","casbin","java","jcasbin","redis"],"latest_commit_sha":null,"homepage":"https://github.com/casbin/jcasbin","language":"Java","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/jcasbin.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2021-04-01T08:05:00.000Z","updated_at":"2024-10-02T08:46:44.000Z","dependencies_parsed_at":"2024-05-17T10:28:04.529Z","dependency_job_id":"ed352e28-821b-49d8-bd15-91b80b0abbb0","html_url":"https://github.com/jcasbin/redis-adapter","commit_stats":null,"previous_names":[],"tags_count":10,"template":false,"template_full_name":null,"purl":"pkg:github/jcasbin/redis-adapter","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jcasbin%2Fredis-adapter","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jcasbin%2Fredis-adapter/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jcasbin%2Fredis-adapter/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jcasbin%2Fredis-adapter/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/jcasbin","download_url":"https://codeload.github.com/jcasbin/redis-adapter/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jcasbin%2Fredis-adapter/sbom","scorecard":{"id":511061,"data":{"date":"2025-08-11","repo":{"name":"github.com/jcasbin/redis-adapter","commit":"7b760841ad5bb2f38d2eea84f09359beb9f76f69"},"scorecard":{"version":"v5.2.1-40-gf6ed084d","commit":"f6ed084d17c9236477efd66e5b258b9d4cc7b389"},"score":3.9,"checks":[{"name":"Dangerous-Workflow","score":10,"reason":"no dangerous workflow patterns detected","details":null,"documentation":{"short":"Determines if the project's GitHub Action workflows avoid dangerous patterns.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#dangerous-workflow"}},{"name":"Maintained","score":0,"reason":"0 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project is \"actively maintained\".","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#maintained"}},{"name":"Packaging","score":-1,"reason":"packaging workflow not detected","details":["Warn: no GitHub/GitLab publishing workflow detected."],"documentation":{"short":"Determines if the project is published as a package that others can easily download, install, easily update, and uninstall.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#packaging"}},{"name":"Binary-Artifacts","score":10,"reason":"no binaries found in the repo","details":null,"documentation":{"short":"Determines if the project has generated executable (binary) artifacts in the source repository.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#binary-artifacts"}},{"name":"Code-Review","score":7,"reason":"Found 11/15 approved changesets -- score normalized to 7","details":null,"documentation":{"short":"Determines if the project requires human code review before pull requests (aka merge requests) are merged.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#code-review"}},{"name":"Token-Permissions","score":0,"reason":"detected GitHub workflow tokens with excessive permissions","details":["Warn: no topLevel permission defined: .github/workflows/maven-ci.yml:1","Info: no jobLevel write permissions found"],"documentation":{"short":"Determines if the project's workflows follow the principle of least privilege.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#token-permissions"}},{"name":"Pinned-Dependencies","score":0,"reason":"dependency not pinned by hash detected -- score normalized to 0","details":["Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/maven-ci.yml:20: update your workflow using https://app.stepsecurity.io/secureworkflow/jcasbin/redis-adapter/maven-ci.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/maven-ci.yml:25: update your workflow using https://app.stepsecurity.io/secureworkflow/jcasbin/redis-adapter/maven-ci.yml/master?enable=pin","Warn: third-party GitHubAction not pinned by hash: .github/workflows/maven-ci.yml:38: update your workflow using https://app.stepsecurity.io/secureworkflow/jcasbin/redis-adapter/maven-ci.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/maven-ci.yml:43: update your workflow using https://app.stepsecurity.io/secureworkflow/jcasbin/redis-adapter/maven-ci.yml/master?enable=pin","Warn: npmCommand not pinned by hash: .github/workflows/maven-ci.yml:49","Info:   0 out of   3 GitHub-owned GitHubAction dependencies pinned","Info:   0 out of   1 third-party GitHubAction dependencies pinned","Info:   0 out of   1 npmCommand dependencies pinned"],"documentation":{"short":"Determines if the project has declared and pinned the dependencies of its build process.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#pinned-dependencies"}},{"name":"CII-Best-Practices","score":0,"reason":"no effort to earn an OpenSSF best practices badge detected","details":null,"documentation":{"short":"Determines if the project has an OpenSSF (formerly CII) Best Practices Badge.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#cii-best-practices"}},{"name":"Security-Policy","score":0,"reason":"security policy file not detected","details":["Warn: no security policy file detected","Warn: no security file to analyze","Warn: no security file to analyze","Warn: no security file to analyze"],"documentation":{"short":"Determines if the project has published a security policy.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#security-policy"}},{"name":"Fuzzing","score":0,"reason":"project is not fuzzed","details":["Warn: no fuzzer integrations found"],"documentation":{"short":"Determines if the project uses fuzzing.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#fuzzing"}},{"name":"License","score":10,"reason":"license file detected","details":["Info: project has a license file: LICENSE:0","Info: FSF or OSI recognized license: Apache License 2.0: LICENSE:0"],"documentation":{"short":"Determines if the project has defined a license.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#license"}},{"name":"Signed-Releases","score":-1,"reason":"no releases found","details":null,"documentation":{"short":"Determines if the project cryptographically signs release artifacts.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#signed-releases"}},{"name":"Branch-Protection","score":0,"reason":"branch protection not enabled on development/release branches","details":["Warn: branch protection not enabled for branch 'master'"],"documentation":{"short":"Determines if the default and release branches are protected with GitHub's branch protection settings.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#branch-protection"}},{"name":"SAST","score":0,"reason":"SAST tool is not run on all commits -- score normalized to 0","details":["Warn: 0 commits out of 13 are checked with a SAST tool"],"documentation":{"short":"Determines if the project uses static code analysis.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#sast"}},{"name":"Vulnerabilities","score":8,"reason":"2 existing vulnerabilities detected","details":["Warn: Project is vulnerable to: GHSA-pv7h-hx5h-mgfj","Warn: Project is vulnerable to: GHSA-78wr-2p64-hpwj"],"documentation":{"short":"Determines if the project has open, known unfixed vulnerabilities.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#vulnerabilities"}}]},"last_synced_at":"2025-08-20T00:33:41.779Z","repository_id":46621403,"created_at":"2025-08-20T00:33:41.779Z","updated_at":"2025-08-20T00:33:41.779Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":279000709,"owners_count":26082921,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-10-09T02:00:07.460Z","response_time":59,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["access-control","adapter","auth","authorization","authz","casbin","java","jcasbin","redis"],"created_at":"2024-11-21T03:48:07.537Z","updated_at":"2025-10-09T04:44:31.584Z","avatar_url":"https://github.com/jcasbin.png","language":"Java","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Redis Adapter \n\n[![build](https://github.com/jcasbin/redis-adapter/actions/workflows/maven-ci.yml/badge.svg)](https://github.com/jcasbin/redis-adapter/actions)\n[![codebeat badge](https://codebeat.co/badges/560a67fc-53b6-4a10-8e1b-989f3bb4e5cb)](https://codebeat.co/projects/github-com-jcasbin-redis-adapter-master)\n[![codecov](https://codecov.io/gh/jcasbin/redis-adapter/branch/master/graph/badge.svg?token=5wzDaTC9UV)](https://codecov.io/gh/jcasbin/redis-adapter)\n[![Javadocs](https://www.javadoc.io/badge/org.casbin/redis-adapter.svg)](https://www.javadoc.io/doc/org.casbin/redis-adapter)\n[![Maven Central](https://img.shields.io/maven-central/v/org.casbin/redis-adapter.svg)](https://mvnrepository.com/artifact/org.casbin/redis-adapter/latest)\n[![Discord](https://img.shields.io/discord/1022748306096537660?logo=discord\u0026label=discord\u0026color=5865F2)](https://discord.gg/S5UjpzGZjN)\n\nRedis Adapter is the [Redis](https://redis.io/) adapter for [jCasbin](https://github.com/casbin/jcasbin). With this library, Casbin can load policy from Redis or save policy to it.\n\n## Installation\n\n```xml\n    \u003cdependency\u003e\n        \u003cgroupId\u003eorg.casbin\u003c/groupId\u003e\n        \u003cartifactId\u003eredis-adapter\u003c/artifactId\u003e\n        \u003cversion\u003e1.0.0\u003c/version\u003e\n    \u003c/dependency\u003e\n```\n\n## Simple Example\n\n```java\npackage org.casbin.adapter;\n\nimport org.casbin.jcasbin.main.Enforcer;\n\npublic class Main {\n    public static void main(String[] args) {\n        // Initialize a Redis adapter and use it in a jCasbin enforcer:\n        RedisAdapter a = new RedisAdapter(\"localhost\", 6379);\n\n        // Use the following if Redis has password like \"123\"\n        // RedisAdapter a = new RedisAdapter(\"localhost\", 6379, \"123\");\n\n        // Use the following if Redis has username like \"default\" and password like \"123\"\n        // RedisAdapter a = new RedisAdapter(\"localhost\", 6379, \"default\", \"123\");\n\n        Enforcer e = new Enforcer(\"examples/rbac_model.conf\", a);\n\n        // Load the policy from DB.\n        e.loadPolicy();\n\n        // Check the permission.\n        e.enforce(\"alice\", \"data1\", \"read\");\n\n        // Modify the policy.\n        // e.addPolicy(...);\n        // e.removePolicy(...);\n\n        // Save the policy back to DB.\n        e.savePolicy();\n    }\n}\n```\n\n## Getting Help\n\n- [jCasbin](https://github.com/casbin/jcasbin)\n\n## License\n\nThis project is under Apache 2.0 License. See the [LICENSE](LICENSE) file for the full license text.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjcasbin%2Fredis-adapter","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjcasbin%2Fredis-adapter","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjcasbin%2Fredis-adapter/lists"}