{"id":31734969,"url":"https://github.com/oxibus/can-dbc","last_synced_at":"2025-10-09T09:04:00.223Z","repository":{"id":37561724,"uuid":"150968971","full_name":"oxibus/can-dbc","owner":"oxibus","description":"Rust dbc parser","archived":false,"fork":false,"pushed_at":"2025-10-03T23:54:46.000Z","size":995,"stargazers_count":82,"open_issues_count":10,"forks_count":36,"subscribers_count":5,"default_branch":"main","last_synced_at":"2025-10-04T00:23:19.490Z","etag":null,"topics":[],"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/oxibus.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE.md","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}},"created_at":"2018-09-30T13:18:54.000Z","updated_at":"2025-10-03T23:54:49.000Z","dependencies_parsed_at":"2024-10-25T18:41:16.398Z","dependency_job_id":"fb374b41-e48b-401d-a9b3-7ae76c4dcec1","html_url":"https://github.com/oxibus/can-dbc","commit_stats":{"total_commits":158,"total_committers":6,"mean_commits":"26.333333333333332","dds":0.03797468354430378,"last_synced_commit":"7a3592008ea9accb531235937198fe8dd72a7428"},"previous_names":["oxibus/can-dbc"],"tags_count":16,"template":false,"template_full_name":null,"purl":"pkg:github/oxibus/can-dbc","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/oxibus%2Fcan-dbc","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/oxibus%2Fcan-dbc/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/oxibus%2Fcan-dbc/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/oxibus%2Fcan-dbc/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/oxibus","download_url":"https://codeload.github.com/oxibus/can-dbc/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/oxibus%2Fcan-dbc/sbom","scorecard":{"id":617400,"data":{"date":"2025-08-11","repo":{"name":"github.com/marcelbuesing/can-dbc","commit":"4e3c9f40016330a894793338dfbc4d8c7811b005"},"scorecard":{"version":"v5.2.1-40-gf6ed084d","commit":"f6ed084d17c9236477efd66e5b258b9d4cc7b389"},"score":3.8,"checks":[{"name":"Code-Review","score":1,"reason":"Found 4/27 approved changesets -- score normalized to 1","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":"Maintained","score":3,"reason":"4 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 3","details":null,"documentation":{"short":"Determines if the project is \"actively maintained\".","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#maintained"}},{"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":"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":"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.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":"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":"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.yml:10: update your workflow using https://app.stepsecurity.io/secureworkflow/marcelbuesing/can-dbc/ci.yml/dev?enable=pin","Warn: third-party GitHubAction not pinned by hash: .github/workflows/ci.yml:11: update your workflow using https://app.stepsecurity.io/secureworkflow/marcelbuesing/can-dbc/ci.yml/dev?enable=pin","Warn: third-party GitHubAction not pinned by hash: .github/workflows/ci.yml:16: update your workflow using https://app.stepsecurity.io/secureworkflow/marcelbuesing/can-dbc/ci.yml/dev?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/ci.yml:24: update your workflow using https://app.stepsecurity.io/secureworkflow/marcelbuesing/can-dbc/ci.yml/dev?enable=pin","Warn: third-party GitHubAction not pinned by hash: .github/workflows/ci.yml:25: update your workflow using https://app.stepsecurity.io/secureworkflow/marcelbuesing/can-dbc/ci.yml/dev?enable=pin","Warn: third-party GitHubAction not pinned by hash: .github/workflows/ci.yml:30: update your workflow using https://app.stepsecurity.io/secureworkflow/marcelbuesing/can-dbc/ci.yml/dev?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/ci.yml:38: update your workflow using https://app.stepsecurity.io/secureworkflow/marcelbuesing/can-dbc/ci.yml/dev?enable=pin","Warn: third-party GitHubAction not pinned by hash: .github/workflows/ci.yml:39: update your workflow using https://app.stepsecurity.io/secureworkflow/marcelbuesing/can-dbc/ci.yml/dev?enable=pin","Warn: third-party GitHubAction not pinned by hash: .github/workflows/ci.yml:45: update your workflow using https://app.stepsecurity.io/secureworkflow/marcelbuesing/can-dbc/ci.yml/dev?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/ci.yml:54: update your workflow using https://app.stepsecurity.io/secureworkflow/marcelbuesing/can-dbc/ci.yml/dev?enable=pin","Warn: third-party GitHubAction not pinned by hash: .github/workflows/ci.yml:55: update your workflow using https://app.stepsecurity.io/secureworkflow/marcelbuesing/can-dbc/ci.yml/dev?enable=pin","Warn: third-party GitHubAction not pinned by hash: .github/workflows/ci.yml:61: update your workflow using https://app.stepsecurity.io/secureworkflow/marcelbuesing/can-dbc/ci.yml/dev?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/ci.yml:69: update your workflow using https://app.stepsecurity.io/secureworkflow/marcelbuesing/can-dbc/ci.yml/dev?enable=pin","Warn: third-party GitHubAction not pinned by hash: .github/workflows/ci.yml:70: update your workflow using https://app.stepsecurity.io/secureworkflow/marcelbuesing/can-dbc/ci.yml/dev?enable=pin","Info:   0 out of   5 GitHub-owned GitHubAction dependencies pinned","Info:   0 out of   9 third-party 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":"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":"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":"License","score":10,"reason":"license file detected","details":["Info: project has a license file: LICENSE.md:0","Info: FSF or OSI recognized license: MIT License: LICENSE.md:0"],"documentation":{"short":"Determines if the project has defined a license.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#license"}},{"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":"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 'dev'"],"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 7 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-21T04:20:14.196Z","repository_id":37561724,"created_at":"2025-08-21T04:20:14.196Z","updated_at":"2025-08-21T04:20:14.196Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":279001173,"owners_count":26083021,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-10-09T02:00:07.460Z","response_time":59,"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":[],"created_at":"2025-10-09T09:01:02.780Z","updated_at":"2025-10-09T09:04:00.218Z","avatar_url":"https://github.com/oxibus.png","language":"Rust","readme":"# can-dbc\n\n[![GitHub repo](https://img.shields.io/badge/github-oxibus/can--dbc-8da0cb?logo=github)](https://github.com/oxibus/can-dbc)\n[![crates.io version](https://img.shields.io/crates/v/can-dbc)](https://crates.io/crates/can-dbc)\n[![crate usage](https://img.shields.io/crates/d/can-dbc)](https://crates.io/crates/can-dbc)\n[![docs.rs status](https://img.shields.io/docsrs/can-dbc)](https://docs.rs/can-dbc)\n[![crates.io license](https://img.shields.io/crates/l/can-dbc)](https://github.com/oxibus/can-dbc)\n[![CI build status](https://github.com/oxibus/can-dbc/actions/workflows/ci.yml/badge.svg)](https://github.com/oxibus/can-dbc/actions)\n[![Codecov](https://img.shields.io/codecov/c/github/oxibus/can-dbc)](https://app.codecov.io/gh/oxibus/can-dbc)\n\nA CAN-dbc format parser written with Rust's [nom](https://github.com/Geal/nom) parser combinator library. CAN databases are used to exchange details about a CAN network, e.g. what messages are being send over the CAN bus and what data do they contain.\n\n# 1. Example\n\nRead dbc file and generate Rust structs based on the messages/signals defined in the dbc.\n\n```rust,no_run\nuse can_dbc::DBC;\nuse codegen::Scope;\n\nuse std::fs::File;\nuse std::io;\nuse std::io::prelude::*;\n\nfn main() -\u003e io::Result\u003c()\u003e {\n    let mut f = File::open(\"./examples/sample.dbc\")?;\n    let mut buffer = Vec::new();\n    f.read_to_end(\u0026mut buffer)?;\n\n    let dbc = can_dbc::DBC::from_slice(\u0026buffer).expect(\"Failed to parse dbc file\");\n\n    let mut scope = Scope::new();\n    for message in dbc.messages() {\n        for signal in message.signals() {\n\n            let mut scope = Scope::new();\n            let message_struct = scope.new_struct(message.message_name());\n            for signal in message.signals() {\n                message_struct.field(signal.name().to_lowercase().as_str(), \"f64\");\n            }\n        }\n    }\n\n    println!(\"{}\", scope.to_string());\n    Ok(())\n}\n```\n\nFor a proper implementation for reading or writing CAN frames according to the DBC, I recommend you take a look at [dbc-codegen](https://github.com/technocreatives/dbc-codegen).\n\n# 2. Example\n\nThe file parser simply parses a dbc input file and prints the parsed content.\n\n```bash\ncargo test \u0026\u0026 ./target/debug/examples/file_parser -i examples/sample.dbc\n```\n\n# Installation\ncan-dbc is available on crates.io and can be included in your Cargo enabled project like this:\n\n```toml\n[dependencies]\ncan-dbc = \"3.0\"\n```\n\n# Implemented DBC parts\n\n- [x] version\n- [x] new_symbols\n- [x] bit_timing *(deprecated but mandatory)*\n- [x] nodes\n- [x] value_tables\n- [x] messages\n- [x] message_transmitters\n- [x] environment_variables\n- [x] environment_variables_data\n- [x] signal_types\n- [x] comments\n- [x] attribute_definitions\n- [ ] sigtype_attr_list *(format missing documentation)*\n- [x] attribute_defaults\n- [x] attribute_values\n- [x] value_descriptions\n- [ ] category_definitions *(deprecated)*\n- [ ] categories *(deprecated)*\n- [ ] filter *(deprecated)*\n- [x] signal_type_refs\n- [x] signal_groups\n- [x] signal_extended_value_type_list\n\n# Deviating from standard\n- multispace between parsers instead of single space allowing e.g. (two spaces) `SIG_GROUP  13`.\n- `VAL_` suffix may be ` ;` or `;`\n\n# Alternatives\n- [canparse](https://github.com/jmagnuson/canparse)\n\n# Credits\nTest dbcs files were copied from the [cantools](https://github.com/eerimoq/cantools) project.\n\n# License Checks\n\nThis project uses [cargo-deny](https://github.com/EmbarkStudios/cargo-deny) for checking the licenses of dependencies. To run the check locally run the following:\n\n```bash\ncargo install cargo-deny\ncargo deny check\n```\n\n# Development\n* This project is easier to develop with [just](https://just.systems/man/en/), a modern alternative to `make`.\n* To get a list of available commands, run `just`.\n* To run tests, use `just test`.\n* This project uses [insta](https://insta.rs) for snapshot testing. To update the snapshots run `just bless`\n","funding_links":[],"categories":["Libraries"],"sub_categories":["Automotive"],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Foxibus%2Fcan-dbc","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Foxibus%2Fcan-dbc","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Foxibus%2Fcan-dbc/lists"}