{"id":20541536,"url":"https://github.com/cnpm/safe-publish-tag","last_synced_at":"2025-09-01T05:37:55.331Z","repository":{"id":143907306,"uuid":"149016220","full_name":"cnpm/safe-publish-tag","owner":"cnpm","description":"Get the safe publish tag when you `npm publish`","archived":false,"fork":false,"pushed_at":"2020-10-13T03:46:55.000Z","size":10,"stargazers_count":3,"open_issues_count":0,"forks_count":1,"subscribers_count":11,"default_branch":"master","last_synced_at":"2025-08-25T20:44:28.300Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"JavaScript","has_issues":false,"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/cnpm.png","metadata":{"files":{"readme":"README.md","changelog":"History.md","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":"2018-09-16T16:54:56.000Z","updated_at":"2020-10-13T03:46:49.000Z","dependencies_parsed_at":null,"dependency_job_id":"7dab8e07-2c41-45ad-a799-e1e55bc20170","html_url":"https://github.com/cnpm/safe-publish-tag","commit_stats":null,"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"purl":"pkg:github/cnpm/safe-publish-tag","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cnpm%2Fsafe-publish-tag","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cnpm%2Fsafe-publish-tag/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cnpm%2Fsafe-publish-tag/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cnpm%2Fsafe-publish-tag/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/cnpm","download_url":"https://codeload.github.com/cnpm/safe-publish-tag/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cnpm%2Fsafe-publish-tag/sbom","scorecard":{"id":294794,"data":{"date":"2025-08-11","repo":{"name":"github.com/cnpm/safe-publish-tag","commit":"5bc235a748ecb4d9eaf70dd5d5b6ada816c3cf7b"},"scorecard":{"version":"v5.2.1-40-gf6ed084d","commit":"f6ed084d17c9236477efd66e5b258b9d4cc7b389"},"score":3.6,"checks":[{"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 1/7 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":"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":"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":"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":"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":"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":"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":"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":"Branch-Protection","score":-1,"reason":"internal error: error during branchesHandler.setup: internal error: githubv4.Query: Resource not accessible by integration","details":null,"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":"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":"SAST","score":0,"reason":"SAST tool is not run on all commits -- score normalized to 0","details":["Warn: 0 commits out of 3 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-17T19:12:23.884Z","repository_id":143907306,"created_at":"2025-08-17T19:12:23.884Z","updated_at":"2025-08-17T19:12:23.884Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":273077227,"owners_count":25041358,"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-09-01T02:00:09.058Z","response_time":120,"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":[],"created_at":"2024-11-16T01:24:16.792Z","updated_at":"2025-09-01T05:37:55.299Z","avatar_url":"https://github.com/cnpm.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# safe-publish-tag\n\n[![NPM version][npm-image]][npm-url]\n[![build status][travis-image]][travis-url]\n[![Build Status](https://dev.azure.com/eggjs/egg/_apis/build/status/cnpm.safe-publish-tag)](https://dev.azure.com/eggjs/egg/_build/latest?definitionId=5)\n[![Test coverage][codecov-image]][codecov-url]\n[![Known Vulnerabilities][snyk-image]][snyk-url]\n[![npm download][download-image]][download-url]\n\n[npm-image]: https://img.shields.io/npm/v/safe-publish-tag.svg?style=flat-square\n[npm-url]: https://npmjs.com/package/safe-publish-tag\n[travis-image]: https://img.shields.io/travis/cnpm/safe-publish-tag.svg?style=flat-square\n[travis-url]: https://travis-ci.org/cnpm/safe-publish-tag\n[codecov-image]: https://img.shields.io/codecov/c/github/cnpm/safe-publish-tag.svg?style=flat-square\n[codecov-url]: https://codecov.io/github/cnpm/safe-publish-tag?branch=master\n[snyk-image]: https://snyk.io/test/npm/safe-publish-tag/badge.svg?style=flat-square\n[snyk-url]: https://snyk.io/test/npm/safe-publish-tag\n[download-image]: https://img.shields.io/npm/dm/safe-publish-tag.svg?style=flat-square\n[download-url]: https://npmjs.com/package/safe-publish-tag\n\nGet the safe publish tag when you `npm publish`.\n\n\u003e Original requirement come from [\"Prevent accidental backwards publishing of latest\"](https://npm.community/t/prevent-accidental-backwards-publishing-of-latest/2118)\n\n## Install\n\n```bash\n$ npm i safe-publish-tag --save\n```\n\n## Example\n\n```js\nconst safePublishTag = require('safe-publish-tag');\n\nsafePublishTag('debug', '3.2.5')\n  .then(tag =\u003e {\n    console.log(tag);\n  });\n// 'latest-3'\n\nsafePublishTag('debug', '4.10.0')\n  .then(tag =\u003e {\n    console.log(tag);\n  });\n// or 'latest' if version greater than the current latest version on npm\n```\n\nUse your custom registry\n\n```js\nsafePublishTag('debug', '4.10.0', { registry: 'https://registry.npm.taobao.org' })\n  .then(tag =\u003e {\n    console.log(tag);\n  });\n```\n\n## Questions \u0026 Suggestions\n\nPlease open an issue [here](https://github.com/cnpm/cnpm/issues).\n\n## License\n\n[MIT](LICENSE)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcnpm%2Fsafe-publish-tag","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcnpm%2Fsafe-publish-tag","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcnpm%2Fsafe-publish-tag/lists"}