{"id":34107623,"url":"https://github.com/dannyhann/protobuf_decoder","last_synced_at":"2026-04-08T13:31:11.714Z","repository":{"id":57455141,"uuid":"339959606","full_name":"dannyhann/protobuf_decoder","owner":"dannyhann","description":"Decode protobuf without proto file","archived":false,"fork":false,"pushed_at":"2024-05-22T13:13:37.000Z","size":48,"stargazers_count":46,"open_issues_count":1,"forks_count":9,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-10-27T13:57:06.088Z","etag":null,"topics":["parser","protobuf","protobuf-decoder","protocol-buffers","python","python-protobuf","python-protobuf-decoder","python-protocol-buffers"],"latest_commit_sha":null,"homepage":"","language":"Python","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/dannyhann.png","metadata":{"files":{"readme":"README.md","changelog":null,"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}},"created_at":"2021-02-18T06:41:13.000Z","updated_at":"2025-08-11T16:05:43.000Z","dependencies_parsed_at":"2023-11-12T13:29:33.075Z","dependency_job_id":"5ca19bbb-9c94-4645-8dc0-bab8542e682b","html_url":"https://github.com/dannyhann/protobuf_decoder","commit_stats":{"total_commits":18,"total_committers":3,"mean_commits":6.0,"dds":"0.11111111111111116","last_synced_commit":"20c6c1b87cd22391cfce6b36f8b6b505e9d490b9"},"previous_names":[],"tags_count":5,"template":false,"template_full_name":null,"purl":"pkg:github/dannyhann/protobuf_decoder","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dannyhann%2Fprotobuf_decoder","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dannyhann%2Fprotobuf_decoder/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dannyhann%2Fprotobuf_decoder/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dannyhann%2Fprotobuf_decoder/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/dannyhann","download_url":"https://codeload.github.com/dannyhann/protobuf_decoder/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dannyhann%2Fprotobuf_decoder/sbom","scorecard":{"id":321444,"data":{"date":"2025-08-11","repo":{"name":"github.com/dannyhann/protobuf_decoder","commit":"73a7aa99d3b7965c4abc21022e708c48734ee05b"},"scorecard":{"version":"v5.2.1-40-gf6ed084d","commit":"f6ed084d17c9236477efd66e5b258b9d4cc7b389"},"score":1.7,"checks":[{"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":"Code-Review","score":0,"reason":"Found 2/25 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":"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":"Dangerous-Workflow","score":-1,"reason":"no workflows found","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":"Token-Permissions","score":-1,"reason":"No tokens found","details":null,"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":"Pinned-Dependencies","score":-1,"reason":"no dependencies found","details":null,"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":"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: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 9 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":0,"reason":"15 existing vulnerabilities detected","details":["Warn: Project is vulnerable to: PYSEC-2022-42986 / GHSA-43fp-rhv2-5gv8","Warn: Project is vulnerable to: PYSEC-2023-135 / GHSA-xqr8-7jwr-rhp7","Warn: Project is vulnerable to: PYSEC-2024-60 / GHSA-jjg7-2v4v-x38h","Warn: Project is vulnerable to: PYSEC-2022-42969","Warn: Project is vulnerable to: PYSEC-2023-117 / GHSA-mrwq-x4v8-fh7p","Warn: Project is vulnerable to: GHSA-9hjg-9r4m-mvj7","Warn: Project is vulnerable to: GHSA-9wx4-h78v-vm56","Warn: Project is vulnerable to: PYSEC-2023-74 / GHSA-j8r2-6x86-q33q","Warn: Project is vulnerable to: GHSA-g7vv-2v7x-gj9p","Warn: Project is vulnerable to: GHSA-34jh-p97f-mpxf","Warn: Project is vulnerable to: PYSEC-2021-59 / GHSA-5phf-pp7p-vc2r","Warn: Project is vulnerable to: PYSEC-2023-212 / GHSA-g4mx-q9vg-27p4","Warn: Project is vulnerable to: GHSA-pq67-6m6q-mj2v","Warn: Project is vulnerable to: PYSEC-2021-108 / GHSA-q2q7-5pp4-w6pg","Warn: Project is vulnerable to: PYSEC-2023-192 / GHSA-v845-jxx5-vc9f"],"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-18T01:27:10.619Z","repository_id":57455141,"created_at":"2025-08-18T01:27:10.619Z","updated_at":"2025-08-18T01:27:10.619Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":31558380,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-08T10:21:54.569Z","status":"ssl_error","status_checked_at":"2026-04-08T10:21:38.171Z","response_time":54,"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":["parser","protobuf","protobuf-decoder","protocol-buffers","python","python-protobuf","python-protobuf-decoder","python-protocol-buffers"],"created_at":"2025-12-14T18:07:40.914Z","updated_at":"2026-04-08T13:31:11.706Z","avatar_url":"https://github.com/dannyhann.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"![Test Coverage](coverage.svg)\n\n# Protobuf Decoder\n\nSimple protobuf decoder for python\n\n# Motivation\n\nThe goal of this project is decode protobuf binary without proto files\n\n# Installation\n\nInstall using pip\n\n`pip install protobuf-decoder`\n\n# Simple Examples\n\n``` python\n\"\"\"\n# proto\nmessage Test1 {\n  string a = 1;\n}\n\n# message\n{\n  \"a\": \"테스트\"\n}\n\n# binary\n0A 09 ED 85 8C EC 8A A4 ED 8A B8\n\"\"\"\nfrom protobuf_decoder.protobuf_decoder import Parser\n\ntest_target = \"0A 09 ED 85 8C EC 8A A4 ED 8A B8\"\nparsed_data = Parser().parse(test_target)\nassert parsed_data == ParsedResults([ParsedResult(field=1, wire_type=\"string\", data='테스트')])\nassert parsed_data.to_dict() == {'results': [{'field': 1, 'wire_type': 'string', 'data': '테스트'}]}\n```\n\n``` python\n\"\"\"\n# proto\nmessage Test1 {\n  int32 a = 1;\n}\n\nmessage Test2 {\n  Test1 b = 3;\n}\n\n# message\n{\n  \"a\": {\n        \"b\": 150\n        }\n}\n\n# binary\n1a 03 08 96 01\n\"\"\"\nfrom protobuf_decoder.protobuf_decoder import Parser\n\ntest_target = \"1a 03 08 96 01\"\nparsed_data = Parser().parse(test_target)\nassert parsed_data == ParsedResults(\n    [\n        ParsedResult(field=3, wire_type=\"length_delimited\", data=ParsedResults([\n            ParsedResult(field=1, wire_type=\"varint\", data=150)\n        ]))\n    ])\nassert parsed_data.to_dict() == {'results': [{'field': 3, 'wire_type': 'length_delimited', 'data': {\n    'results': [{'field': 1, 'wire_type': 'varint', 'data': 150}]}}]}\n\n```\n\n``` python\n\"\"\"\n# proto\nmessage Test1 {\n  required string a = 1;\n}\n\n# message\n{\n  \"a\": \"✊\"\n}\n\n# binary\n0A 03 E2 9C 8A\n\n\"\"\"\nfrom protobuf_decoder.protobuf_decoder import Parser\n\ntest_target = \"0A 03 E2 9C 8A\"\nparsed_data = Parser().parse(test_target)\nassert parsed_data == ParsedResults([ParsedResult(field=1, wire_type=\"string\", data='✊')])\nassert parsed_data.to_dict() == {'results': [{'field': 1, 'wire_type': 'string', 'data': '✊'}]}\n\n```\n\n# Nested Protobuf Detection Logic\n\nOur project implements a distinct method to determine whether a given input is possibly a nested protobuf.\nThe core of this logic is the `is_maybe_nested_protobuf` function.\nWe recently enhanced this function to provide a more accurate distinction and handle nested protobufs effectively.\n\n### Current Logic\n\nThe `is_maybe_nested_protobuf` function works by:\n\n- Attempting to convert the given hex string to UTF-8.\n- Checking the ordinal values of the first four characters of the converted data.\n- Returning `True` if the data might be a nested protobuf based on certain conditions, otherwise returning False.\n\n### Extensibility\n\nYou can extend or modify the `is_maybe_nested_protobuf` function based on your specific requirements or use-cases.\nIf you find a scenario where the current logic can be further improved,\nfeel free to adapt the function accordingly.\n\n(A big shoutout to **@fuzzyrichie** for their significant contributions to this update!)\n\n# Remain Bytes\n\nIf there are remaining bytes after parsing, the parser will return the remaining bytes as a string.\n\n```python\nfrom protobuf_decoder.protobuf_decoder import Parser\n\ntest_target = \"ed 85 8c ec 8a a4 ed 8a b8\"\nparsed_data = Parser().parse(test_target)\n\nassert parsed_data.has_results is False\nassert parsed_data.has_remain_data is True\n\nassert parsed_data.remain_data == \"ed 85 8c ec 8a a4 ed 8a b8\"\nassert parsed_data.to_dict() == {'results': [], 'remain_data': 'ed 85 8c ec 8a a4 ed 8a b8', }\n\n```\n\n\n# Reference\n\n- [Google protocol-buffers encoding document](https://developers.google.com/protocol-buffers/docs/encoding)","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdannyhann%2Fprotobuf_decoder","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdannyhann%2Fprotobuf_decoder","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdannyhann%2Fprotobuf_decoder/lists"}