{"id":37028521,"url":"https://github.com/stoplightio/yaml-ast-parser","last_synced_at":"2026-01-14T03:24:30.679Z","repository":{"id":41985364,"uuid":"207333383","full_name":"stoplightio/yaml-ast-parser","owner":"stoplightio","description":"This is a fork of JS-YAML which supports parsing of YAML into AST","archived":false,"fork":true,"pushed_at":"2024-05-05T18:54:06.000Z","size":216,"stargazers_count":3,"open_issues_count":4,"forks_count":3,"subscribers_count":0,"default_branch":"master","last_synced_at":"2025-12-23T07:24:56.865Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"TypeScript","has_issues":false,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":"mulesoft-labs/yaml-ast-parser","license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/stoplightio.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"license.txt","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2019-09-09T14:48:36.000Z","updated_at":"2024-09-09T11:19:15.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/stoplightio/yaml-ast-parser","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/stoplightio/yaml-ast-parser","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/stoplightio%2Fyaml-ast-parser","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/stoplightio%2Fyaml-ast-parser/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/stoplightio%2Fyaml-ast-parser/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/stoplightio%2Fyaml-ast-parser/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/stoplightio","download_url":"https://codeload.github.com/stoplightio/yaml-ast-parser/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/stoplightio%2Fyaml-ast-parser/sbom","scorecard":{"id":854056,"data":{"date":"2023-07-24","repo":{"name":"github.com/stoplightio/yaml-ast-parser","commit":"0c4792d1db98612b94431e31a01ed661e600c474"},"scorecard":{"version":"v4.11.0-73-g2e7d37a1","commit":"2e7d37a1c50ad90d33fe2a0a94e647fb01232dfe"},"score":2.8,"checks":[{"name":"Maintained","score":0,"reason":"0 commit(s) out of 30 and 0 issue activity out of 0 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/2e7d37a1c50ad90d33fe2a0a94e647fb01232dfe/docs/checks.md#maintained"}},{"name":"Code-Review","score":0,"reason":"found 30 unreviewed changesets out of 30 -- 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/2e7d37a1c50ad90d33fe2a0a94e647fb01232dfe/docs/checks.md#code-review"}},{"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/2e7d37a1c50ad90d33fe2a0a94e647fb01232dfe/docs/checks.md#cii-best-practices"}},{"name":"License","score":9,"reason":"license file detected","details":["Info: License file found in expected location: license.txt:1","Warn: Any licence detected not an FSF or OSI recognized license: license.txt:1"],"documentation":{"short":"Determines if the project has defined a license.","url":"https://github.com/ossf/scorecard/blob/2e7d37a1c50ad90d33fe2a0a94e647fb01232dfe/docs/checks.md#license"}},{"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/2e7d37a1c50ad90d33fe2a0a94e647fb01232dfe/docs/checks.md#branch-protection"}},{"name":"Signed-Releases","score":-1,"reason":"no releases found","details":["Warn: no GitHub releases found"],"documentation":{"short":"Determines if the project cryptographically signs release artifacts.","url":"https://github.com/ossf/scorecard/blob/2e7d37a1c50ad90d33fe2a0a94e647fb01232dfe/docs/checks.md#signed-releases"}},{"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/2e7d37a1c50ad90d33fe2a0a94e647fb01232dfe/docs/checks.md#binary-artifacts"}},{"name":"Token-Permissions","score":-1,"reason":"no github 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/2e7d37a1c50ad90d33fe2a0a94e647fb01232dfe/docs/checks.md#token-permissions"}},{"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/2e7d37a1c50ad90d33fe2a0a94e647fb01232dfe/docs/checks.md#dangerous-workflow"}},{"name":"Packaging","score":-1,"reason":"no published package 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/2e7d37a1c50ad90d33fe2a0a94e647fb01232dfe/docs/checks.md#packaging"}},{"name":"SAST","score":0,"reason":"no SAST tool detected","details":["Warn: no pull requests merged into dev branch","Warn: CodeQL tool not detected"],"documentation":{"short":"Determines if the project uses static code analysis.","url":"https://github.com/ossf/scorecard/blob/2e7d37a1c50ad90d33fe2a0a94e647fb01232dfe/docs/checks.md#sast"}},{"name":"Pinned-Dependencies","score":10,"reason":"all dependencies are pinned","details":["Info: GitHub-owned GitHubActions are pinned","Info: Third-party GitHubActions are pinned","Info: Dockerfile dependencies are pinned","Info: no insecure (not pinned by hash) dependency downloads found in Dockerfiles","Info: no insecure (not pinned by hash) dependency downloads found in shell scripts","Info: Pip installs are pinned","Info: npm installs are pinned"],"documentation":{"short":"Determines if the project has declared and pinned the dependencies of its build process.","url":"https://github.com/ossf/scorecard/blob/2e7d37a1c50ad90d33fe2a0a94e647fb01232dfe/docs/checks.md#pinned-dependencies"}},{"name":"Fuzzing","score":0,"reason":"project is not fuzzed","details":null,"documentation":{"short":"Determines if the project uses fuzzing.","url":"https://github.com/ossf/scorecard/blob/2e7d37a1c50ad90d33fe2a0a94e647fb01232dfe/docs/checks.md#fuzzing"}},{"name":"Security-Policy","score":0,"reason":"security policy file not detected","details":null,"documentation":{"short":"Determines if the project has published a security policy.","url":"https://github.com/ossf/scorecard/blob/2e7d37a1c50ad90d33fe2a0a94e647fb01232dfe/docs/checks.md#security-policy"}},{"name":"Vulnerabilities","score":1,"reason":"9 existing vulnerabilities detected","details":["Warn: Project is vulnerable to: GHSA-9vvw-cc9w-f27h","Warn: Project is vulnerable to: GHSA-gxpj-cx7g-858c","Warn: Project is vulnerable to: GHSA-h6ch-v84p-w6p9","Warn: Project is vulnerable to: GHSA-qh2h-chj9-jffq","Warn: Project is vulnerable to: GHSA-f8q6-p94x-37v3","Warn: Project is vulnerable to: GHSA-vh95-rmgr-6w4m","Warn: Project is vulnerable to: GHSA-xvch-5gv4-984h","Warn: Project is vulnerable to: GHSA-w9mr-4mfr-499f","Warn: Project is vulnerable to: GHSA-cf4h-3jhx-xvhq"],"documentation":{"short":"Determines if the project has open, known unfixed vulnerabilities.","url":"https://github.com/ossf/scorecard/blob/2e7d37a1c50ad90d33fe2a0a94e647fb01232dfe/docs/checks.md#vulnerabilities"}}]},"last_synced_at":"2025-08-23T23:22:02.439Z","repository_id":41985364,"created_at":"2025-08-23T23:22:02.440Z","updated_at":"2025-08-23T23:22:02.440Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28408834,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-14T01:52:23.358Z","status":"online","status_checked_at":"2026-01-14T02:00:06.678Z","response_time":107,"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-01-14T03:24:30.029Z","updated_at":"2026-01-14T03:24:30.672Z","avatar_url":"https://github.com/stoplightio.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# yaml-ast-parser\n\n[![Build Status](https://travis-ci.org/mulesoft-labs/yaml-ast-parser.svg?branch=master)](https://travis-ci.org/mulesoft-labs/yaml-ast-parser)\n\nThis is a fork of JS-YAML which supports parsing of YAML into AST.\n\nIn additional to parsing YAML to AST, it has following features:\n\n* restoration after the errors and reporting errors as a part of AST nodes.\n* built-in support for `!include` tag used in RAML\n\n## Usage\nThe type information below is relevant when using TypeScript, if using from JavaScript only the field/method information is relevant.\n\n`load` method can be used to load the tree and returns a `YAMLNode`.\n\n### YAMLNode\n`YAMLNode` class is an ancestor for all node kinds.\nIt's `kind` field determine node kind, one of `Kind` enum:\n  * `SCALAR`, `MAPPING`, `MAP`, `SEQ`, `ANCHOR_REF` or `INCLUDE_REF`.\n \nAfter node kind is determined, it can be cast to one of the `YAMLNode` descendants types:\n * `YAMLScalar`, `YAMLMapping`, `YamlMap`, `YAMLSequence` or `YAMLAnchorReference`.\n\n| class | important members |\n|-------|-------------------|\n| `YAMLNode` | `startPosition` and `endPosition` provide node range.|\n| `YAMLScalar` | `string` `value` field |\n| `YAMLMapping` |`YAMLScalar` `key` and `YAMLNode` `value` fields | \n| `YAMLSequence` | `YAMLNode[]` `items` field|\n| `YamlMap` | `YAMLMapping[]` `mappings` field|\n| `YAMLAnchorReference` | `string` `referencesAnchor` and `YAMLNode` `value`|\n\n### YAMLScalar\n\nScalars are [one of the three main node types defined by YAML](http://www.yaml.org/spec/1.2/spec.html#scalar//) and are effectively leaf nodes.\n\nThere are many factors that can influence the type of datum represent in scalar node (context, schema, tag, etc.).\n\nTo help inspection of a `YAMLScalar` to determine its datatype when a document uses the [Core Schema](http://www.yaml.org/spec/1.2/spec.html#id2804923), you can pass the `YAMLScalar` to the `determineScalarType` function.  It will return an enum value indicating `null`, `bool`, `int`, `float`, or `string`.\n\nOnce you know the type, there are also some helper functions to help read the value by passing them the string, `value`: `parseYamlBoolean`, `parseYamlFloat`, and `parseYamlInteger`.","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fstoplightio%2Fyaml-ast-parser","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fstoplightio%2Fyaml-ast-parser","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fstoplightio%2Fyaml-ast-parser/lists"}