{"id":19294424,"url":"https://github.com/krakenui/octopus-guard","last_synced_at":"2026-04-29T01:02:52.417Z","repository":{"id":57313386,"uuid":"320382044","full_name":"krakenui/octopus-guard","owner":"krakenui","description":"ReactJs library for safe working by KrakenTeam!!!","archived":false,"fork":false,"pushed_at":"2020-12-22T22:29:10.000Z","size":134,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-09-01T13:56:49.041Z","etag":null,"topics":["guard","keycloak","octopus","react","reactjs","router","safe"],"latest_commit_sha":null,"homepage":"","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/krakenui.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2020-12-10T20:27:20.000Z","updated_at":"2020-12-22T22:28:51.000Z","dependencies_parsed_at":"2022-09-20T23:10:56.823Z","dependency_job_id":null,"html_url":"https://github.com/krakenui/octopus-guard","commit_stats":null,"previous_names":[],"tags_count":10,"template":false,"template_full_name":null,"purl":"pkg:github/krakenui/octopus-guard","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/krakenui%2Foctopus-guard","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/krakenui%2Foctopus-guard/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/krakenui%2Foctopus-guard/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/krakenui%2Foctopus-guard/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/krakenui","download_url":"https://codeload.github.com/krakenui/octopus-guard/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/krakenui%2Foctopus-guard/sbom","scorecard":{"id":569374,"data":{"date":"2025-08-11","repo":{"name":"github.com/krakenui/octopus-guard","commit":"a63fc9bd9935bcbc766734c8831fd2ff7c67e53c"},"scorecard":{"version":"v5.2.1-40-gf6ed084d","commit":"f6ed084d17c9236477efd66e5b258b9d4cc7b389"},"score":2.3,"checks":[{"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":"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":"Code-Review","score":0,"reason":"Found 0/11 approved changesets -- score normalized to 0","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":"Pinned-Dependencies","score":2,"reason":"dependency not pinned by hash detected -- score normalized to 2","details":["Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/publish-npm.yml:15: update your workflow using https://app.stepsecurity.io/secureworkflow/krakenui/octopus-guard/publish-npm.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/publish-npm.yml:17: update your workflow using https://app.stepsecurity.io/secureworkflow/krakenui/octopus-guard/publish-npm.yml/master?enable=pin","Warn: npmCommand not pinned by hash: .github/workflows/publish-npm.yml:24","Info:   0 out of   2 GitHub-owned GitHubAction dependencies pinned","Info:   1 out of   2 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":"Token-Permissions","score":0,"reason":"detected GitHub workflow tokens with excessive permissions","details":["Warn: no topLevel permission defined: .github/workflows/publish-npm.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":"SAST","score":0,"reason":"no SAST tool detected","details":["Warn: no pull requests merged into dev branch"],"documentation":{"short":"Determines if the project uses static code analysis.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#sast"}},{"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":"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":"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":"License","score":0,"reason":"license file not detected","details":["Warn: project does not have a license file"],"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":"Vulnerabilities","score":0,"reason":"42 existing vulnerabilities detected","details":["Warn: Project is vulnerable to: GHSA-968p-4wvh-cqc8","Warn: Project is vulnerable to: GHSA-93q8-gq69-wqmw","Warn: Project is vulnerable to: GHSA-4w2v-q235-vp99","Warn: Project is vulnerable to: GHSA-cph5-m8f7-6c5x","Warn: Project is vulnerable to: GHSA-wf5p-g6vw-rhxx","Warn: Project is vulnerable to: GHSA-jr5f-v2jv-69x6","Warn: Project is vulnerable to: GHSA-pp7h-53gx-mx7r","Warn: Project is vulnerable to: GHSA-v6h2-p8h4-qcjw","Warn: Project is vulnerable to: GHSA-grv7-fg5c-xmjg","Warn: Project is vulnerable to: GHSA-897m-rjf5-jp39","Warn: Project is vulnerable to: GHSA-gxpj-cx7g-858c","Warn: Project is vulnerable to: GHSA-w573-4hg7-7wgq","Warn: Project is vulnerable to: GHSA-4gmj-3p3h-gm8h","Warn: Project is vulnerable to: GHSA-74fj-2j2h-c42q","Warn: Project is vulnerable to: GHSA-pw2r-vq6v-hr8c","Warn: Project is vulnerable to: GHSA-jchw-25xp-jwwc","Warn: Project is vulnerable to: GHSA-cxjh-pqwp-8mfp","Warn: Project is vulnerable to: GHSA-ww39-953v-wcq6","Warn: Project is vulnerable to: GHSA-pfrx-2q88-qq97","Warn: Project is vulnerable to: GHSA-43f8-2h32-f4cj","Warn: Project is vulnerable to: GHSA-rc47-6667-2j5j","Warn: Project is vulnerable to: GHSA-qqgx-2p2h-9c37","Warn: Project is vulnerable to: GHSA-9c47-m6qq-7p4h","Warn: Project is vulnerable to: GHSA-76p3-8jx3-jpfq","Warn: Project is vulnerable to: GHSA-3rfm-jhwj-7488","Warn: Project is vulnerable to: GHSA-hhq3-ff78-jv3g","Warn: Project is vulnerable to: GHSA-952p-6rrq-rcjv","Warn: Project is vulnerable to: GHSA-f8q6-p94x-37v3","Warn: Project is vulnerable to: GHSA-xvch-5gv4-984h","Warn: Project is vulnerable to: GHSA-f825-f98c-gj3g","Warn: Project is vulnerable to: GHSA-h8hf-x3f4-xwgp","Warn: Project is vulnerable to: GHSA-9m93-w8w6-76hh","Warn: Project is vulnerable to: GHSA-m7xq-9374-9rvx","Warn: Project is vulnerable to: GHSA-vg7j-7cwx-8wgw","Warn: Project is vulnerable to: GHSA-p92x-r36w-9395","Warn: Project is vulnerable to: GHSA-45q2-34rf-mr94","Warn: Project is vulnerable to: GHSA-px4h-xg32-q955","Warn: Project is vulnerable to: GHSA-hj48-42vr-x3v9","Warn: Project is vulnerable to: GHSA-9wv6-86v2-598j","Warn: Project is vulnerable to: GHSA-c2qf-rxjj-qqgw","Warn: Project is vulnerable to: GHSA-c4w7-xm78-47vh","Warn: Project is vulnerable to: GHSA-p9pc-299p-vxgp"],"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-20T15:53:14.692Z","repository_id":57313386,"created_at":"2025-08-20T15:53:14.692Z","updated_at":"2025-08-20T15:53:14.692Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32405904,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-28T19:38:08.556Z","status":"ssl_error","status_checked_at":"2026-04-28T19:37:55.688Z","response_time":56,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"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":["guard","keycloak","octopus","react","reactjs","router","safe"],"created_at":"2024-11-09T22:38:17.170Z","updated_at":"2026-04-29T01:02:52.400Z","avatar_url":"https://github.com/krakenui.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# octopus-guard\n\n[![NPM version][npm-image]][npm-url] [![npm download][download-image]][download-url]\n\n[npm-image]: http://img.shields.io/npm/v/octopus-guard.svg?style=flat-square\n[npm-url]: http://npmjs.org/package/octopus-guard\n[download-image]: https://img.shields.io/npm/dm/octopus-guard.svg?style=flat-square\n[download-url]: https://npmjs.org/package/octopus-guard\n\n## Install\n\n[![octopus-guard](https://nodei.co/npm/octopus-guard.png)](https://npmjs.org/package/octopus-guard)\n\n```\nnpm install --save octopus-guard\n```\n\n## Features\n\n```\n- Define interface wrap for entity\n- Define common dbcontext\n- Define db connect hub\n- Define base repository with repository pattern\n```\n\n## Install\n\n- Before install require packages:\n\n```\nnpm install react@^16.12.0\nnpm install react-dom@^16.12.0\nnpm install react-redux@^7.1.3\nnpm install react-router-dom@^5.1.2\nnpm install redux@^4.0.5\"\n```\n\n- Install octopus-guard\n\n```\nnpm install octopus-guard\n```\n\n## How it work\n\n#### Safe router\n\n- Require Redux reducers:\n\nAuthentication reducer: `sso_login_authen_action`, payload: `{path: string}`\nAuthorization reducer: `sso_login_author_action`, payload: `{path: string, roles: string}`\n\n- Using:\n\n```\nimport { SafeRoute } from \"octopus-guard\";\n\n \u003cSafeRoute roles={\"admin\"} path={`/admin/credit-management`} component={() =\u003e import(\"./Admin/CreditManagement\")} /\u003e\n```\n\n#### Keycloak SSO integrate\n\n- Basic flow:\n\n```\nInitial basic flow:\n * Check if token valid -\u003e return by pass\n * If token is expired -\u003e refresh token\n * If token not exist -\u003e request login\n * If has flag login request -\u003e call resume check sso\n```\n\nUsing:\n\n```\nimport { initBasicFlow, enforceReload } from \"octopus-guard\";\n\ninitBasicFlow().then(() =\u003e {enforceReload();}).catch();\n```\n\n- Resume flow:\n\n```\nInitial resume flow:\n * Check if token valid -\u003e return by pass\n * If token is expired -\u003e refresh token\n * If token not exist -\u003e return by pass\n * If has flag login request -\u003e call resume check sso\n```\n\nUsing:\n\n```\nimport { initResumeFlow, enforceReload } from \"octopus-guard\";\n\ninitResumeFlow().then(() =\u003e {enforceReload();}).catch();\n```\n\n- Request login\n\n```\nimport { login } from \"octopus-guard\";\n\nlogin().then().catch();\n```\n\n- Request logout\n\n```\nimport { logout } from \"octopus-guard\";\n\nlogout().then().catch();\n```\n\n- Request refresh token\n\n```\nimport { refreshToken } from \"octopus-guard\";\n\nrefreshToken().then().catch();\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkrakenui%2Foctopus-guard","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fkrakenui%2Foctopus-guard","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkrakenui%2Foctopus-guard/lists"}