{"id":46314818,"url":"https://github.com/tvdstaaij/node-git-describe","last_synced_at":"2026-03-04T14:01:08.485Z","repository":{"id":2583811,"uuid":"42310854","full_name":"tvdstaaij/node-git-describe","owner":"tvdstaaij","description":"Git describe information at runtime, with semver support","archived":false,"fork":false,"pushed_at":"2024-06-17T02:53:36.000Z","size":540,"stargazers_count":36,"open_issues_count":8,"forks_count":5,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-10-02T17:56:49.277Z","etag":null,"topics":["git","hacktoberfest","nodejs"],"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/tvdstaaij.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":"CONTRIBUTING.md","funding":null,"license":null,"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":"2015-09-11T13:43:57.000Z","updated_at":"2024-08-28T16:18:53.000Z","dependencies_parsed_at":"2023-01-13T11:57:33.406Z","dependency_job_id":"ed144ec3-3948-42a9-981b-16d8f9f84411","html_url":"https://github.com/tvdstaaij/node-git-describe","commit_stats":{"total_commits":66,"total_committers":7,"mean_commits":9.428571428571429,"dds":"0.36363636363636365","last_synced_commit":"a3d1a268b075ed37af6bae0e7f904bccbc6ce0a0"},"previous_names":[],"tags_count":15,"template":false,"template_full_name":null,"purl":"pkg:github/tvdstaaij/node-git-describe","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tvdstaaij%2Fnode-git-describe","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tvdstaaij%2Fnode-git-describe/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tvdstaaij%2Fnode-git-describe/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tvdstaaij%2Fnode-git-describe/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/tvdstaaij","download_url":"https://codeload.github.com/tvdstaaij/node-git-describe/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tvdstaaij%2Fnode-git-describe/sbom","scorecard":{"id":903308,"data":{"date":"2025-08-11","repo":{"name":"github.com/tvdstaaij/node-git-describe","commit":"3076d137a7ddd747aef7445c1019ab6e2a293d32"},"scorecard":{"version":"v5.2.1-40-gf6ed084d","commit":"f6ed084d17c9236477efd66e5b258b9d4cc7b389"},"score":3.1,"checks":[{"name":"Code-Review","score":5,"reason":"Found 4/7 approved changesets -- score normalized to 5","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":"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":"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":"Pinned-Dependencies","score":3,"reason":"dependency not pinned by hash detected -- score normalized to 3","details":["Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/test.yml:18: update your workflow using https://app.stepsecurity.io/secureworkflow/tvdstaaij/node-git-describe/test.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/test.yml:22: update your workflow using https://app.stepsecurity.io/secureworkflow/tvdstaaij/node-git-describe/test.yml/master?enable=pin","Info:   0 out of   2 GitHub-owned GitHubAction dependencies pinned","Info:   1 out of   1 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":"Token-Permissions","score":0,"reason":"detected GitHub workflow tokens with excessive permissions","details":["Warn: no topLevel permission defined: .github/workflows/test.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":"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":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":"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":"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":"SAST","score":0,"reason":"SAST tool is not run on all commits -- score normalized to 0","details":["Warn: 0 commits out of 28 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":3,"reason":"7 existing vulnerabilities detected","details":["Warn: Project is vulnerable to: GHSA-v6h2-p8h4-qcjw","Warn: Project is vulnerable to: GHSA-grv7-fg5c-xmjg","Warn: Project is vulnerable to: GHSA-4q6p-r6v2-jvc5","Warn: Project is vulnerable to: GHSA-f8q6-p94x-37v3","Warn: Project is vulnerable to: GHSA-mwcw-c2x4-8c55","Warn: Project is vulnerable to: GHSA-c2qf-rxjj-qqgw","Warn: Project is vulnerable to: GHSA-76p7-773f-r4q5"],"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-24T16:27:37.396Z","repository_id":2583811,"created_at":"2025-08-24T16:27:37.396Z","updated_at":"2025-08-24T16:27:37.396Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29891388,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-27T09:48:51.284Z","status":"ssl_error","status_checked_at":"2026-02-27T09:48:43.992Z","response_time":57,"last_error":"SSL_read: 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":["git","hacktoberfest","nodejs"],"created_at":"2026-03-04T14:01:07.331Z","updated_at":"2026-03-04T14:01:08.355Z","avatar_url":"https://github.com/tvdstaaij.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# git-describe\n\n[![npm version](https://img.shields.io/npm/v/git-describe.svg)](https://www.npmjs.com/package/git-describe)\n[![npm license](https://img.shields.io/npm/l/git-describe.svg)](https://www.npmjs.com/package/git-describe)\n[![travis build](https://travis-ci.org/tvdstaaij/node-git-describe.svg?branch=master)](https://travis-ci.org/tvdstaaij/node-git-describe)\n[![vulnerabilities](https://snyk.io/test/npm/git-describe/badge.svg)](https://snyk.io/test/npm/git-describe)\n\nThis Node.js module runs [`git describe`][1] on the working directory or any\nother directory and parses the output to individual components. Additionally,\nif your tags follow [semantic versioning][2] the semver will be parsed and\nsupplemented with the git-specific information as build metadata.\n\n## Installation\n\nAvailable from npm:\n`npm install git-describe`\n\nTests are not included in the npm package — \nclone the git repository to run tests (Node.js 4+ required).\n\nAs of version 4.0.0, `semver` is an optional dependency that does not have to \nbe installed if you do not require semver functionality.\n\nNote that the `git` executable must be in the system's executable path for this module to function.\n\n## Usage\n\nThe module exposes two functions: \n\n* `gitDescribe(directory, options, cb) -\u003e Promise`\n* `gitDescribeSync(directory, options) -\u003e Object`\n\nThe only difference is that `gitDescribe` has an asynchronous API \n(either the callback argument or the returned promise can be used), whilst \n`gitDescribeSync` is fully synchronous \n(blocks until the git executable returns and throws an `Error` on failure).\n\nBoth functions can take a `directory` string (defaults to working directory)\nand an `options` object. Either or both arguments can be omitted.\n\n```javascript\nconst {gitDescribe, gitDescribeSync} = require('git-describe');\n\n// Target working directory\nconst gitInfo = gitDescribeSync();\n\n// Target the directory of the calling script\n// Recommended when you want to target the repo your app resides in\nconst gitInfo = gitDescribeSync(__dirname);\n\n// With options (see below)\nconst gitInfo = gitDescribeSync(__dirname, {\n    longSemver: true,\n    dirtySemver: false\n});\n\n// Another example: working directory, use 16 character commit hash abbreviation\nconst gitInfo = gitDescribeSync({\n    customArguments: ['--abbrev=16']\n});\n\n// Asynchronous with promise\ngitDescribe(__dirname)\n    .then((gitInfo) =\u003e console.dir(gitInfo))\n    .catch((err) =\u003e console.error(err));\n\n// Asynchronous with node-style callback\ngitDescribe(__dirname, (err, gitInfo) =\u003e {\n    if (err)\n        return console.error(err);\n    console.dir(gitInfo);\n});\n```\n\n## Example output\n\n```javascript\n{ \n    dirty: false,\n    hash: 'g3c9c15b',\n    distance: 6,\n    tag: 'v2.1.0-beta',\n    semver: SemVer, // SemVer instance, see https://github.com/npm/node-semver\n    suffix: '6-g3c9c15b',\n    raw: 'v2.1.0-beta-6-g3c9c15b',\n    semverString: '2.1.0-beta+6.g3c9c15b'\n}\n```\n\n## Options\n\nOption             | Default     | Description\n------------------ | ----------- | -----------\n`dirtyMark`        | `'-dirty'`  | Dirty mark to use if repo state is dirty (see git describe's `--dirty`).\n`dirtySemver`      | `true`      | Appends the dirty mark to `semverString` if repo state is dirty.\n`long`             | `true`      | Always adds commit distance and hash to `raw`, `suffix` and `.toString()` (matches the behaviour of git describe's `--long`)\n`longSemver`       | `false`     | Always adds commit distance and hash to `semverString` (similar to git describe's `--long`, but for semver).\n`requireAnnotated` | `false`     | Uses `--tags` if false, so that simple git tags are allowed.\n`match`            | `'v[0-9]*'` | Uses `--match` to filter tag names. By default only tags resembling a version number are considered.\n`customArguments`  | `[]`        | Array of additional arguments to pass to `git describe`. Not all arguments are useful and some may even break the library, but things like `--abbrev` and `--candidates` should be safe to add.\n\n[1]: https://git-scm.com/docs/git-describe\n[2]: http://semver.org/\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftvdstaaij%2Fnode-git-describe","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftvdstaaij%2Fnode-git-describe","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftvdstaaij%2Fnode-git-describe/lists"}