{"id":28396154,"url":"https://github.com/ssbc/ssb-msgs","last_synced_at":"2026-04-02T01:07:08.725Z","repository":{"id":23051113,"uuid":"26404288","full_name":"ssbc/ssb-msgs","owner":"ssbc","description":"message-processing for ssb","archived":false,"fork":false,"pushed_at":"2020-01-07T23:25:41.000Z","size":31,"stargazers_count":5,"open_issues_count":3,"forks_count":1,"subscribers_count":11,"default_branch":"master","last_synced_at":"2025-11-27T10:46:01.031Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","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/ssbc.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2014-11-09T18:11:55.000Z","updated_at":"2021-03-13T21:58:08.000Z","dependencies_parsed_at":"2022-08-21T18:30:47.456Z","dependency_job_id":null,"html_url":"https://github.com/ssbc/ssb-msgs","commit_stats":null,"previous_names":["pfraze/ssb-msgs"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/ssbc/ssb-msgs","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ssbc%2Fssb-msgs","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ssbc%2Fssb-msgs/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ssbc%2Fssb-msgs/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ssbc%2Fssb-msgs/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ssbc","download_url":"https://codeload.github.com/ssbc/ssb-msgs/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ssbc%2Fssb-msgs/sbom","scorecard":{"id":844501,"data":{"date":"2025-08-11","repo":{"name":"github.com/ssbc/ssb-msgs","commit":"d7e5857f5b2fe105a177b7a7aa66e23f9f25aafc"},"scorecard":{"version":"v5.2.1-40-gf6ed084d","commit":"f6ed084d17c9236477efd66e5b258b9d4cc7b389"},"score":2.6,"checks":[{"name":"Code-Review","score":0,"reason":"Found 2/23 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":"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":"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":"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":"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":"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":"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":"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":"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":"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":"SAST","score":0,"reason":"SAST tool is not run on all commits -- score normalized to 0","details":["Warn: 0 commits out of 13 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-23T21:08:33.573Z","repository_id":23051113,"created_at":"2025-08-23T21:08:33.573Z","updated_at":"2025-08-23T21:08:33.573Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":31293638,"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":[],"created_at":"2025-05-31T21:37:02.244Z","updated_at":"2026-04-02T01:07:08.701Z","avatar_url":"https://github.com/ssbc.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# SSB Messages\n\nMessage-processing tools for secure-scuttlebutt\n\n```js\nvar mlib = require('ssb-msgs')\n```\n\n### indexLinks\n\n```\nindexLinks(msg: Object, [opts: Options], each: Function(link: Object, rel: String))\nwhere Options = { rel: String, msg: Bool/String, feed: Bool/String, ext: Bool/String }\n```\n\nTraverses a message and runs the `each` function on all found links. All `opts` fields are optional. `Opts` may also be a string, in which case it is the rel attribute\n\n```js\n// assume %msgid and @feedid a well-formed\nvar msg = {\n  foo: { link: '%msgid' },\n  bar: [{ link: '@feedid' }]\n}\nfunction print (obj, rel) {\n  console.log(rel, obj.link)  \n}\nmlib.indexLinks(msg, print)\n// =\u003e foo %msgid\n// =\u003e bar @feedid\nmlib.indexLinks(msg, 'foo', print)\n// =\u003e foo %msgid\nmlib.indexLinks(msg, { rel: 'foo' }, print)\n// =\u003e foo %msgid\nmlib.indexLinks(msg, { feed: true }, print)\n// =\u003e bar @feedid\nmlib.indexLinks(msg, { feed: '@feedid' }, print)\n// =\u003e bar @feedid\n```\n\n### links (or asLinks)\n\n```\nlinks(obj: Any, [requiredAttr: String])\n```\n\nHelper to get links from a message in a regular array form.\n\n```js\nvar msg = {\n  foo: { link: '%msgid' },\n  bar: [{ link: '@feedid' }]\n}\nmlib.links(msg.foo) // =\u003e [{ link: '%msgid' }]\nmlib.links(msg.bar) // =\u003e [{ link: '@feedid' }]\nmlib.links(msg.bar, 'feed') // =\u003e [{ link: '@feedid' }]\nmlib.links(msg.bar, 'msg') // =\u003e []\nmlib.links(msg.baz) // =\u003e []\n```\n\n### link (or asLink)\n\n```\nlink(obj: Any, [requiredAttr: String])\n```\n\nHelper to get a link from a message in a regular object form. If an array is found, will use the first element.\n\n```js\nvar msg = {\n  foo: { link: '%msgid' },\n  bar: [{ link: '@feedid' }]\n}\nmlib.link(msg.foo) // =\u003e { link: '%msgid' }\nmlib.link(msg.bar) // =\u003e { link: '@feedid' }\nmlib.link(msg.bar, 'feed') // =\u003e { link: '@feedid' }\nmlib.link(msg.bar, 'msg') // =\u003e null\nmlib.link(msg.baz) // =\u003e null\n```\n\n### isLink\n\n```\nisLink(obj: Any, [requiredAttr: String])\n```\n\nPredicate to test whether an object is a well-formed link. Returns false if given an array.\n\n```js\nvar msg = {\n  foo: { link: '%msgid' },\n  bar: [{ link: '@feedid' }]\n}\nmlib.isLink(msg.foo) // =\u003e true\nmlib.isLink(msg.bar) // =\u003e true\nmlib.isLink(msg.bar, 'feed') // =\u003e true\nmlib.isLink(msg.bar, 'msg') // =\u003e false\nmlib.isLink(msg.baz) // =\u003e false\n```\n\n### linksTo\n\n```\nlinksTo(a: Message, b: Message)\n```\n\nGet link objects pointing from `a` to `b`.\n\n```js\nmlib.linksTo(msgA, msgB) // =\u003e [{ link: '%msgB-id' }]\n```\n\n### relationsTo\n\n```\nrelationsTo(a: Message, b: Message)\n```\n\nGet relations of links pointing from `a` to `b`.\n\n```js\nmlib.relationsTo(msgA, msgB) // =\u003e ['fooRelation']\n```","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fssbc%2Fssb-msgs","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fssbc%2Fssb-msgs","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fssbc%2Fssb-msgs/lists"}