{"id":35535780,"url":"https://github.com/aboutcode-org/purlvalidator-go","last_synced_at":"2026-06-14T04:01:31.245Z","repository":{"id":324776789,"uuid":"1095100795","full_name":"aboutcode-org/purlvalidator-go","owner":"aboutcode-org","description":"Offline Package URL validator using a prebuilt FST of known packages.","archived":false,"fork":false,"pushed_at":"2026-06-06T02:12:57.000Z","size":2072934,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2026-06-06T04:22:44.720Z","etag":null,"topics":["airgapped","fst","packageurl","purl","sbom-tool"],"latest_commit_sha":null,"homepage":"https://pkg.go.dev/github.com/aboutcode-org/purlvalidator-go","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/aboutcode-org.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.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,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null},"funding":{"github":"aboutcode-org","open_collective":"aboutcode","custom":"https://causes.benevity.org/causes/056-5528680976845_a486"}},"created_at":"2025-11-12T15:37:51.000Z","updated_at":"2026-06-06T02:13:00.000Z","dependencies_parsed_at":null,"dependency_job_id":"583b60ec-73cf-45fe-9ef4-6e7188a72701","html_url":"https://github.com/aboutcode-org/purlvalidator-go","commit_stats":null,"previous_names":["aboutcode-org/purlvalidator-go"],"tags_count":118,"template":false,"template_full_name":null,"purl":"pkg:github/aboutcode-org/purlvalidator-go","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/aboutcode-org%2Fpurlvalidator-go","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/aboutcode-org%2Fpurlvalidator-go/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/aboutcode-org%2Fpurlvalidator-go/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/aboutcode-org%2Fpurlvalidator-go/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/aboutcode-org","download_url":"https://codeload.github.com/aboutcode-org/purlvalidator-go/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/aboutcode-org%2Fpurlvalidator-go/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":34308622,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-06-14T02:00:07.365Z","response_time":62,"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":["airgapped","fst","packageurl","purl","sbom-tool"],"created_at":"2026-01-04T03:20:32.973Z","updated_at":"2026-06-14T04:01:31.171Z","avatar_url":"https://github.com/aboutcode-org.png","language":"Go","funding_links":["https://github.com/sponsors/aboutcode-org","https://opencollective.com/aboutcode","https://causes.benevity.org/causes/056-5528680976845_a486"],"categories":[],"sub_categories":[],"readme":"# purlvalidator\n\n[![License](https://img.shields.io/badge/License-Apache--2.0-blue.svg?style=for-the-badge)](https://opensource.org/licenses/Apache-2.0)\n[![Version](https://img.shields.io/github/v/release/aboutcode-org/purlvalidator-go?style=for-the-badge)](https://github.com/aboutcode-org/purlvalidator-go/releases)\n[![Test](https://img.shields.io/github/actions/workflow/status/aboutcode-org/purlvalidator-go/ci.yml?style=for-the-badge\u0026logo=github)](https://github.com/aboutcode-org/purlvalidator-go/actions)\n\n**purlvalidator** is a Go library for validating [Package-URLs (PURLs)](https://github.com/package-url/purl-spec). It works fully offline, including in **air-gapped** or **restricted environments**, and answers one key question: **Does the package this PURL represents actually exist?**\n\n## How It Works\n\n**purlvalidator** is shipped with a pre-built FST (Finite State Transducer), a set of compact automata containing latest Package-URLs mined by the MineCode[^1]. Library uses this FST to perform lookups and confirm whether the **base PURL**[^2] exists.\n\n## Currently Supported Ecosystems\n\n- apk\n- cargo\n- composer\n- conan\n- cpan\n- cran\n- debian\n- maven\n- npm\n- nuget\n- pypi\n- swift\n\n## Usage\n\nAdd `purlvalidator` as a dependency:\n\n```bash\ngo get github.com/aboutcode-org/purlvalidator-go\n```\n\nOr add it to `go.mod`:\n\n```text\nrequire github.com/aboutcode-org/purlvalidator-go v1.0.0\n```\n\nUse it in your code like this:\n\n```go\npackage main\n\nimport (\n\t\"fmt\"\n\t\"log\"\n\n\tpurlvalidator \"github.com/aboutcode-org/purlvalidator-go\"\n)\n\nfunc main() {\n\texists, err := purlvalidator.Validate(\"pkg:nuget/FluentValidation\")\n\tif err != nil {\n\t\tlog.Fatal(err)\n\t}\n\n\tfmt.Println(exists)\n}\n```\n\nExamples and errors:\n\n```go\nexists, err := purlvalidator.Validate(\"pkg:nuget/FluentValidation\")\n// exists == true, err == nil\n\nexists, err = purlvalidator.Validate(\"pkg:nuget/non-existent-foo-bar\")\n// exists == false, err == nil\n\nexists, err = purlvalidator.Validate(\"pkg:nuget/FluentValidation@10.2.3\")\n// err reports that only base PURLs are supported.\n\nexists, err = purlvalidator.Validate(\"test:nuget/FluentValidation\")\n// err reports that the PURL scheme is invalid.\n```\n\n`Validate` returns:\n\n- `true, nil` when the base PURL exists in the packaged data.\n- `false, nil` when the base PURL is syntactically valid but unknown.\n- `false, err` when the input is not a valid PURL or contains a version,\n  qualifiers, or subpath.\n\nUse the released module version when you need reproducible validation results.\nUse a newer patch release when you need newer packaged PURL data.\n\n\n## How to get latest Package-URL data?\n\nA patch release is published daily with the latest FST generated from newly mined package-urls.\n\n\n## Contribution\n\nWe welcome contributions from the community! If you find a bug or have an idea for a new feature, please open an issue on the GitHub repository. If you want to contribute code, you can fork the repository, make your changes, and submit a pull request.\n\n* Please try to write a good commit message, see [good commit message wiki](https://aboutcode.readthedocs.io/en/latest/contributing/writing_good_commit_messages.html).\n* Add DCO `Sign Off` to your commits.\n\n## Development Setup\n\nRun these commands, starting from a git clone of [https://github.com/aboutcode-org/purlvalidator-go.git](https://github.com/aboutcode-org/purlvalidator-go.git)\n\nGenerate FST:\n\n```bash\nmake build-fst\n```\n\nRun tests:\n\n```bash\nmake test\n```\n\nFix formatting and linting:\n\n```bash\nmake valid\n```\n\n## License\n\nSPDX-License-Identifier: Apache-2.0\n\npurl-validator is licensed under Apache License version 2.0.\n\n```text\nYou may not use this software except in compliance with the License.\nYou may obtain a copy of the License at\n\n    http://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing, software\ndistributed under the License is distributed on an \"AS IS\" BASIS,\nWITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\nSee the License for the specific language governing permissions and\nlimitations under the License.\n```\n\n[^1]: MineCode continuously collects package metadata from various package ecosystems to maintain an up-to-date catalog of known packages.\n[^2]: A Base Package-URL is a Package-URL without a version, qualifiers, or subpath.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Faboutcode-org%2Fpurlvalidator-go","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Faboutcode-org%2Fpurlvalidator-go","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Faboutcode-org%2Fpurlvalidator-go/lists"}