{"id":42909034,"url":"https://github.com/ministero-salute/dcc-utils","last_synced_at":"2026-01-30T16:54:38.369Z","repository":{"id":37957581,"uuid":"389664212","full_name":"ministero-salute/dcc-utils","owner":"ministero-salute","description":"Set of utilities to read EU Digital COVID Certificates, verify signatures and rules.","archived":false,"fork":false,"pushed_at":"2022-06-13T17:00:54.000Z","size":803,"stargazers_count":65,"open_issues_count":1,"forks_count":17,"subscribers_count":15,"default_branch":"master","last_synced_at":"2025-09-07T04:52:22.761Z","etag":null,"topics":["covid-19","digital-covid-certificate","greenpass","nodejs","utility-library"],"latest_commit_sha":null,"homepage":"","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"agpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/ministero-salute.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":"CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":"CODEOWNERS","security":null,"support":null}},"created_at":"2021-07-26T14:36:26.000Z","updated_at":"2025-08-25T16:59:55.000Z","dependencies_parsed_at":"2022-09-10T22:50:50.781Z","dependency_job_id":null,"html_url":"https://github.com/ministero-salute/dcc-utils","commit_stats":null,"previous_names":[],"tags_count":7,"template":false,"template_full_name":"ministero-salute/it-dgc-repository-template","purl":"pkg:github/ministero-salute/dcc-utils","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ministero-salute%2Fdcc-utils","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ministero-salute%2Fdcc-utils/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ministero-salute%2Fdcc-utils/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ministero-salute%2Fdcc-utils/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ministero-salute","download_url":"https://codeload.github.com/ministero-salute/dcc-utils/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ministero-salute%2Fdcc-utils/sbom","scorecard":{"id":648480,"data":{"date":"2025-08-11","repo":{"name":"github.com/ministero-salute/dcc-utils","commit":"f87127091cc406bdfca203c1bc09128ff969e359"},"scorecard":{"version":"v5.2.1-40-gf6ed084d","commit":"f6ed084d17c9236477efd66e5b258b9d4cc7b389"},"score":2.7,"checks":[{"name":"Code-Review","score":2,"reason":"Found 4/19 approved changesets -- score normalized to 2","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":"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":"Token-Permissions","score":0,"reason":"detected GitHub workflow tokens with excessive permissions","details":["Warn: no topLevel permission defined: .github/workflows/ci.yml:1","Warn: no topLevel permission defined: .github/workflows/pc-update.yml:1","Warn: no topLevel permission defined: .github/workflows/publish.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":"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":"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/ci.yml:16: update your workflow using https://app.stepsecurity.io/secureworkflow/ministero-salute/dcc-utils/ci.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/ci.yml:18: update your workflow using https://app.stepsecurity.io/secureworkflow/ministero-salute/dcc-utils/ci.yml/master?enable=pin","Warn: third-party GitHubAction not pinned by hash: .github/workflows/ci.yml:25: update your workflow using https://app.stepsecurity.io/secureworkflow/ministero-salute/dcc-utils/ci.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/pc-update.yml:14: update your workflow using https://app.stepsecurity.io/secureworkflow/ministero-salute/dcc-utils/pc-update.yml/master?enable=pin","Warn: third-party GitHubAction not pinned by hash: .github/workflows/pc-update.yml:18: update your workflow using https://app.stepsecurity.io/secureworkflow/ministero-salute/dcc-utils/pc-update.yml/master?enable=pin","Warn: third-party GitHubAction not pinned by hash: .github/workflows/pc-update.yml:21: update your workflow using https://app.stepsecurity.io/secureworkflow/ministero-salute/dcc-utils/pc-update.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/publish.yml:11: update your workflow using https://app.stepsecurity.io/secureworkflow/ministero-salute/dcc-utils/publish.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/publish.yml:13: update your workflow using https://app.stepsecurity.io/secureworkflow/ministero-salute/dcc-utils/publish.yml/master?enable=pin","Warn: npmCommand not pinned by hash: .github/workflows/ci.yml:22","Warn: npmCommand not pinned by hash: .github/workflows/publish.yml:19","Info:   0 out of   5 GitHub-owned GitHubAction dependencies pinned","Info:   0 out of   3 third-party GitHubAction dependencies pinned","Info:   0 out of   2 npmCommand 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":"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: GNU Affero General Public License v3.0: 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":"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":"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 16 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":"24 existing vulnerabilities detected","details":["Warn: Project is vulnerable to: GHSA-968p-4wvh-cqc8","Warn: Project is vulnerable to: GHSA-67hx-6x53-jw92","Warn: Project is vulnerable to: GHSA-v6h2-p8h4-qcjw","Warn: Project is vulnerable to: GHSA-grv7-fg5c-xmjg","Warn: Project is vulnerable to: GHSA-3xgq-45jj-v275","Warn: Project is vulnerable to: GHSA-434g-2637-qmqr","Warn: Project is vulnerable to: GHSA-49q7-c7j4-3p7m","Warn: Project is vulnerable to: GHSA-977x-g7h5-7qgw","Warn: Project is vulnerable to: GHSA-f7q4-pwc6-w24p","Warn: Project is vulnerable to: GHSA-fc9h-whq2-v747","Warn: Project is vulnerable to: GHSA-vjh7-7g9h-fjfh","Warn: Project is vulnerable to: GHSA-fjxv-7rqg-78g4","Warn: Project is vulnerable to: GHSA-xvf7-4v9q-58w6","Warn: Project is vulnerable to: GHSA-9c47-m6qq-7p4h","Warn: Project is vulnerable to: GHSA-3fvg-4v2m-98jf","Warn: Project is vulnerable to: GHSA-rh63-9qcf-83gf","Warn: Project is vulnerable to: GHSA-952p-6rrq-rcjv","Warn: Project is vulnerable to: GHSA-f8q6-p94x-37v3","Warn: Project is vulnerable to: GHSA-x565-32qp-m3vf","Warn: Project is vulnerable to: GHSA-c2qf-rxjj-qqgw","Warn: Project is vulnerable to: GHSA-72xf-g2v4-qvf3","Warn: Project is vulnerable to: GHSA-j8xg-fqg3-53r7","Warn: Project is vulnerable to: GHSA-3h5v-q93c-6h6q","Warn: Project is vulnerable to: GHSA-776f-qx25-q3cc"],"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-21T12:49:52.803Z","repository_id":37957581,"created_at":"2025-08-21T12:49:52.803Z","updated_at":"2025-08-21T12:49:52.803Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28915940,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-30T16:37:38.804Z","status":"ssl_error","status_checked_at":"2026-01-30T16:37:37.878Z","response_time":66,"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":["covid-19","digital-covid-certificate","greenpass","nodejs","utility-library"],"created_at":"2026-01-30T16:54:37.591Z","updated_at":"2026-01-30T16:54:38.343Z","avatar_url":"https://github.com/ministero-salute.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003ch1 align=\"center\"\u003eDCC Utils\u003c/h1\u003e\n\n\u003cdiv align=\"center\"\u003e\n\u003cimg width=\"256\" height=\"256\" src=\".public/logo-dgc.png\"\u003e\n\u003c/div\u003e\n\n\u003cbr /\u003e\n\u003cdiv align=\"center\"\u003e\n    \u003c!-- CoC --\u003e\n    \u003ca href=\"https://github.com/ministero-salute/dcc-utils/blob/master/CODE_OF_CONDUCT.md\"\u003e\n      \u003cimg src=\"https://img.shields.io/badge/Contributor%20Covenant-v2.0%20adopted-ff69b4.svg\" /\u003e\n    \u003c/a\u003e\n    \u003ca href=\"https://www.npmjs.com/package/dcc-utils\"\u003e\n      \u003cimg src=\"https://img.shields.io/npm/v/dcc-utils.svg?logo=npm\" /\u003e\n    \u003c/a\u003e\n    \u003ca href=\"https://github.com/ministero-salute/dcc-utils/actions/workflows/ci.yml\"\u003e\n      \u003cimg src=\"https://github.com/ministero-salute/dcc-utils/actions/workflows/ci.yml/badge.svg\" /\u003e\n    \u003c/a\u003e\n    \u003ca href=\"https://codecov.io/gh/ministero-salute/dcc-utils\"\u003e\n      \u003cimg src=\"https://img.shields.io/codecov/c/github/ministero-salute/dcc-utils.svg\" /\u003e\n    \u003c/a\u003e\n\u003c/div\u003e\n\n\n# Table of contents\n\n- [Context](https://github.com/ministero-salute/dcc-utils#context)\n- [Installation](https://github.com/ministero-salute/dcc-utils#installation)\n- [Contributing](https://github.com/ministero-salute/dcc-utils#contributing)\n  - [Contributors](https://github.com/ministero-salute/dcc-utils#contributors)\n- [Licence](https://github.com/ministero-salute/dcc-utils#licence)\n  - [Authors / Copyright](https://github.com/ministero-salute/dcc-utils#authors--copyright)\n  - [Third-party component licences](https://github.com/ministero-salute/dcc-utils#third-party-component-licences)\n  - [Licence details](https://github.com/ministero-salute/dcc-utils#licence-details)\n\n\n# Context\n\nThis NPM package contains a set of utilities to read EU Digital COVID Certificates, verify signatures and rules.\n\n# Installation\n\n```\nnpm install dcc-utils\n```\n\n# Usage\n\nGet a DCC from an image\n\n```js\nconst { DCC } = require('dcc-utils');\n\nconst dcc = await DCC.fromImage('/data/QRCodeDCC.png');\n```\n\nor raw data\n\n```js\nconst dcc = await DCC.fromRaw('HC1:6BF+70790T9WJWG.FKY*4GO0.O1CV2 O5 N2FBBRW1*70HS8WY04AC*WIFN0AHCD8KD97TK0F90KECTHGWJC0FDC:5AIA%G7X+AQB9746HS80:54IBQF60R6$A80X6S1BTYACG6M+9XG8KIAWNA91AY%67092L4WJCT3EHS8XJC$+DXJCCWENF6OF63W5NW6WF6%JC QE/IAYJC5LEW34U3ET7DXC9 QE-ED8%E.JCBECB1A-:8$96646AL60A60S6Q$D.UDRYA 96NF6L/5QW6307KQEPD09WEQDD+Q6TW6FA7C466KCN9E%961A6DL6FA7D46JPCT3E5JDLA7$Q6E464W5TG6..DX%DZJC6/DTZ9 QE5$CB$DA/D JC1/D3Z8WED1ECW.CCWE.Y92OAGY8MY9L+9MPCG/D5 C5IA5N9$PC5$CUZCY$5Y$527B+A4KZNQG5TKOWWD9FL%I8U$F7O2IBM85CWOC%LEZU4R/BXHDAHN 11$CA5MRI:AONFN7091K9FKIGIY%VWSSSU9%01FO2*FTPQ3C3F');\n```\n\nSee [get_dcc_from_raw_and_image.js](https://github.com/ministero-salute/dcc-utils/blob/master/examples/get_dcc_from_raw_and_image.js) example.\n\nWith dcc-utils you can also verify its signature\n\n```js\nconst verified = await dcc.checkSignatureWithCertificate(myCert);\nif (verified) {\n  console.log(dcc.payload);\n}\n```\n\nIf you need to use different types of key, use `checkSignature` method (see [verify_signature_raw.js example](https://github.com/ministero-salute/dcc-utils/blob/master/examples/verify_signature_raw.js)).\n\nSee [verify_signature.js](https://github.com/ministero-salute/dcc-utils/blob/master/examples/verify_signature.js)and [verify_signature_from_list.js](https://github.com/ministero-salute/dcc-utils/blob/master/examples/verify_signature_from_list.js) examples. Signature verification uses CoseJS library under the hood, see [CoseJS documentation](https://github.com/erdtman/cose-js) for more details.\n\nTo load te cerficates from `https://get.dgc.gov.it` you can use [fetch_certificates.js](https://github.com/ministero-salute/dcc-utils/blob/master/examples/fetch_certificates.js) The exported format is compatible with the method `dcc.checkSignatureWithKeysList`\n\nWith dcc-utils you can evaluate [business rules](https://github.com/ehn-dcc-development/dgc-business-rules) against a DCC\n\n```js\nconst { DCC, Rule } = require('dcc-utils');\n\nconst dcc = await DCC.fromImage('/data/QRCodeDCC.png');\nconst rule = Rule.fromFile('de_v0001_rule.json', {\n  validationClock: new Date().toISOString(),\n});\n\nrule.evaluateDCC(dcc)\n```\n\nYou can also get rules from API\n\n```js\nconst { DCC, Rule } = require('dcc-utils');\n\nconst dcc = await DCC.fromImage('/data/QRCodeDCC.png');\nconst VR_DE_0001_RULE_URL = \"https://dgca-businessrule-service.cfapps.eu10.hana.ondemand.com/rules/de/bc092f8000606c57a8fd80bc7a31ff720a4c4428510d88c774bed2f839c76b66\";\nconst response = await fetch(VR_DE_0001_RULE_URL);\nconst ruleJSON = await response.json();\nconst rule = Rule.fromJSON(ruleJSON, {\n  validationClock: new Date().toISOString(),\n});\n\nrule.evaluateDCC(dcc)\n```\n\nSee [check_rules.js](https://github.com/ministero-salute/dcc-utils/blob/master/examples/check_rules.js) and [check_rules_from_api.js](https://github.com/ministero-salute/dcc-utils/blob/master/examples/check_rules_from_api.js) examples.\n\n# Contributing\nContributions are most welcome. Before proceeding, please read the [Code of Conduct](https://github.com/ministero-salute/dcc-utils/blob/master/CODE_OF_CONDUCT.md) for guidance on how to approach the community and create a positive environment. Additionally, please read our [CONTRIBUTING](https://github.com/ministero-salute/dcc-utils/blob/master/CONTRIBUTING.md) file, which contains guidance on ensuring a smooth contribution process.\n\n## Contributors\nHere is a list of contributors. Thank you to everyone involved for improving this project, day by day.\n\n\u003ca href=\"https://github.com/ministero-salute/dcc-utils\"\u003e\n  \u003cimg\n  src=\"https://contributors-img.web.app/image?repo=ministero-salute/dcc-utils\"\n  /\u003e\n\u003c/a\u003e\n\n# Licence\n\n## Authors / Copyright\n\nCopyright 2021 (c) Ministero della Salute.\n\nPlease check the [AUTHORS](https://github.com/ministero-salute/dcc-utils/blob/master/AUTHORS) file for extended reference.\n\n## Licence details\n\nThe licence for this repository is a [GNU Affero General Public Licence version 3](https://www.gnu.org/licenses/agpl-3.0.html) (SPDX: AGPL-3.0). Please see the [LICENSE](https://github.com/ministero-salute/dcc-utils/blob/master/LICENSE) file for full reference.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fministero-salute%2Fdcc-utils","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fministero-salute%2Fdcc-utils","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fministero-salute%2Fdcc-utils/lists"}