{"id":29826828,"url":"https://github.com/coderaiser/binarnia","last_synced_at":"2026-02-28T15:01:24.704Z","repository":{"id":66160141,"uuid":"144262788","full_name":"coderaiser/binarnia","owner":"coderaiser","description":"parse binary buffer to json according to schema","archived":false,"fork":false,"pushed_at":"2025-02-11T19:02:23.000Z","size":53,"stargazers_count":2,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-10-07T23:46:04.713Z","etag":null,"topics":["binary","hex","javascript","nodejs","parse","schema"],"latest_commit_sha":null,"homepage":null,"language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/coderaiser.png","metadata":{"files":{"readme":"README.md","changelog":"ChangeLog","contributing":null,"funding":".github/FUNDING.yml","license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null},"funding":{"github":"coderaiser","patreon":"coderaiser","open_collective":"cloudcmd","ko_fi":"coderaiser"}},"created_at":"2018-08-10T08:57:54.000Z","updated_at":"2025-02-11T19:02:26.000Z","dependencies_parsed_at":"2024-04-19T01:00:10.061Z","dependency_job_id":null,"html_url":"https://github.com/coderaiser/binarnia","commit_stats":{"total_commits":66,"total_committers":2,"mean_commits":33.0,"dds":"0.045454545454545414","last_synced_commit":"510ae01d7bb31a07d5e6aa01cbb600f98536b939"},"previous_names":[],"tags_count":15,"template":false,"template_full_name":null,"purl":"pkg:github/coderaiser/binarnia","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/coderaiser%2Fbinarnia","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/coderaiser%2Fbinarnia/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/coderaiser%2Fbinarnia/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/coderaiser%2Fbinarnia/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/coderaiser","download_url":"https://codeload.github.com/coderaiser/binarnia/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/coderaiser%2Fbinarnia/sbom","scorecard":{"id":297298,"data":{"date":"2025-08-11","repo":{"name":"github.com/coderaiser/binarnia","commit":"9f7c9512d00d82aebe3f7d9aefe369826846ab10"},"scorecard":{"version":"v5.2.1-40-gf6ed084d","commit":"f6ed084d17c9236477efd66e5b258b9d4cc7b389"},"score":3.1,"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":"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/30 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":"SAST","score":0,"reason":"no SAST tool detected","details":["Warn: no pull requests merged into dev branch"],"documentation":{"short":"Determines if the project uses static code analysis.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#sast"}},{"name":"Token-Permissions","score":0,"reason":"detected GitHub workflow tokens with excessive permissions","details":["Warn: no topLevel permission defined: .github/workflows/nodejs.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":"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":"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/nodejs.yml:18: update your workflow using https://app.stepsecurity.io/secureworkflow/coderaiser/binarnia/nodejs.yml/master?enable=pin","Warn: third-party GitHubAction not pinned by hash: .github/workflows/nodejs.yml:19: update your workflow using https://app.stepsecurity.io/secureworkflow/coderaiser/binarnia/nodejs.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/nodejs.yml:23: update your workflow using https://app.stepsecurity.io/secureworkflow/coderaiser/binarnia/nodejs.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/nodejs.yml:34: update your workflow using https://app.stepsecurity.io/secureworkflow/coderaiser/binarnia/nodejs.yml/master?enable=pin","Warn: third-party GitHubAction not pinned by hash: .github/workflows/nodejs.yml:48: update your workflow using https://app.stepsecurity.io/secureworkflow/coderaiser/binarnia/nodejs.yml/master?enable=pin","Warn: third-party GitHubAction not pinned by hash: .github/workflows/nodejs.yml:55: update your workflow using https://app.stepsecurity.io/secureworkflow/coderaiser/binarnia/nodejs.yml/master?enable=pin","Info:   0 out of   3 GitHub-owned GitHubAction dependencies pinned","Info:   0 out of   3 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":"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":"License","score":0,"reason":"license file not detected","details":["Warn: project does not have a license file"],"documentation":{"short":"Determines if the project has defined a license.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#license"}},{"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":"Branch-Protection","score":0,"reason":"branch protection not enabled on development/release branches","details":["Warn: branch protection not enabled for branch 'master'"],"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"}}]},"last_synced_at":"2025-08-17T19:52:22.749Z","repository_id":66160141,"created_at":"2025-08-17T19:52:22.750Z","updated_at":"2025-08-17T19:52:22.750Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29938966,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-28T13:49:17.081Z","status":"ssl_error","status_checked_at":"2026-02-28T13:48:50.396Z","response_time":90,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5: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":["binary","hex","javascript","nodejs","parse","schema"],"created_at":"2025-07-29T05:35:26.232Z","updated_at":"2026-02-28T15:01:24.677Z","avatar_url":"https://github.com/coderaiser.png","language":"JavaScript","funding_links":["https://github.com/sponsors/coderaiser","https://patreon.com/coderaiser","https://opencollective.com/cloudcmd","https://ko-fi.com/coderaiser"],"categories":[],"sub_categories":[],"readme":"# Binarnia [![License][LicenseIMGURL]][LicenseURL] [![NPM version][NPMIMGURL]][NPMURL] [![Build Status][BuildStatusIMGURL]][BuildStatusURL] [![Coverage][CoverageIMGURL]][CoverageURL]\n\nParse binary buffer to json according to schema.\n\n## Install\n\n```\nnpm i binarnia\n```\n\n## How to use?\n\n```js\nconst binarnia = require('binarnia');\nconst schema = [{\n    offset: '0x01',\n    name: 'arch',\n    size: 1,\n    type: 'value',\n}];\n\nconst buffer = Buffer.from([0x22]);\n\n// endianness = 'LE'\nbinarnia({\n    schema,\n    buffer,\n});\n\n// returns\n({\n    arch: '0x22',\n});\n\n// directly pass endianness\nbinarnia({\n    schema,\n    endian: 'BE',\n    buffer,\n});\n\n// returns\n({\n    arch: '0x22',\n});\n\nconst array = [0x22];\n\n// works with array as well\nbinarnia({\n    schema,\n    endian: 'BE',\n    buffer: array,\n});\n\n// returns\n({\n    arch: 'x22',\n});\n```\n\n### Value\n\n```js\nconst schema = [{\n    offset: '0x00',\n    name: 'format',\n    size: 1,\n    type: 'value',\n}];\n\nconst buffer = [0x03];\n\nbinarnia({\n    schema,\n    buffer,\n});\n\n// returns\n({\n    format: '0x03',\n});\n```\n\n### Decimal\n\n```js\nconst schema = [{\n    offset: '0x00',\n    name: 'size',\n    size: 1,\n    type: 'decimal',\n}];\n\nconst buffer = [0x03];\n\nbinarnia({\n    schema,\n    buffer,\n});\n\n// returns\n({\n    size: '51',\n});\n```\n\n### String\n\n```js\nconst schema = [{\n    offset: '0x00',\n    name: 'message',\n    size: 5,\n    type: 'string',\n}];\n\nconst buffer = [\n    0x68,\n    0x65,\n    0x6c,\n    0x6c,\n    0x6f,\n    0x27,\n    0x00,\n];\n\nbinarnia({\n    schema,\n    endian: 'BE',\n    buffer,\n});\n\n// returns\n({\n    message: 'hello',\n});\n```\n\n### Bit\n\n```js\nconst schema = [{\n    name: 'format',\n    size: 1,\n    type: 'bit',\n    bit: {\n        '0x1': 'MZ',\n        '0x2': 'PE',\n        '0x4': 'ELF',\n    },\n}];\n\nconst buffer = [0x03];\n\nconst result = binarnia({\n    offset: '0x00',\n    schema,\n    buffer,\n});\n\n// returns\n({\n    format: ['MZ', 'PE'],\n});\n```\n\n### Enum\n\n```js\nconst binarnia = require('binarnia');\nconst schema = [{\n    offset: '0x00',\n    name: 'format',\n    size: 1,\n    type: 'enum',\n    enum: {\n        '0x22': 'MZ',\n        '0x33': 'PE',\n    },\n}];\n\nconst buffer = Buffer.from([0x22, 0x01]);\n\nbinarnia({\n    schema,\n    buffer,\n});\n\n// returns\n({\n    format: 'MZ',\n});\n```\n\n### Links\n\n```js\nconst schema = [{\n    name: 'msg_size',\n    size: 1,\n    type: 'value',\n}, {\n    name: 'msg',\n    size: '\u003cmsg_size\u003e',\n    type: 'string',\n}];\n\nconst buffer = [0x1, 0x31];\n\nbinarnia({\n    schema,\n    buffer,\n});\n\n// returns\n({\n    msg_size: '0x01',\n    msg: '1',\n});\n```\n\n### Array\n\n```js\nconst binarnia = require('binarnia');\nconst schema = [{\n    offset: '0x01',\n    name: 'arch',\n    size: 1,\n    type: 'array',\n    array: [\n        'x32',\n        'x64',\n    ],\n}];\n\nconst buffer = Buffer.from([0x22, 0x01]);\n\nbinarnia({\n    schema,\n    buffer,\n});\n\n// returns\n({\n    arch: 'x32',\n});\n```\n\n### Ignore\n\n```js\nconst schema = [{\n    name: 'format',\n    size: 2,\n    type: 'value',\n}, {\n    name: 'reserved',\n    size: 2,\n    type: 'ignore',\n}];\n\nconst buffer = [\n    0x01,\n    0x02,\n    0x03,\n    0x04,\n];\n\nbinarnia({\n    schema,\n    buffer,\n});\n\n// returns\n({\n    format: '0x201',\n});\n```\n\n### sizeof(schema)\n\n```js\nconst schema = [{\n    name: 'a',\n    size: 4,\n    type: 'value',\n}, {\n    name: 'b',\n    size: 4,\n    type: 'value',\n}];\n\nbinarnia.sizeof(schema);\n// returns\n8;\n```\n\n## License\n\nMIT\n\n[NPMIMGURL]: https://img.shields.io/npm/v/binarnia.svg?style=flat\u0026longCache=true\n[BuildStatusIMGURL]: https://img.shields.io/travis/coderaiser/binarnia/master.svg?style=flat\u0026longCache=true\n[LicenseIMGURL]: https://img.shields.io/badge/license-MIT-317BF9.svg?style=flat\u0026longCache=true\n[NPMURL]: https://npmjs.org/package/binarnia \"npm\"\n[BuildStatusURL]: https://travis-ci.org/coderaiser/binarnia \"Build Status\"\n[LicenseURL]: https://tldrlegal.com/license/mit-license \"MIT License\"\n[CoverageURL]: https://coveralls.io/github/coderaiser/binarnia?branch=master\n[CoverageIMGURL]: https://coveralls.io/repos/coderaiser/binarnia/badge.svg?branch=master\u0026service=github\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcoderaiser%2Fbinarnia","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcoderaiser%2Fbinarnia","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcoderaiser%2Fbinarnia/lists"}