{"id":22367604,"url":"https://github.com/hugojosefson/docker-git-inventory","last_synced_at":"2026-02-01T09:33:26.272Z","repository":{"id":38250315,"uuid":"270290210","full_name":"hugojosefson/docker-git-inventory","owner":"hugojosefson","description":"Extract Docker Stack's running services' versions, pushing named refs to git repos","archived":false,"fork":false,"pushed_at":"2024-10-05T11:13:41.000Z","size":294,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-07-01T09:45:54.218Z","etag":null,"topics":["deploy","docker","git","inventory","version"],"latest_commit_sha":null,"homepage":"","language":"JavaScript","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/hugojosefson.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,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2020-06-07T11:52:13.000Z","updated_at":"2024-10-05T11:09:18.000Z","dependencies_parsed_at":"2024-10-31T15:03:49.358Z","dependency_job_id":"7422e7a5-0d28-4c9b-b466-f60af0f0ce0c","html_url":"https://github.com/hugojosefson/docker-git-inventory","commit_stats":{"total_commits":42,"total_committers":1,"mean_commits":42.0,"dds":0.0,"last_synced_commit":"98188b09b8c46601b2edfcd7cdbef971a2d392be"},"previous_names":[],"tags_count":7,"template":false,"template_full_name":null,"purl":"pkg:github/hugojosefson/docker-git-inventory","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hugojosefson%2Fdocker-git-inventory","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hugojosefson%2Fdocker-git-inventory/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hugojosefson%2Fdocker-git-inventory/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hugojosefson%2Fdocker-git-inventory/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/hugojosefson","download_url":"https://codeload.github.com/hugojosefson/docker-git-inventory/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hugojosefson%2Fdocker-git-inventory/sbom","scorecard":{"id":472797,"data":{"date":"2025-08-11","repo":{"name":"github.com/hugojosefson/docker-git-inventory","commit":"98188b09b8c46601b2edfcd7cdbef971a2d392be"},"scorecard":{"version":"v5.2.1-40-gf6ed084d","commit":"f6ed084d17c9236477efd66e5b258b9d4cc7b389"},"score":1.7,"checks":[{"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":"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":"SAST","score":0,"reason":"no SAST tool detected","details":["Warn: no pull requests merged into dev branch"],"documentation":{"short":"Determines if the project uses static code analysis.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#sast"}},{"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":"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":"Code-Review","score":0,"reason":"Found 0/30 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":"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":"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: 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 '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":"Vulnerabilities","score":0,"reason":"13 existing vulnerabilities detected","details":["Warn: Project is vulnerable to: GHSA-968p-4wvh-cqc8","Warn: Project is vulnerable to: GHSA-whgm-jr23-g3j9","Warn: Project is vulnerable to: GHSA-v6h2-p8h4-qcjw","Warn: Project is vulnerable to: GHSA-grv7-fg5c-xmjg","Warn: Project is vulnerable to: GHSA-pxg6-pf52-xh8x","Warn: Project is vulnerable to: GHSA-3xgq-45jj-v275","Warn: Project is vulnerable to: GHSA-952p-6rrq-rcjv","Warn: Project is vulnerable to: GHSA-mwcw-c2x4-8c55","Warn: Project is vulnerable to: GHSA-3j8f-xvm3-ffx4","Warn: Project is vulnerable to: GHSA-j9fq-vwqv-2fm2","Warn: Project is vulnerable to: GHSA-pqw5-jmp5-px4v","Warn: Project is vulnerable to: GHSA-rhx6-c78j-4q9w","Warn: Project is vulnerable to: GHSA-g3ch-rx76-35fx"],"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-19T14:23:29.023Z","repository_id":38250315,"created_at":"2025-08-19T14:23:29.023Z","updated_at":"2025-08-19T14:23:29.023Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28975259,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-01T08:16:14.655Z","status":"ssl_error","status_checked_at":"2026-02-01T08:06:51.373Z","response_time":56,"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":["deploy","docker","git","inventory","version"],"created_at":"2024-12-04T18:19:21.867Z","updated_at":"2026-02-01T09:33:26.257Z","avatar_url":"https://github.com/hugojosefson.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# docker-inventory-git\n\n[![Build Status](https://travis-ci.org/hugojosefson/docker-git-inventory.svg?branch=master)](https://travis-ci.org/hugojosefson/docker-git-inventory)\n[![npm page](https://img.shields.io/npm/v/@hugojosefson/docker-git-inventory.svg)](https://npmjs.com/package/@hugojosefson/docker-git-inventory)\n[![License MIT](https://img.shields.io/npm/l/@hugojosefson/docker-git-inventory.svg)](https://tldrlegal.com/license/mit-license)\n[![SemVer 2.0.0](https://img.shields.io/badge/SemVer-2.0.0-lightgrey.svg)](https://semver.org/spec/v2.0.0.html)\n[![JavaScript Style Guide](https://img.shields.io/badge/code_style-standard-brightgreen.svg)](https://standardjs.com)\n\n## Introduction\n\nThis is a library and a service for extracting information from a Docker Swarm\nabout currently running services, and pushing custom named refs to git repos.\nThat means you can see the deployment status from your Docker Swarm, in your\ndevelopment git tools.\n\n## Prerequisite\n\nNode.js, `v13.7.0` or higher, ideally at least `v14.0.0`.\n\nRecommended to install latest via [nvm](https://github.com/nvm-sh/nvm#readme):\n\n```bash\nnvm install stable\n```\n\n## Usage\n\n### Get an inventory\n\n```bash\nnpx --package @hugojosefson/docker-git-inventory docker-git-inventory\n```\n\n### Start an HTTP API server\n\n```bash\nPORT=3000 \\\nnpx --package @hugojosefson/docker-git-inventory docker-git-inventory-server\n```\n\n### Push refs to git\n\nThe `docker-git-inventory-push-refs` command takes an inventory on `stdin` as\n[JSON lines](http://jsonlines.org/).\n\n```bash\ncurl -s localhost:3000/inventory | \\\n  USERNAME=mygitusername \\\n  PASSWORD=mygitpassword \\\n  npx --package @hugojosefson/docker-git-inventory \\\n    docker-git-inventory-push-refs\n```\n\n## Programmatic access\n\nYou can also `import` the module, and use its exported functions\nprogrammatically.\n\n### API\n\n\u003c!-- Generated by documentation.js. Update this documentation by updating the source code. --\u003e\n\n#### inventoryHandlers\n\n#### pushRefsHandlers\n\n#### defaultRemoteRef\n\nReasonable calculation of remoteRef, based on milieu, serviceName and git url.\n\n##### Parameters\n\n- `prefix`\n  **[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)**\n  prefix for the remoteRef (optional, default `'refs/deployed/'`)\n\nReturns **(function ({milieu, serviceName, url}):\n[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)\n|\n[undefined](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/undefined))**\nfunction for calculating a reasonable remoteRef\n\n#### defaultServiceToPush\n\nReasonable conversion from service (via inventory), to arguments to pushRef.\n\n##### Parameters\n\n- `defaultArgs` **{username:\n  ([string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)\n  |\n  [undefined](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/undefined)),\n  password:\n  ([string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)\n  |\n  [undefined](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/undefined)),\n  url:\n  ([string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)\n  |\n  [undefined](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/undefined)),\n  ref:\n  ([string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)\n  |\n  [undefined](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/undefined)),\n  remoteRef:\n  ([string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)\n  |\n  [undefined](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/undefined))}**\n  for example {username, password} (optional, default `{}`)\n\nReturns **function ({serviceName:\n[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String),\nlabels: {GIT_URL:\n([string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)\n|\n[undefined](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/undefined)),\nGIT_COMMIT:\n([string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)\n|\n[undefined](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/undefined)),\nmilieu:\n([string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)\n|\n[undefined](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/undefined))}}?):\n{ref:\n([string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)\n|\n[undefined](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/undefined)),\nurl:\n([string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)\n|\n[undefined](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/undefined)),\nremoteRef:\n([string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)\n|\n[undefined](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/undefined))}**\n\n#### inventory\n\nTakes an inventory of currently running Docker stacks.\n\nReturns **Highland.Stream\u003c{stack:\n[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String),\ntaskId:\n[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String),\nimage:\n[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String),\nserviceId:\n[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String),\nserviceNameLong:\n[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String),\nserviceName:\n[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String),\nlabels:\n[object](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object)}\u003e**\nA Highland stream of objects, each describing one service.\n\n#### inventoryToPushes\n\nConverts a Highland stream of inventory objects, into a stream of argument\nobjects for pushRef.\n\n##### Parameters\n\n- `serviceToPush` **(function ({stack, taskId, image, serviceId, serviceName,\n  serviceNameLong, labels}): Highland.Stream\u003c{username, password, url, ref,\n  remoteRef}\u003e |\n  [Promise](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise)\u003c{username,\n  password, url, ref, remoteRef}\u003e |\n  [Array](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Array)\u003c{username,\n  password, url, ref, remoteRef}\u003e | {username, password, url, ref, remoteRef})**\n\nReturns **function (Highland.Stream\u003c{stack, taskId, image, serviceId,\nserviceName, serviceNameLong, labels}\u003e): Highland.Stream\u003c{username, password,\nurl, ref, remoteRef}\u003e**\n\n#### app\n\nHTTP API for working with `docker-inventory-git`.\n\n##### Parameters\n\n- `options`\n  **[object](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object)**\n  (optional, default `{}`)\n\n  - `options.app` **(Express | Application | IRouter)** Express.js Application\n    instance or Router on which to apply paths. (optional, default `express()`)\n\nReturns **(Express | Application | IRouter)** app, mutated.\n\n#### pushRef\n\nPushes a git commit to its repo, with a specific remoteRef.\n\n##### Parameters\n\n- `options`\n  **[object](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object)**\n\n  - `options.username`\n    **[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)**\n    username for git authentication\n  - `options.password`\n    **[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)**\n    password for authentication\n  - `options.url`\n    **[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)**\n    git repo url\n  - `options.ref`\n    **[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)**\n    the commit to push\n  - `options.remoteRef`\n    **[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)**\n    name of the remote ref, for example refs/deployed/stage\n\nReturns\n**[Promise](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise)\\\u003cvoid\u003e**\nresolves when done\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhugojosefson%2Fdocker-git-inventory","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fhugojosefson%2Fdocker-git-inventory","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhugojosefson%2Fdocker-git-inventory/lists"}