{"id":13452029,"url":"https://github.com/sompylasar/npm-verified","last_synced_at":"2026-01-20T10:05:48.331Z","repository":{"id":142758953,"uuid":"121186719","full_name":"sompylasar/npm-verified","owner":"sompylasar","description":"Verify published packages against their source code.","archived":false,"fork":false,"pushed_at":"2019-10-21T22:15:41.000Z","size":39,"stargazers_count":11,"open_issues_count":2,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-10-22T07:14:12.319Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"https://npm.im/npm-verified","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/sompylasar.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,"governance":null,"roadmap":null,"authors":null}},"created_at":"2018-02-12T01:39:31.000Z","updated_at":"2022-04-03T15:56:11.000Z","dependencies_parsed_at":"2024-01-16T03:57:27.043Z","dependency_job_id":null,"html_url":"https://github.com/sompylasar/npm-verified","commit_stats":null,"previous_names":[],"tags_count":4,"template":false,"template_full_name":null,"purl":"pkg:github/sompylasar/npm-verified","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sompylasar%2Fnpm-verified","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sompylasar%2Fnpm-verified/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sompylasar%2Fnpm-verified/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sompylasar%2Fnpm-verified/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/sompylasar","download_url":"https://codeload.github.com/sompylasar/npm-verified/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sompylasar%2Fnpm-verified/sbom","scorecard":{"id":837587,"data":{"date":"2025-08-11","repo":{"name":"github.com/sompylasar/npm-verified","commit":"4259ac5e6198d70c1ee7f157786d417de773158f"},"scorecard":{"version":"v5.2.1-40-gf6ed084d","commit":"f6ed084d17c9236477efd66e5b258b9d4cc7b389"},"score":2,"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":0,"reason":"Found 0/10 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":"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":"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":"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":"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":"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":"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":"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"}},{"name":"Vulnerabilities","score":0,"reason":"18 existing vulnerabilities detected","details":["Warn: Project is vulnerable to: GHSA-pp7h-53gx-mx7r","Warn: Project is vulnerable to: GHSA-v6h2-p8h4-qcjw","Warn: Project is vulnerable to: GHSA-c6rq-rjc2-86v2","Warn: Project is vulnerable to: GHSA-3xgq-45jj-v275","Warn: Project is vulnerable to: GHSA-hr2v-3952-633q","Warn: Project is vulnerable to: GHSA-h6ch-v84p-w6p9","Warn: Project is vulnerable to: GHSA-pfrx-2q88-qq97","Warn: Project is vulnerable to: GHSA-43f8-2h32-f4cj","Warn: Project is vulnerable to: GHSA-qqgx-2p2h-9c37","Warn: Project is vulnerable to: GHSA-f8q6-p94x-37v3","Warn: Project is vulnerable to: GHSA-vh95-rmgr-6w4m","Warn: Project is vulnerable to: GHSA-xvch-5gv4-984h","Warn: Project is vulnerable to: GHSA-c2qf-rxjj-qqgw","Warn: Project is vulnerable to: GHSA-x2mc-8fgj-3wmr","Warn: Project is vulnerable to: GHSA-pq67-2wwv-3xjx","Warn: Project is vulnerable to: GHSA-8cj5-5rvv-wf4v","Warn: Project is vulnerable to: GHSA-29xr-v42j-r956","Warn: Project is vulnerable to: GHSA-52f5-9888-hmc6"],"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-23T19:33:02.887Z","repository_id":142758953,"created_at":"2025-08-23T19:33:02.887Z","updated_at":"2025-08-23T19:33:02.887Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28601313,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-20T09:39:28.479Z","status":"ssl_error","status_checked_at":"2026-01-20T09:38:10.511Z","response_time":117,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5: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":[],"created_at":"2024-07-31T07:01:10.588Z","updated_at":"2026-01-20T10:05:48.309Z","avatar_url":"https://github.com/sompylasar.png","language":"JavaScript","funding_links":[],"categories":["JavaScript"],"sub_categories":[],"readme":"# npm-verified\n\nVerify published packages against their source code.\n\n## Usage\n\n```\nnpx npm-verified \u003cpackage-name-with-optional-version-to-verify\u003e\n```\n\nExamples:\n\n```\nnpx npm-verified npm-verified@latest\nnpx npm-verified react\n```\n\n## How it works\n\n1. Downloads and extracts the requested package archive from https://registry.npmjs.org with [`download-npm-package`](https://npm.im/download-npm-package).\n2. Clones the source code repository specified in the downloaded package's `package.json` `repository` field with `git clone --branch \u003cversion-tag\u003e` where `\u003cversion-tag\u003e` is either `vX.Y.Z` or `X.Y.Z` (both are attempted). If none of the tags are found, the `master` branch is cloned.\n3. Finds in the cloned source code repository the package root directory where a `package.json` with the requested package name is located.\n4. Installs the dependencies there via `yarn` or `npm install`.\n5. Runs `npm pack` there to prepare the package archive that is supposed to be uploaded to the `npm` registry.\n6. Extracts the package archive created from the source code.\n7. Compares the files from the downloaded archive with the files from the prepared archive.\n8. Prints the mismatching parts as a human-readable diff, sets the process exit code to `0` if the files are the same, to `1` if the files are different.\n\n## Requirements and limitations\n\n* The `package.json` with the package name must exist in the source code repository.\n* The `package.json` in the published package must contain the link to the source code repository.\n* The repository must have a tag corresponding to the published package version, either `vX.Y.Z` or `X.Y.Z`, or the `master` branch must have the published version.\n* Currently, only `git` repositories are supported.\n* Currently, the `node`, `yarn`, and `npm` applications to prepare the package from the source code are obtained from the environment, not from the source code.\n* Currently, the tool uses `find` command from the environment (should be re-implemented in JavaScript to be fully cross-platform).\n\n## Future vision\n\n* Package verification as a service.\n* README badge.\n* CI integration.\n* Has to use the same `node`, `yarn`, and `npm` versions that the repository maintainers use to prepare packages.\n* Has to scale: package build processes eat CPU.\n* More human-readable stats diff (missing, extra files).\n* Machine-readable output (for integrations).\n\n## Thanks\n\n* [@davidgilbertson](https://github.com/davidgilbertson) for [sharing the ideas on the security of the public `npm` registry and package publishing process](https://hackernoon.com/im-harvesting-credit-card-numbers-and-passwords-from-your-site-here-s-how-9a8cb347c5b5).\n* [@mzhurovich](https://github.com/mzhurovich) for talking me into actually implementing this tool.\n* [@npm](https://github.com/npm) for the largest package registry in the world.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsompylasar%2Fnpm-verified","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsompylasar%2Fnpm-verified","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsompylasar%2Fnpm-verified/lists"}