{"id":20790382,"url":"https://github.com/paragonie/certainty-js","last_synced_at":"2026-04-29T07:35:00.189Z","repository":{"id":35140545,"uuid":"211554903","full_name":"paragonie/certainty-js","owner":"paragonie","description":"Certainty-js: Automated CACert.pem Management for Node.js Software ","archived":false,"fork":false,"pushed_at":"2022-05-27T20:09:41.000Z","size":175,"stargazers_count":1,"open_issues_count":0,"forks_count":1,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-10-24T09:56:40.644Z","etag":null,"topics":["automation","ca-certificate","ca-certificates","cacert","certainty","https","javascript","node-js","nodejs","tls"],"latest_commit_sha":null,"homepage":"https://paragonie.com/blog/2017/10/certainty-automated-cacert-pem-management-for-php-software","language":"JavaScript","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/paragonie.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":"2019-09-28T19:59:25.000Z","updated_at":"2022-05-27T20:09:44.000Z","dependencies_parsed_at":"2022-08-17T22:35:21.673Z","dependency_job_id":null,"html_url":"https://github.com/paragonie/certainty-js","commit_stats":null,"previous_names":[],"tags_count":3,"template":false,"template_full_name":null,"purl":"pkg:github/paragonie/certainty-js","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/paragonie%2Fcertainty-js","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/paragonie%2Fcertainty-js/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/paragonie%2Fcertainty-js/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/paragonie%2Fcertainty-js/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/paragonie","download_url":"https://codeload.github.com/paragonie/certainty-js/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/paragonie%2Fcertainty-js/sbom","scorecard":{"id":720138,"data":{"date":"2025-08-11","repo":{"name":"github.com/paragonie/certainty-js","commit":"a490e58537b9aa82d46c1f19dc13e00d8f9783af"},"scorecard":{"version":"v5.2.1-40-gf6ed084d","commit":"f6ed084d17c9236477efd66e5b258b9d4cc7b389"},"score":2.6,"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":"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":"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":"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":"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":"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":"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":"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":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":"SAST","score":0,"reason":"SAST tool is not run on all commits -- score normalized to 0","details":["Warn: 0 commits out of 2 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-22T11:03:34.544Z","repository_id":35140545,"created_at":"2025-08-22T11:03:34.545Z","updated_at":"2025-08-22T11:03:34.545Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32416146,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-29T06:29:02.080Z","status":"ssl_error","status_checked_at":"2026-04-29T06:29:00.631Z","response_time":110,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6:443 state=error: 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":["automation","ca-certificate","ca-certificates","cacert","certainty","https","javascript","node-js","nodejs","tls"],"created_at":"2024-11-17T15:34:30.890Z","updated_at":"2026-04-29T07:35:00.172Z","avatar_url":"https://github.com/paragonie.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Certainty (JavaScript)\n\n[![Travis CI](https://travis-ci.org/paragonie/certainty-js.svg?branch=master)](https://travis-ci.org/paragonie/certainty-js)\n[![npm version](https://img.shields.io/npm/v/certainty-js.svg)](https://npm.im/certainty-js)\n\nNode.js port of [Certainty](https://github.com/paragonie/certainty), a PHP library\ndesigned to keep your CACert bundles up-to-date.\n\n## Installation\n\n```terminal\nnpm install --save certainty-js\n```\n\n**Optional:**\n\nCertainty uses [Sodium-Plus](https://github.com/paragonie/sodium-plus) internally.\nThe default Sodium-Plus backend is cross-platform, but you can obtain greater\nperformance by installing `sodium-native` too.\n\n```terminal\nnpm install --save sodium-native\n```\n\nThis isn't strictly necessary, and sodium-native doesn't work in browsers, but\nif you're not targeting browsers, you can get a significant performance boost.\n\n## Usage\n\nCertainty is intended to be used with `request-promise-native`.\n\n### Easy Mode\n\nSimply call `Certainty.getLatestCABundle()` and pass the `Buffer`\nit returns to the `ca` key of your request options object:\n\n```javascript\nconst {Certainty} = require('certainty-js');\n\n(async function () {\n    // Your normal options\n    let options = {\n        'ca': await Certainty.getLatestCABundle('/path/to/directory'),\n\n        // Other request options...\n        'uri': 'https://php-chronicle.pie-hosted.com/chronicle/lasthash',\n        'minVersion': 'TLSv1.2',\n        'strictSSL': true,\n        'timeout': 30000\n    };\n\n    // Send request...\n    console.log(await http.get(options));\n})();\n```\n\nThis should produce something similar to:\n\n```\n{\n    \"version\": \"1.2.x\",\n    \"datetime\": \"2019-09-30T19:29:45-04:00\",\n    \"status\": \"OK\",\n    \"results\": [\n        {\n            \"contents\": \"{\\n    \\\"repository\\\": \\\"paragonie\\\\\\/certainty\\\",\\n    \\\"sha256\\\": \\\"38b6230aa4bee062cd34ee0ff6da173250899642b1937fc130896290b6bd91e3\\\",\\n    \\\"signature\\\": \\\"4bd4fae2644726f4f9298b5d9399430c18db88d8f72ea6cdc89429dd43daf5032fb632912697643549938277a7b5235c3353da1b79ff14da3333aef16acfdd03\\\",\\n    \\\"time\\\": \\\"2019-08-29T22:12:29-04:00\\\"\\n}\",\n            \"prevhash\": \"8wL2OsihjC2ihOfyjqs2YwvZbry11veuWucqjhz4f6Y=\",\n            \"currhash\": \"POcMRaSfk6myzsMmU-34OYXQzdsS6nqigRPLWohsfeI=\",\n            \"summaryhash\": \"PW9pdgWmCjmswCmDLzJY51ENVdBRcZcJiUwKHBfQc2k=\",\n            \"created\": \"2019-08-29T22:12:31-04:00\",\n            \"publickey\": \"mPLfrUEV_qnwlsNUhbO_ILBulKysO3rPYYWqWAYCA0I=\",\n            \"signature\": \"CRwq2nWby3v68EKXoM5QA11D5bZKWCJwM1rmvUpM2BfcKHc0zxr9z1CAsHDLP3NffCYT6jCKmTj6H07VgaFJCw==\"\n        }\n    ]\n}\n```\n\n### Advanced Mode\n\nYou can use the `RemoteFetch` and `Fetch` APIs directly to manage your\ncertificates asynchronously.\n\n#### RemoteFetch\n\nThe `RemoteFetch` class will, once per day, check for new CACert bundles.\nIf any are found, it will automatically check their SHA256 hashes (provided\nby the cURL developer), Ed25519 signatures (signed by Paragon Initiative\nEnterprises), and verify they are committed to a Chronicle instance.\n\n(Chronicle is a cryptographic ledger. We use it to ensure \n[everyone sees the same thing](https://defuse.ca/triangle-of-secure-code-delivery.htm).) \n\n```javascript\nconst {RemoteFetch} = require('certainty-js');\n(async function () {\n    let fetcher = new RemoteFetch('/path/to/directory');\n    let bundle = fetcher.getLatestBundle();\n    console.log(bundle.getFilePath());\n})();\n```\n\n#### Fetch\n\nThe `Fetch` class only looks at the local filesystem. It does not look for\nfresh CACert bundles to download.\n\n```javascript\nconst {Fetch} = require('certainty-js');\n(async function () {\n    let fetcher = new Fetch('/path/to/directory');\n    let bundle = fetcher.getLatestBundle();\n    console.log(bundle.getFilePath());\n})();\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fparagonie%2Fcertainty-js","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fparagonie%2Fcertainty-js","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fparagonie%2Fcertainty-js/lists"}