{"id":17316020,"url":"https://github.com/hertg/go-pciids","last_synced_at":"2026-04-30T17:31:40.104Z","repository":{"id":51088067,"uuid":"520039124","full_name":"hertg/go-pciids","owner":"hertg","description":":page_facing_up: :mag: A minimal, zero-dependency go library to parse pci.ids files","archived":false,"fork":false,"pushed_at":"2022-10-10T18:52:50.000Z","size":36,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-03-27T01:46:35.120Z","etag":null,"topics":["go","golang","hacktoberfest","library","linux","pci","pci-express","pci-id","pciids","sysfs"],"latest_commit_sha":null,"homepage":"","language":"Go","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/hertg.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":"FUNDING.yml","license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null},"funding":{"github":["hertg"]}},"created_at":"2022-08-01T09:08:35.000Z","updated_at":"2022-10-10T18:37:03.000Z","dependencies_parsed_at":"2022-09-01T17:03:41.482Z","dependency_job_id":null,"html_url":"https://github.com/hertg/go-pciids","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/hertg/go-pciids","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hertg%2Fgo-pciids","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hertg%2Fgo-pciids/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hertg%2Fgo-pciids/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hertg%2Fgo-pciids/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/hertg","download_url":"https://codeload.github.com/hertg/go-pciids/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hertg%2Fgo-pciids/sbom","scorecard":{"id":462425,"data":{"date":"2025-08-11","repo":{"name":"github.com/hertg/go-pciids","commit":"00ca1ad0f95ab05591013757a4eb415890a15539"},"scorecard":{"version":"v5.2.1-40-gf6ed084d","commit":"f6ed084d17c9236477efd66e5b258b9d4cc7b389"},"score":3.4,"checks":[{"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":"Token-Permissions","score":0,"reason":"detected GitHub workflow tokens with excessive permissions","details":["Warn: no topLevel permission defined: .github/workflows/ci.yaml:1","Info: no jobLevel write permissions found"],"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":"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":"Dangerous-Workflow","score":10,"reason":"no dangerous workflow patterns detected","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/13 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":"Pinned-Dependencies","score":0,"reason":"dependency not pinned by hash detected -- score normalized to 0","details":["Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/ci.yaml:18: update your workflow using https://app.stepsecurity.io/secureworkflow/hertg/go-pciids/ci.yaml/main?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/ci.yaml:20: update your workflow using https://app.stepsecurity.io/secureworkflow/hertg/go-pciids/ci.yaml/main?enable=pin","Info:   0 out of   2 GitHub-owned GitHubAction dependencies pinned"],"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":"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":0,"reason":"branch protection not enabled on development/release branches","details":["Warn: branch protection not enabled for branch 'main'"],"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":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"}}]},"last_synced_at":"2025-08-19T11:29:46.698Z","repository_id":51088067,"created_at":"2025-08-19T11:29:46.698Z","updated_at":"2025-08-19T11:29:46.698Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32472396,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-30T13:12:12.517Z","status":"ssl_error","status_checked_at":"2026-04-30T13:12:06.837Z","response_time":57,"last_error":"SSL_read: 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":["go","golang","hacktoberfest","library","linux","pci","pci-express","pci-id","pciids","sysfs"],"created_at":"2024-10-15T13:11:20.913Z","updated_at":"2026-04-30T17:31:40.089Z","avatar_url":"https://github.com/hertg.png","language":"Go","funding_links":["https://github.com/sponsors/hertg"],"categories":[],"sub_categories":[],"readme":"\n\u003cdiv align=\"center\"\u003e\n  \u003ch1\u003e\u003cstrong\u003ego-pciids\u003c/strong\u003e\u003c/h1\u003e\n  \u003cp\u003e\n\t\t\u003cstrong\u003eA minimal, zero-dependency library to parse \u003ca href=\"https://pci-ids.ucw.cz/\"\u003epci.ids\u003c/a\u003e files.\u003c/strong\u003e\n  \u003c/p\u003e\n  \u003cp\u003e\n    \u003ca href=\"https://goreportcard.com/report/github.com/hertg/go-pciids\"\u003e\n      \u003cimg alt=\"Go Report Card\" src=\"https://goreportcard.com/badge/github.com/hertg/go-pciids\" /\u003e\n    \u003c/a\u003e\n    \u003ca href=\"#\"\u003e\n\t\t\t\u003cimg alt=\"License Information\" src=\"https://img.shields.io/github/license/hertg/go-pciids\"\u003e\n    \u003c/a\u003e\n  \u003c/p\u003e\n\u003c/div\u003e\n\n## Description\n\nThe library provides methods to parse the contents of a `pci.ids` file\nand export methods to query the parsed data. It has been created\nas a stripped down, but more performant alternative to [jaypipes/pcidb](https://github.com/jaypipes/pcidb).\nBecause of this minimalistic approach only functions for parsing and\nquerying are provided, without any extra features (see [Limitations](#limitations)).\n\n## Limitations\n\nThe following features are **not** included:\n\n- No caching\n- No fetching of `pci.ids` via network\n- No search for `pci.ids` files locally\n\n## Usage\n\n### Install\n\n```shell\ngo get github.com/hertg/go-pciids\n```\n\n### Parse\n\n```go\n// you have to create a bufio.scanner yourself\nfilepath := \"/usr/share/hwdata/pci.ids\"\nfile, _ := os.Open(filepath)\nscanner := bufio.NewScanner(file)\n\n// pass the scanner to the NewDB method\ndb, err := pciids.NewDB(scanner)\n```\n\n### Query\n\nNames and labels of vendors, devices, and classes can be easily\nretrieved by using the `Find...Label` methods available inside the\n`pciids` package.\n\n```go\ndb.FindClassLabel(0x03) // 'Display controller'\ndb.FindSubclassLabel(0x03, 0x00) // 'VGA compatible controller'\ndb.FindVendorLabel(0x1002) // 'Advanced Micro Devices, Inc. [AMD/ATI]'\ndb.FindDeviceLabel(0x1002, 0x73bf) // 'Navi 21 [Radeon RX 6800/6800 XT / 6900 XT]'\ndb.FindSubsystemLabel(0x148c, 0x2408) // 'Red Devil AMD Radeon RX 6900 XT'\n```\n\nThe `DB` can also be traversed manually,\nsee a quick overview of the DB structure.\n\n```text\nDB\n├─ vendors\n│  ├─ devices\n│  │  └─ subsystems\n│  └─ subsystems \n├─ devices\n│  └─ subsystems \n├─ subsystems\n└─ classes\n   └─ subclasses\n      └─ progifs\n```\n\n## Comparison\n\nIt parses the vendor, device, and class IDs directly to\nunsigned integers. This prevents unnecessary string allocations\nand significantly improves performance.\n\nIt has been found that this library parses at 2-3 times the speed\nwhile using roughly half the amount memory in comparison to [jaypipes/pcidb](https://github.com/jaypipes/pcidb).\n\n```text\ngoos: linux\ngoarch: amd64\npkg: github.com/hertg/go-pciids/pkg/pciids\ncpu: AMD Ryzen 9 5950X 16-Core Processor\nBenchmarkGoPCIIDS-32    \t     100\t  16775134 ns/op\t 6400548 B/op\t  116541 allocs/op\nBenchmarkPCIDB-32       \t      37\t  29394779 ns/op\t11972032 B/op\t  184512 allocs/op\nPASS\nok  \tgithub.com/hertg/go-pciids/pkg/pciids\t2.813s\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhertg%2Fgo-pciids","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fhertg%2Fgo-pciids","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhertg%2Fgo-pciids/lists"}