{"id":44401963,"url":"https://github.com/minosiants/benc","last_synced_at":"2026-02-12T06:26:32.388Z","repository":{"id":57726696,"uuid":"256487041","full_name":"minosiants/benc","owner":"minosiants","description":"Bencoding library for scala","archived":false,"fork":false,"pushed_at":"2020-05-14T21:49:42.000Z","size":74,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2024-04-24T08:11:58.717Z","etag":null,"topics":["bencoding","bittorrent","cats","fp","scala","scodec","shapeless"],"latest_commit_sha":null,"homepage":null,"language":"Scala","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/minosiants.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.txt","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2020-04-17T11:42:16.000Z","updated_at":"2024-04-24T08:11:58.718Z","dependencies_parsed_at":"2022-09-26T21:50:58.261Z","dependency_job_id":null,"html_url":"https://github.com/minosiants/benc","commit_stats":null,"previous_names":[],"tags_count":10,"template":false,"template_full_name":null,"purl":"pkg:github/minosiants/benc","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/minosiants%2Fbenc","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/minosiants%2Fbenc/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/minosiants%2Fbenc/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/minosiants%2Fbenc/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/minosiants","download_url":"https://codeload.github.com/minosiants/benc/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/minosiants%2Fbenc/sbom","scorecard":{"id":648695,"data":{"date":"2025-08-11","repo":{"name":"github.com/minosiants/benc","commit":"12051b91847ea859e2d1d550b9cb88cfda9b5c84"},"scorecard":{"version":"v5.2.1-40-gf6ed084d","commit":"f6ed084d17c9236477efd66e5b258b9d4cc7b389"},"score":3.4,"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":"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":"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 0/18 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":"Token-Permissions","score":0,"reason":"detected GitHub workflow tokens with excessive permissions","details":["Warn: no topLevel permission defined: .github/workflows/build.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":"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/build.yml:12: update your workflow using https://app.stepsecurity.io/secureworkflow/minosiants/benc/build.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/build.yml:14: update your workflow using https://app.stepsecurity.io/secureworkflow/minosiants/benc/build.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/build.yml:21: update your workflow using https://app.stepsecurity.io/secureworkflow/minosiants/benc/build.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/build.yml:26: update your workflow using https://app.stepsecurity.io/secureworkflow/minosiants/benc/build.yml/master?enable=pin","Info:   0 out of   4 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.txt:0","Info: FSF or OSI recognized license: Apache License 2.0: LICENSE.txt: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 '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"}},{"name":"SAST","score":0,"reason":"SAST tool is not run on all commits -- score normalized to 0","details":["Warn: 0 commits out of 17 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-21T12:53:08.337Z","repository_id":57726696,"created_at":"2025-08-21T12:53:08.337Z","updated_at":"2025-08-21T12:53:08.337Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29360644,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-12T01:03:07.613Z","status":"online","status_checked_at":"2026-02-12T02:00:06.911Z","response_time":55,"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":["bencoding","bittorrent","cats","fp","scala","scodec","shapeless"],"created_at":"2026-02-12T06:26:31.528Z","updated_at":"2026-02-12T06:26:32.379Z","avatar_url":"https://github.com/minosiants.png","language":"Scala","funding_links":[],"categories":[],"sub_categories":[],"readme":"## Benc\n![build](https://github.com/minosiants/benc/workflows/build/badge.svg)  [![javadoc](https://javadoc.io/badge2/com.minosiants/benc_2.13/javadoc.svg)](https://javadoc.io/doc/com.minosiants/benc_2.13)   \nBencoding library for scala\n\n### Overview\n#### Bencoding\n[Specification](https://wiki.theory.org/index.php/BitTorrentSpecification#Bencoding)  \n`Bencoding` is a way to specify and organize data in a terse format. It supports the following types: byte strings, integers, lists, and dictionaries. \n\n`Bencoding` is used in .torrent files\n\n### Benc functionality  \n\n1. Encode case classes to bencoding  \n2. Decode bencoding to case classes\n\n### Usage\n\n```scala\nlibraryDependencies += \"com.minosiants\" %% \"benc\" % \u003cversion\u003e\n```\n\n\n### Example \n\n```scala\n  final case class Id(id: String)\n  final case class Author(name: String, age: Option[Int])\n  final case class Book(id: Id, author: Author, content: BitVector, pages: Long)\n  val book = Book(...)\n  //there are several ways to do conversion\n   \n  val bits:Either[Error, BitVector] = Benc.toBenc[Book](book)\n  val backToBook:Either[Error, Book] = bits.flatMap(b =\u003e Benc.fromBenc[Book](b))\n\n  //Using decoder adn encode directly\n  BEncoder[Book].encode(book).flatMap(bt =\u003e BDecoder[Book].decode(bt))  \n\n  //Using codec\n  val codec = BCodec[Book]  \n  codec.encode(book).flatMap(bt =\u003e codec.decode(bt))\n\n  //Setting different name\n  case class Pen(@BencKey(\"name\") brand:String)\n  \n```\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fminosiants%2Fbenc","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fminosiants%2Fbenc","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fminosiants%2Fbenc/lists"}