{"id":13564257,"url":"https://github.com/nuts-foundation/go-did","last_synced_at":"2026-02-07T20:34:24.771Z","repository":{"id":37396225,"uuid":"327203653","full_name":"nuts-foundation/go-did","owner":"nuts-foundation","description":"Golang library for parsing Decentralized Identifiers (DIDs)","archived":false,"fork":false,"pushed_at":"2025-05-04T06:53:37.000Z","size":313,"stargazers_count":34,"open_issues_count":8,"forks_count":10,"subscribers_count":5,"default_branch":"master","last_synced_at":"2025-05-04T07:29:49.392Z","etag":null,"topics":["decentralized-identifiers","verifiable-credentials","w3c-did"],"latest_commit_sha":null,"homepage":"","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/nuts-foundation.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"COPYING","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}},"created_at":"2021-01-06T04:54:18.000Z","updated_at":"2025-05-04T06:53:38.000Z","dependencies_parsed_at":"2023-09-29T06:59:09.471Z","dependency_job_id":"9c6120a8-399d-4d56-bd5e-be975c1bf7cb","html_url":"https://github.com/nuts-foundation/go-did","commit_stats":null,"previous_names":["nuts-foundation/golang-didparser"],"tags_count":26,"template":false,"template_full_name":null,"purl":"pkg:github/nuts-foundation/go-did","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nuts-foundation%2Fgo-did","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nuts-foundation%2Fgo-did/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nuts-foundation%2Fgo-did/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nuts-foundation%2Fgo-did/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/nuts-foundation","download_url":"https://codeload.github.com/nuts-foundation/go-did/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nuts-foundation%2Fgo-did/sbom","scorecard":{"id":698966,"data":{"date":"2025-08-11","repo":{"name":"github.com/nuts-foundation/go-did","commit":"9ec9e5c27e97b8a4e70bbbb8f55ae7bc21ab7b7e"},"scorecard":{"version":"v5.2.1-40-gf6ed084d","commit":"f6ed084d17c9236477efd66e5b258b9d4cc7b389"},"score":4.8,"checks":[{"name":"Token-Permissions","score":0,"reason":"detected GitHub workflow tokens with excessive permissions","details":["Warn: no topLevel permission defined: .github/workflows/go-test.yaml: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":"Code-Review","score":10,"reason":"all changesets reviewed","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":"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":"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/go-test.yaml:22: update your workflow using https://app.stepsecurity.io/secureworkflow/nuts-foundation/go-did/go-test.yaml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/go-test.yaml:24: update your workflow using https://app.stepsecurity.io/secureworkflow/nuts-foundation/go-did/go-test.yaml/master?enable=pin","Info:   0 out of   2 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":"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":"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":"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":"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: COPYING:0","Info: FSF or OSI recognized license: GNU General Public License v3.0: COPYING: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":-1,"reason":"internal error: error during branchesHandler.setup: internal error: githubv4.Query: Resource not accessible by integration","details":null,"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":"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":"SAST","score":0,"reason":"SAST tool is not run on all commits -- score normalized to 0","details":["Warn: 0 commits out of 30 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-22T04:38:19.329Z","repository_id":37396225,"created_at":"2025-08-22T04:38:19.329Z","updated_at":"2025-08-22T04:38:19.329Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29208161,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-07T20:33:12.493Z","status":"ssl_error","status_checked_at":"2026-02-07T20:30:47.381Z","response_time":63,"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":["decentralized-identifiers","verifiable-credentials","w3c-did"],"created_at":"2024-08-01T13:01:28.734Z","updated_at":"2026-02-07T20:34:24.744Z","avatar_url":"https://github.com/nuts-foundation.png","language":"Go","funding_links":[],"categories":["Go"],"sub_categories":[],"readme":"\n# github.com/nuts-foundation/go-did\n[![Go Reference](https://pkg.go.dev/badge/github.com/nuts-foundation/go-did.svg)](https://pkg.go.dev/github.com/nuts-foundation/go-did)\n[![Maintainability](https://api.codeclimate.com/v1/badges/4b4c812605d5c4f5ba3f/maintainability)](https://codeclimate.com/github/nuts-foundation/go-did/maintainability)\n[![Test Coverage](https://api.codeclimate.com/v1/badges/4b4c812605d5c4f5ba3f/test_coverage)](https://codeclimate.com/github/nuts-foundation/go-did/test_coverage)\n\nA library to parse and generate W3C [DID Documents](https://www.w3.org/TR/did-core/) and W3C [Verifiable Credentials](https://www.w3.org/TR/vc-data-model/).\n\n## Example usage\nNote on parsing: in earlier versions, DID documents, credentials and presentations were parsed using `UnmarshalJSON`.\nNow, `ParseDocument()`, `ParseVerifiableCredential()` and `ParseVerifiablePresentation()` should be used instead: they better support VCs and VPs in JWT format.\n\n### Parsing a DID document\n```go\ndidDoc, err := did.ParseDocument(didDocJson)\nif err != nil {\n    panic(err)\n}\n// do something with didDoc\n````\n\n### Creating a DID document\nCreation of a simple DID Document which is its own controller and contains an AssertionMethod.\n```go\ndidID, err := did.ParseDID(\"did:example:123\")\n\n// Empty did document:\ndoc := \u0026did.Document{\n    Context:            []did.URI{did.DIDContextV1URI()},\n    ID:                 *didID,\n}\n\n// Add an assertionMethod\nkeyID, _ := did.ParseDIDURL(\"did:example:123#key-1\")\n\nkeyPair, err := ecdsa.GenerateKey(elliptic.P256(), rand.Reader)\nverificationMethod, err := did.NewVerificationMethod(*keyID, did.JsonWebKey2020, did.DID{}, keyPair.Public())\n\n// This adds the method to the VerificationMethod list and stores a reference to the assertion list\ndoc.AddAssertionMethod(verificationMethod)\n\ndidJson, _ := json.MarshalIndent(doc, \"\", \"  \")\nfmt.Println(string(didJson))\n```\n\nOutputs:\n```json\n{\n  \"assertionMethod\": [\n    \"did:example:123#key-1\"\n  ],\n  \"@context\": \"https://www.w3.org/ns/did/v1\",\n  \"controller\": \"did:example:123\",\n  \"id\": \"did:example:123\",\n  \"verificationMethod\": [\n    {\n      \"controller\": \"did:example:123\",\n      \"id\": \"did:example:123#key-1\",\n      \"publicKeyJwk\": {\n        \"crv\": \"P-256\",\n        \"kty\": \"EC\",\n        \"x\": \"UANQ8pgvJT33JbrnwMiu1L1JCGQFOEm1ThaNAJcFrWA=\",\n        \"y\": \"UWm6q5n1iXyeCJLMGDInN40bkkKr8KkoTWDqJBZQXRo=\"\n      },\n      \"type\": \"JsonWebKey2020\"\n    }\n  ]\n}\n```\n\n### Parsing Verifiable Credentials and Verifiable Presentations\nThe library supports parsing of Verifiable Credentials and Verifiable Presentations in JSON-LD, and JWT proof format.\nUse `ParseVerifiableCredential(raw string)` and `ParseVerifiablePresentation(raw string)`.\n\n## Supported key types\n\n- `JsonWebKey2020`\n- `Ed25519VerificationKey2018`\n- `EcdsaSecp256k1VerificationKey2019` (pass build tag to enable: `-tags=jwx_es256k`)\n\n## Installation\n```\ngo get github.com/nuts-foundation/go-did\n```\n\n## Testing\n\n```shell\ngo test ./... -tags=jwx_es256k\n```\n\n## State of the library\nWe keep the API stable, breaking changes will only be introduced in new major versions.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnuts-foundation%2Fgo-did","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fnuts-foundation%2Fgo-did","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnuts-foundation%2Fgo-did/lists"}