Repository metadata fields present
Why it matters
The npm package page is often the first place a consumer lands after npm install. Without a repository field, the page has no link to the source code — consumers cannot report bugs, read the source to understand behavior, or check if the project is actively maintained. ISO 25010 analysability requires that the package's provenance be traceable. A missing bugs URL means issues go unreported or are sent to the wrong place. These fields take 60 seconds to add and have zero downside.
Severity rationale
Low because missing repository metadata degrades discoverability and issue-reporting ergonomics but has no impact on package functionality or security.
Remediation
Add repository, homepage, and bugs fields to package.json. All three are displayed on the npm package page.
{
"repository": {
"type": "git",
"url": "https://github.com/yourorg/your-package.git"
},
"homepage": "https://github.com/yourorg/your-package#readme",
"bugs": {
"url": "https://github.com/yourorg/your-package/issues"
}
}
All three fields must be present for a full pass. The repository field alone satisfies the minimum requirement — homepage and bugs are additional signals. For private packages ("private": true), this check is skipped.
Detection
-
ID:
repo-fields -
Severity:
low -
What to look for: Count all repository-related fields in package.json. check
package.jsonfor metadata fields that help consumers find the source and report issues:repository— points to the source code repository (GitHub, GitLab, etc.)homepage— project homepage or documentation sitebugs— issue tracker URL These fields are displayed on the npm package page and help consumers navigate between the package registry and the source.
-
Pass criteria: At least
repositoryis present with a valid URL or{ "type": "git", "url": "..." }object.homepageandbugsare nice-to-have but not required for pass — at least 3 fields required: repository, bugs, and homepage in package.json. Report: "X repository metadata fields configured." -
Fail criteria: No
repositoryfield inpackage.json. The npm page will show no link to source code. -
Skip (N/A) when: The package is private/internal (has
"private": true). Also skip for Python (usespyproject.toml[project.urls]), Rust (Cargo.tomlrepository), and Go (the module path IS the repository). -
Detail on fail:
"No repository field in package.json. The npm package page will not link to the source code. Consumers cannot find the repo to report issues, read source, or contribute." -
Remediation: These fields take 30 seconds to add and improve the npm page significantly:
{ "repository": { "type": "git", "url": "https://github.com/yourorg/your-package.git" }, "homepage": "https://github.com/yourorg/your-package#readme", "bugs": { "url": "https://github.com/yourorg/your-package/issues" } }
External references
- iso-25010:2011 · maintainability.analysability — Analysability — repository/bugs links enable consumers to trace issues to source
Taxons
History
- 2026-04-18·v1.0.0·Initial import from sdk-package-quality·automated