{"id":24383215,"url":"https://github.com/firstandthird/hapi-health","last_synced_at":"2025-10-04T12:14:14.518Z","repository":{"id":53726367,"uuid":"115784488","full_name":"firstandthird/hapi-health","owner":"firstandthird","description":"server monitoring","archived":false,"fork":false,"pushed_at":"2021-03-17T18:30:07.000Z","size":21,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-09-15T13:42:59.572Z","etag":null,"topics":["hapi-plugin","hapi-v17"],"latest_commit_sha":null,"homepage":null,"language":"JavaScript","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/firstandthird.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}},"created_at":"2017-12-30T08:34:44.000Z","updated_at":"2021-03-17T18:30:07.000Z","dependencies_parsed_at":"2022-09-13T08:11:14.136Z","dependency_job_id":null,"html_url":"https://github.com/firstandthird/hapi-health","commit_stats":null,"previous_names":["firstandthird/hapi-healthcheck"],"tags_count":9,"template":false,"template_full_name":null,"purl":"pkg:github/firstandthird/hapi-health","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/firstandthird%2Fhapi-health","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/firstandthird%2Fhapi-health/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/firstandthird%2Fhapi-health/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/firstandthird%2Fhapi-health/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/firstandthird","download_url":"https://codeload.github.com/firstandthird/hapi-health/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/firstandthird%2Fhapi-health/sbom","scorecard":{"id":401069,"data":{"date":"2025-08-11","repo":{"name":"github.com/firstandthird/hapi-health","commit":"7ad887f5e6eb740c13a59e78e7aa8b78bc75df7d"},"scorecard":{"version":"v5.2.1-40-gf6ed084d","commit":"f6ed084d17c9236477efd66e5b258b9d4cc7b389"},"score":3.2,"checks":[{"name":"Dangerous-Workflow","score":-1,"reason":"no workflows found","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":"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":"Code-Review","score":1,"reason":"Found 3/18 approved changesets -- score normalized to 1","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":-1,"reason":"No tokens found","details":null,"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":"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":"Pinned-Dependencies","score":-1,"reason":"no dependencies found","details":null,"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":"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":"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/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#license"}},{"name":"Vulnerabilities","score":10,"reason":"0 existing vulnerabilities detected","details":null,"documentation":{"short":"Determines if the project has open, known unfixed vulnerabilities.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#vulnerabilities"}},{"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 21 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"}}]},"last_synced_at":"2025-08-18T20:06:37.800Z","repository_id":53726367,"created_at":"2025-08-18T20:06:37.800Z","updated_at":"2025-08-18T20:06:37.800Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":278310010,"owners_count":25965919,"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-04T02:00:05.491Z","response_time":63,"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":["hapi-plugin","hapi-v17"],"created_at":"2025-01-19T10:13:53.112Z","updated_at":"2025-10-04T12:14:14.485Z","avatar_url":"https://github.com/firstandthird.png","language":"JavaScript","readme":"# hapi-health\n\n  [hapi](https://hapi.dev/) plugin that exposes a '/health' route that can be\n  used for checking basic health metrics for your server.\n\n## Installation\n\n```\nnpm install hapi-health\n```\n\n## Basic Usage\n```js\nawait server.register({\n  plugin: require('hapi-health')\n});\n```\n\nThen GET _/health_ you will get back something like:\n```json\n{\n  \"host\": \"sorrynotsorry.local\",\n  \"env\": \"test\",\n  \"uptime\": 0,\n  \"cpu\": { \"user\": 384085, \"system\": 48978 },\n  \"memory\": {\n    \"rss\": 47497216,\n    \"heapTotal\": 32874496,\n    \"heapUsed\": 18066608,\n    \"external\": 518509\n  }\n}\n```\n\n## Custom Checks\n\n  You can also use hapi [server methods](https://hapi.dev/api/?v=20.1.0#-servermethodname-method-options) to run and return custom checks that will then be returned along with the other metrics. These server methods must accept the parameter signature _(request, options)_, where _request_ will be the hapi [request object](https://hapi.dev/api/?v=20.1.0#request) and _options_ is an object that you specify when you register the plugin.  The server must return a JSON object, but they can be either sync or async.\n\n  Pass _checks_ as an array, each item in the array should have the following fields:\n\n  - _name_ (required)\n\n    Name of the check, hapi-health will add a field with this name containined the output of the server.method.\n  - _method_ (required)\n\n    Name of the server method to call (nested server methods can be called like 'foo.bar.bat').\n  - _options_ (optional)\n\n    You can specify an _options_ object that will be passed to the server method when it is invoked.\n\nFor example:\n\n```js\nserver.method('foo', async(request, options) =\u003e {\n  return {\n    user: request.auth.credentials.user,\n    result: options.arg1 + 1\n  };\n});\n\nawait server.register({\n  plugin: require('hapi-health'),\n  options: {\n    checks: [\n      {\n        name: 'My Custom Check',\n        method 'foo',\n        options: {\n          arg1: 2\n        }},\n    ]\n  }\n});\n```\n\nNow when you call _/health_ you will get something like:\n\n```json\n{\n  \"host\": \"sorrynotsorry.local\",\n  \"env\": \"test\",\n  \"uptime\": 0,\n  \"cpu\": { \"user\": 384085, \"system\": 48978 },\n  \"memory\": {\n    \"rss\": 47497216,\n    \"heapTotal\": 32874496,\n    \"heapUsed\": 18066608,\n    \"external\": 518509\n  },\n  \"My Custom Check\": {\n    \"user\": \"myself\",\n    \"result\": 3\n  }\n}\n```\n\n\n## Other Options:\n\n- _auth_\n\n  By default the _/health_ route is unprotected, but you can specify a standard hapi [auth route config](https://hapi.dev/api/?v=20.1.0#-routeoptionsauth), which will be applied to the route config.\n\n- _token_\n\n  When specified, hapi-health will also internally require a '?token=\u003ctoken\u003e' parameter when calling the _/health_ route.  If it does not match or is not present then it will return a 401 Unauthorized.  This is in addition to any _auth_ config that has been applied to the route.\n\n- _endpoint_\n\n  By default hapi-health uses _/health_ as the endpoint, but you can use this option to specify a different route to use as your health endpoint.\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffirstandthird%2Fhapi-health","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ffirstandthird%2Fhapi-health","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffirstandthird%2Fhapi-health/lists"}