{"id":43352190,"url":"https://github.com/dimagi/js-xpath","last_synced_at":"2026-02-02T02:32:42.505Z","repository":{"id":916675,"uuid":"2522498","full_name":"dimagi/js-xpath","owner":"dimagi","description":"XPath Parser for Javascript","archived":false,"fork":false,"pushed_at":"2025-07-24T11:27:37.000Z","size":648,"stargazers_count":29,"open_issues_count":4,"forks_count":10,"subscribers_count":25,"default_branch":"master","last_synced_at":"2025-08-09T09:11:10.627Z","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":"bsd-3-clause","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/dimagi.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,"governance":null,"roadmap":null,"authors":null,"dei":null}},"created_at":"2011-10-05T21:57:01.000Z","updated_at":"2025-07-24T11:24:43.000Z","dependencies_parsed_at":"2024-02-20T20:29:52.271Z","dependency_job_id":"03478f9f-80f6-42cc-9ea9-82cdcbcded2c","html_url":"https://github.com/dimagi/js-xpath","commit_stats":{"total_commits":145,"total_committers":12,"mean_commits":"12.083333333333334","dds":0.6206896551724138,"last_synced_commit":"41d32c5285060a803d8103908f2aa3d03849d6fc"},"previous_names":[],"tags_count":9,"template":false,"template_full_name":null,"purl":"pkg:github/dimagi/js-xpath","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dimagi%2Fjs-xpath","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dimagi%2Fjs-xpath/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dimagi%2Fjs-xpath/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dimagi%2Fjs-xpath/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/dimagi","download_url":"https://codeload.github.com/dimagi/js-xpath/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dimagi%2Fjs-xpath/sbom","scorecard":{"id":343143,"data":{"date":"2025-08-11","repo":{"name":"github.com/dimagi/js-xpath","commit":"c8c303af838998a0d6ce3dc6bcf6f7dd2261f0e6"},"scorecard":{"version":"v5.2.1-40-gf6ed084d","commit":"f6ed084d17c9236477efd66e5b258b9d4cc7b389"},"score":5.8,"checks":[{"name":"Maintained","score":10,"reason":"25 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 10","details":null,"documentation":{"short":"Determines if the project is \"actively maintained\".","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#maintained"}},{"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":"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":0,"reason":"detected GitHub workflow tokens with excessive permissions","details":["Warn: no topLevel permission defined: .github/workflows/tests.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":"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":"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/tests.yml:12: update your workflow using https://app.stepsecurity.io/secureworkflow/dimagi/js-xpath/tests.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/tests.yml:13: update your workflow using https://app.stepsecurity.io/secureworkflow/dimagi/js-xpath/tests.yml/master?enable=pin","Warn: npmCommand not pinned by hash: .github/workflows/tests.yml:18","Info:   0 out of   2 GitHub-owned GitHubAction dependencies pinned","Info:   0 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":"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: BSD 3-Clause \"New\" or \"Revised\" 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":"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":-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":"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"}},{"name":"Vulnerabilities","score":9,"reason":"1 existing vulnerabilities detected","details":["Warn: Project is vulnerable to: GHSA-v6h2-p8h4-qcjw"],"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-18T06:25:34.294Z","repository_id":916675,"created_at":"2025-08-18T06:25:34.294Z","updated_at":"2025-08-18T06:25:34.294Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29001654,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-02T01:32:03.847Z","status":"online","status_checked_at":"2026-02-02T02:00:07.448Z","response_time":58,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"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":"2026-02-02T02:32:41.841Z","updated_at":"2026-02-02T02:32:42.492Z","avatar_url":"https://github.com/dimagi.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"js-xpath\n--------\nAn XPath Parser/Generator for JavaScript using the Jison parser/generator.\n\nDemo\n----\n\nSee the [xpath.html](xpath.html) file for a very simple usage for parsing xpath expressions.\n\nUsage\n-----\n\nFirst include the libraries and xpath.js and models.js files in your document. Then try the following to get started.\n\n```js\nvar expr = \"/some/xpath/expression\"\nvar parsed = xpath.parse(expr);\nvar regenerated = parsed.toXPath();\n```\n\nFor examples of supported expressions, see the [tests](test)!\n\n`models.js` provides a default xpathmodels which does not support the hashtag preprocessor. If you want to support hashtags within xpaths, you can use:\n```js\nhashtagConfig = {\n  isValidNamespace: function(namespace),\n  hashtagToXPath: function(hashtag),\n  toHashtag: function(expr)\n}\nxPathModels = XPathModels(hashtagConfig)\n```\n\nhashtags use the format `#namespace/arbitrarily/long/path` and do not support filtering\n\nTests\n-----\n- Run `yarn test` or `yarn qunit test/generatorTests.js` for a specific test file \n\n\nKnown Limitations\n-----------------\n- Filter expressions are not supported due to a known bug in jison.\n- See the failing tests for examples of expressions that are known not to work.\n\n  \nCode Structure\n--------------\n\n| File           | Content                                            |\n|----------------|----------------------------------------------------|\n| dist/          | contains a browser-ready build of the parser       |\n| src/jison/     | contains the jison parser files.                   |\n| src/lib/       | external libraries that the parser depends on.     |\n| src/main.js    | the entry point for non-browser users.             |\n| src/models.js  | the underlying models used in parsing.             |\n| src/parser.js  | the jison built parser file, do not edit manually. |\n| test/          | qunit tests for the parser and generator.          |\n \nBuild\n------\nThis is built using [jison](http://zaach.github.com/jison/). To build the parser file yourself run:\n\n`$ npm run build` - This will build both the distribution (`browserify`) package in dist/ and rebuild the Jison parser (`src/parser.js`) from the `src/jison/` files. \n`$ npm run jison` - Rebuild `parser.js` from the Jison specification files.\n`$ npm run dist` - Rebuild the browser friendly distribution from the current source files.\n\nFor more information on jison see the jison project website at: http://zaach.github.com/jison/.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdimagi%2Fjs-xpath","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdimagi%2Fjs-xpath","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdimagi%2Fjs-xpath/lists"}