{"id":18836036,"url":"https://github.com/wkovacs64/use-secret-code","last_synced_at":"2025-10-08T23:22:15.007Z","repository":{"id":38424637,"uuid":"250619948","full_name":"wKovacs64/use-secret-code","owner":"wKovacs64","description":"Custom hook for adding cheat codes to your React app.","archived":false,"fork":false,"pushed_at":"2025-09-30T12:33:15.000Z","size":14650,"stargazers_count":30,"open_issues_count":2,"forks_count":1,"subscribers_count":3,"default_branch":"main","last_synced_at":"2025-09-30T14:43:14.293Z","etag":null,"topics":["cheat-codes","hacktoberfest","hooks","react","react-hooks","state-machine","statechart","xstate"],"latest_commit_sha":null,"homepage":"https://use-secret-code.vercel.app","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/wKovacs64.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":"CONTRIBUTING.md","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,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2020-03-27T18:53:27.000Z","updated_at":"2025-09-30T12:33:19.000Z","dependencies_parsed_at":"2024-01-26T12:21:41.882Z","dependency_job_id":"4932bc5c-a18b-42ff-bd7d-e7a174fe2da2","html_url":"https://github.com/wKovacs64/use-secret-code","commit_stats":{"total_commits":1065,"total_committers":5,"mean_commits":213.0,"dds":"0.37934272300469485","last_synced_commit":"93c0e0f33c406f94ff606b3bda1881d81936223b"},"previous_names":[],"tags_count":83,"template":false,"template_full_name":null,"purl":"pkg:github/wKovacs64/use-secret-code","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wKovacs64%2Fuse-secret-code","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wKovacs64%2Fuse-secret-code/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wKovacs64%2Fuse-secret-code/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wKovacs64%2Fuse-secret-code/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/wKovacs64","download_url":"https://codeload.github.com/wKovacs64/use-secret-code/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wKovacs64%2Fuse-secret-code/sbom","scorecard":{"id":112912,"data":{"date":"2025-07-21","repo":{"name":"github.com/wKovacs64/use-secret-code","commit":"6c407da89c96b72e4fb6820361b1d1a67f9bc377"},"scorecard":{"version":"v5.2.1-24-gc29a04d4","commit":"c29a04d46d1570393e94662bc34e9906398e1bfa"},"score":4.2,"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/c29a04d46d1570393e94662bc34e9906398e1bfa/docs/checks.md#dangerous-workflow"}},{"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/c29a04d46d1570393e94662bc34e9906398e1bfa/docs/checks.md#binary-artifacts"}},{"name":"Code-Review","score":0,"reason":"Found 0/28 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/c29a04d46d1570393e94662bc34e9906398e1bfa/docs/checks.md#code-review"}},{"name":"Maintained","score":10,"reason":"30 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 10","details":null,"documentation":{"short":"Determines if the project is \"actively maintained\".","url":"https://github.com/ossf/scorecard/blob/c29a04d46d1570393e94662bc34e9906398e1bfa/docs/checks.md#maintained"}},{"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/ci.yml:37: update your workflow using https://app.stepsecurity.io/secureworkflow/wKovacs64/use-secret-code/ci.yml/main?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/ci.yml:40: update your workflow using https://app.stepsecurity.io/secureworkflow/wKovacs64/use-secret-code/ci.yml/main?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/ci.yml:56: update your workflow using https://app.stepsecurity.io/secureworkflow/wKovacs64/use-secret-code/ci.yml/main?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/ci.yml:59: update your workflow using https://app.stepsecurity.io/secureworkflow/wKovacs64/use-secret-code/ci.yml/main?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/ci.yml:75: update your workflow using https://app.stepsecurity.io/secureworkflow/wKovacs64/use-secret-code/ci.yml/main?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/ci.yml:78: update your workflow using https://app.stepsecurity.io/secureworkflow/wKovacs64/use-secret-code/ci.yml/main?enable=pin","Warn: third-party GitHubAction not pinned by hash: .github/workflows/ci.yml:90: update your workflow using https://app.stepsecurity.io/secureworkflow/wKovacs64/use-secret-code/ci.yml/main?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/ci.yml:101: update your workflow using https://app.stepsecurity.io/secureworkflow/wKovacs64/use-secret-code/ci.yml/main?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/ci.yml:104: update your workflow using https://app.stepsecurity.io/secureworkflow/wKovacs64/use-secret-code/ci.yml/main?enable=pin","Warn: third-party GitHubAction not pinned by hash: .github/workflows/ci.yml:114: update your workflow using https://app.stepsecurity.io/secureworkflow/wKovacs64/use-secret-code/ci.yml/main?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/ci.yml:18: update your workflow using https://app.stepsecurity.io/secureworkflow/wKovacs64/use-secret-code/ci.yml/main?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/ci.yml:21: update your workflow using https://app.stepsecurity.io/secureworkflow/wKovacs64/use-secret-code/ci.yml/main?enable=pin","Warn: npmCommand not pinned by hash: .github/workflows/ci.yml:28","Warn: npmCommand not pinned by hash: .github/workflows/ci.yml:47","Warn: npmCommand not pinned by hash: .github/workflows/ci.yml:66","Warn: npmCommand not pinned by hash: .github/workflows/ci.yml:85","Warn: npmCommand not pinned by hash: .github/workflows/ci.yml:111","Info:   0 out of  10 GitHub-owned GitHubAction dependencies pinned","Info:   0 out of   2 third-party GitHubAction dependencies pinned","Info:   0 out of   5 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/c29a04d46d1570393e94662bc34e9906398e1bfa/docs/checks.md#pinned-dependencies"}},{"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/c29a04d46d1570393e94662bc34e9906398e1bfa/docs/checks.md#packaging"}},{"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/c29a04d46d1570393e94662bc34e9906398e1bfa/docs/checks.md#cii-best-practices"}},{"name":"Token-Permissions","score":0,"reason":"detected GitHub workflow tokens with excessive permissions","details":["Warn: no topLevel permission defined: .github/workflows/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/c29a04d46d1570393e94662bc34e9906398e1bfa/docs/checks.md#token-permissions"}},{"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/c29a04d46d1570393e94662bc34e9906398e1bfa/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/c29a04d46d1570393e94662bc34e9906398e1bfa/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: MIT License: LICENSE:0"],"documentation":{"short":"Determines if the project has defined a license.","url":"https://github.com/ossf/scorecard/blob/c29a04d46d1570393e94662bc34e9906398e1bfa/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/c29a04d46d1570393e94662bc34e9906398e1bfa/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 'main'"],"documentation":{"short":"Determines if the default and release branches are protected with GitHub's branch protection settings.","url":"https://github.com/ossf/scorecard/blob/c29a04d46d1570393e94662bc34e9906398e1bfa/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 4 are checked with a SAST tool"],"documentation":{"short":"Determines if the project uses static code analysis.","url":"https://github.com/ossf/scorecard/blob/c29a04d46d1570393e94662bc34e9906398e1bfa/docs/checks.md#sast"}},{"name":"Vulnerabilities","score":8,"reason":"2 existing vulnerabilities detected","details":["Warn: Project is vulnerable to: GHSA-968p-4wvh-cqc8","Warn: Project is vulnerable to: GHSA-v6h2-p8h4-qcjw"],"documentation":{"short":"Determines if the project has open, known unfixed vulnerabilities.","url":"https://github.com/ossf/scorecard/blob/c29a04d46d1570393e94662bc34e9906398e1bfa/docs/checks.md#vulnerabilities"}}]},"last_synced_at":"2025-08-15T15:29:21.716Z","repository_id":38424637,"created_at":"2025-08-15T15:29:21.716Z","updated_at":"2025-08-15T15:29:21.716Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":279000734,"owners_count":26082862,"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-08T02:00:06.501Z","response_time":56,"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":["cheat-codes","hacktoberfest","hooks","react","react-hooks","state-machine","statechart","xstate"],"created_at":"2024-11-08T02:18:08.284Z","updated_at":"2025-10-08T23:22:14.981Z","avatar_url":"https://github.com/wKovacs64.png","language":"TypeScript","readme":"# use-secret-code\n\n_Custom hook for adding cheat codes to your React app._\n\n[![npm Version][npm-image]][npm-url] [![Build Status][ci-image]][ci-url]\n[![Code Coverage][coverage-image]][coverage-url]\n\n## Installation\n\n```\nnpm install use-secret-code\n```\n\n## What is this?\n\nThis is a custom [React][react] [hook][hooks-intro] for adding \"cheat codes\" to your app. It will\nlisten for a given sequence of keystrokes and track whether the corresponding \"cheat\" is enabled or\ndisabled. You can then react (😏) accordingly (e.g. toggle a feature, pop an alert or notification,\netc.). Just having a little fun here with this throwback to [how we used to enter cheat codes in\nvideo games][konami-code-video].\n\n## Package Name\n\nThis package was originally called `use-cheat-code` but apparently the word \"cheat\" is against [npm\npolicies][npm-policies], so they denied my attempt to publish the package under that name and I was\nforced to pick a new name. I went with `use-secret-code` (it's not great, but what else do you call\na cheat code?), but I still export `useCheatCode` as well as `useSecretCode`. They are the same\nthing, but I will personally be importing `useCheatCode` in my own projects.\n\n## Usage\n\n```js\n// import { useSecretCode } from 'use-secret-code'; // alternate\nimport { useCheatCode } from 'use-secret-code';\n\nfunction CheatCodeExample() {\n  const invulnerability = useCheatCode(['i', 'd', 'd', 'q', 'd']);\n  return \u003cspan\u003eInvulnerability: {invulnerability ? 'enabled' : 'disabled'}\u003c/span\u003e;\n}\n```\n\n## Browser Support\n\nThis should work in all modern browsers, but you'll need to polyfill `Set` for use in IE11. See the\nplayground project in the [`example`][example] directory for one approach.\n\n## License\n\nThis module is distributed under the [MIT License][license].\n\n[npm-image]: https://img.shields.io/npm/v/use-secret-code.svg?style=for-the-badge\n[npm-url]: https://www.npmjs.com/package/use-secret-code\n[ci-image]:\n  https://img.shields.io/github/actions/workflow/status/wKovacs64/use-secret-code/ci.yml?logo=github\u0026style=for-the-badge\n[ci-url]: https://github.com/wKovacs64/use-secret-code/actions?query=workflow%3Aci\n[coverage-image]:\n  https://img.shields.io/codecov/c/github/wKovacs64/use-secret-code/main.svg?style=for-the-badge\n[coverage-url]: https://codecov.io/gh/wKovacs64/use-secret-code/branch/main\n[license]: https://github.com/wKovacs64/use-secret-code/tree/main/LICENSE\n[react]: https://reactjs.org/\n[hooks-intro]: https://reactjs.org/docs/hooks-intro.html\n[npm-policies]: https://www.npmjs.com/policies\n[konami-code-video]: https://www.youtube.com/watch?v=j2gai5kT3eU\n[example]: https://github.com/wKovacs64/use-secret-code/tree/main/example\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwkovacs64%2Fuse-secret-code","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fwkovacs64%2Fuse-secret-code","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwkovacs64%2Fuse-secret-code/lists"}