{"id":13648501,"url":"https://github.com/jrgerber/smbios-lib","last_synced_at":"2026-04-02T01:36:35.068Z","repository":{"id":42461668,"uuid":"326496517","full_name":"jrgerber/smbios-lib","owner":"jrgerber","description":"SMBIOS Library","archived":false,"fork":false,"pushed_at":"2025-12-30T16:16:27.000Z","size":536,"stargazers_count":40,"open_issues_count":10,"forks_count":14,"subscribers_count":2,"default_branch":"main","last_synced_at":"2026-01-02T08:26:04.195Z","etag":null,"topics":["library","linux","macos","parsing","rust","windows"],"latest_commit_sha":null,"homepage":"","language":"Rust","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/jrgerber.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":"CODE_OF_CONDUCT.md","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}},"created_at":"2021-01-03T20:39:28.000Z","updated_at":"2025-12-30T16:16:24.000Z","dependencies_parsed_at":"2024-11-09T23:30:21.190Z","dependency_job_id":null,"html_url":"https://github.com/jrgerber/smbios-lib","commit_stats":{"total_commits":233,"total_committers":14,"mean_commits":"16.642857142857142","dds":"0.45922746781115875","last_synced_commit":"1cd91116615d52d52a49234d9face053a894d0fc"},"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/jrgerber/smbios-lib","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jrgerber%2Fsmbios-lib","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jrgerber%2Fsmbios-lib/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jrgerber%2Fsmbios-lib/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jrgerber%2Fsmbios-lib/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/jrgerber","download_url":"https://codeload.github.com/jrgerber/smbios-lib/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jrgerber%2Fsmbios-lib/sbom","scorecard":{"id":536682,"data":{"date":"2025-08-11","repo":{"name":"github.com/jrgerber/smbios-lib","commit":"36149cd5c8ebd0e17c13525736b5497b86d8a6ef"},"scorecard":{"version":"v5.2.1-40-gf6ed084d","commit":"f6ed084d17c9236477efd66e5b258b9d4cc7b389"},"score":3.9,"checks":[{"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":"Token-Permissions","score":0,"reason":"detected GitHub workflow tokens with excessive permissions","details":["Warn: no topLevel permission defined: .github/workflows/smbios_ci.yml: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":"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":"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":"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":"Code-Review","score":5,"reason":"Found 5/9 approved changesets -- score normalized to 5","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/smbios_ci.yml:20: update your workflow using https://app.stepsecurity.io/secureworkflow/jrgerber/smbios-lib/smbios_ci.yml/main?enable=pin","Info:   0 out of   1 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":"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":"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":"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":"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 30 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-20T07:10:25.874Z","repository_id":42461668,"created_at":"2025-08-20T07:10:25.874Z","updated_at":"2025-08-20T07:10:25.874Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":31293973,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-02T01:05:07.454Z","status":"ssl_error","status_checked_at":"2026-04-02T00:56:46.496Z","response_time":53,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6: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":["library","linux","macos","parsing","rust","windows"],"created_at":"2024-08-02T01:04:18.629Z","updated_at":"2026-04-02T01:36:35.051Z","avatar_url":"https://github.com/jrgerber.png","language":"Rust","funding_links":[],"categories":["Rust"],"sub_categories":[],"readme":"# smbios-lib\nAn SMBIOS Library created in Rust that reads and parses raw BIOS data\n\n[![crates.io](https://img.shields.io/crates/v/smbios-lib.svg)](https://crates.io/crates/smbios-lib)\n[![smbioslib_ci](https://github.com/jrgerber/smbios-lib/actions/workflows/smbios_ci.yml/badge.svg)](https://github.com/jrgerber/smbios-lib/actions/workflows/smbios_ci.yml)\n![LOC](https://tokei.rs/b1/github/jrgerber/smbios-lib?category=code)\n\n## Table of contents\n* [General info](#general-info)\n* [Dependencies](#dependencies)\n* [Security](#security)\n* [Examples](#examples)\n\n## General info\nThis project reads raw [SMBIOS](https://en.wikipedia.org/wiki/BIOS) data from either a device or file and provides the data as an API.\n\nFor an example project using this library take a look at [dmidecode-rs](https://github.com/jrgerber/dmidecode-rs).\n\n### Supports\n* [DMTF System Management BIOS (SMBIOS) Reference\nSpecification 3.7.0](https://www.dmtf.org/sites/default/files/standards/documents/DSP0134_3.7.0.pdf)\n* Linux\n* MacOS\n* Windows family\n\n\u003e SMBIOS 3.7.0 contains 49 defined structure types, all of which are covered by this library (types 0-46, 126, and 127).  Support via extensibility exists for types 128-255 (reserved for OEMs).  Extensibility also applies in the case when this library has not been updated for the latest specification version or a pre-released specification and a new type is introduced.\n\n### Project Status\nIn early development.\n\nThe current development stage is to finalize the API design.\n\n## Dependencies\n* Windows\n    * libc\n* MacOS\n    * libc\n    * mach2\n    * core-foundation\n    * core-foundation-sys\n    * io-kit-sys\n\t\n## Security\nThis library design follows a strict security mantra: *\"Never trust the input\"*.\n\nSMBIOS has been around for decades and has undergone many versions and revisions.  Many OEM vendors have interpreted and implemented the specifications over the years. Known cases of incorrect firmware implementations exist.  This presents a veritable labrynth of logic for both the known and the unknown. Rather than creating such a complex state machine, we take advantage of Rust's [Option\u003c\u003e](https://doc.rust-lang.org/std/option/) trait and assert that the act of retrieval for any and all information may fail.  The burden of proof thus shifts from the library to the library consumer who is required to implement the failing condition arm.\n\n## Examples\n### Retrieve a Field of a Single Instance Structure\nSome structures are required and are a single instance. (e.g. [SMBiosSystemInformation](src/structs/types/system_information.rs))\n\n```rust\n#[test]\n/// Retrieves the System UUID from a device.\n/// UUID is found in the System Information (type 1) structure\nfn retrieve_system_uuid() {\n    match table_load_from_device() {\n        Ok(data) =\u003e match data.find_map(|sys_info: SMBiosSystemInformation| sys_info.uuid()) {\n            Some(uuid) =\u003e println!(\"System Information UUID == {:?}\", uuid),\n            None =\u003e println!(\"No System Information (Type 1) structure found with a UUID field\"),\n        },\n        Err(err) =\u003e assert!(false, \"Failure: {:?}\", err)\n    }\n}\n```\n\nOutput:\n```\nrunning 1 test\nSystem Information UUID == Uuid(4ee6523f-d56a-f3ea-8e2a-891cf96286ea)\ntest retrieve_system_uuid ... ok\n```\n\n### Retrieve All Instances of a Structure - collect()\nSome structures are allowed to have more than one instance. (e.g. [SMBiosMemoryDevice](src/structs/types/memory_device.rs))\n\n```rust\n#[test]\n/// Prints information for all memory devices within a device.\nfn print_all_memory_devices() {\n    match table_load_from_device() {\n        Ok(data) =\u003e {\n            for memory_device in data.collect::\u003cSMBiosMemoryDevice\u003e() {\n                println!(\"{:#?}\", memory_device);\n            }\n        }\n        Err(err) =\u003e assert!(false, \"Failure: {:?}\", err),\n    }\n}\n```\n\nOutput:\n```\nrunning 1 test\nsmbioslib::structs::types::memory_device::SMBiosMemoryDevice {\n    header: smbioslib::core::header::Header {\n        struct_type: 17,\n        length: 40,\n        handle: smbioslib::structs::structure::Handle {\n            handle: 8,\n        },\n    },\n    physical_memory_array_handle: Some(\n        smbioslib::structs::structure::Handle {\n            handle: 1,\n        },\n    ),\n[...elided...]\n```\n\n### Retrieve a Structure Given a Handle - find_by_handle()\nSome structures point to other structures via handles. (e.g. [SMBiosMemoryDevice](src/structs/types/memory_device.rs) points to [SMBiosPhysicalMemoryArray](src/structs/types/physical_memory_array.rs))\n\n```rust\n/// Finds an associated struct by handle\n#[test]\nfn struct_struct_association() {\n    match table_load_from_device() {\n        Ok(data) =\u003e match data.first::\u003cSMBiosMemoryDevice\u003e() {\n            Some(first_memory_device) =\u003e {\n                let handle = first_memory_device.physical_memory_array_handle().unwrap();\n                match data.find_by_handle(\u0026handle) {\n                    Some(undefined_struct) =\u003e {\n                        let physical_memory_array = undefined_struct.defined_struct();\n                        println!(\"{:#?}\", physical_memory_array)\n                    }\n                    None =\u003e println!(\"No Physical Memory Array (Type 16) structure found\"),\n                }\n            }\n            None =\u003e println!(\"No Memory Device (Type 17) structure found\"),\n        },\n        Err(err) =\u003e assert!(false, \"Failure: {:?}\", err)\n    }\n}\n```\n\nOutput:\n```\nrunning 1 test\nPhysicalMemoryArray(\n    smbioslib::structs::types::physical_memory_array::SMBiosPhysicalMemoryArray {\n        header: smbioslib::core::header::Header {\n            struct_type: 16,\n            length: 23,\n            handle: smbioslib::structs::structure::Handle {\n                handle: 1,\n            },\n        },\n        location: Some(\n            smbioslib::structs::types::physical_memory_array::MemoryArrayLocationData {\n                raw: 3,\n                value: SystemBoardOrMotherboard,\n            },\n        ),\n[...elided...]\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjrgerber%2Fsmbios-lib","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjrgerber%2Fsmbios-lib","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjrgerber%2Fsmbios-lib/lists"}