{"id":14155650,"url":"https://github.com/01alchemist/sls-yaml","last_synced_at":"2025-10-06T10:21:40.556Z","repository":{"id":46926225,"uuid":"199408697","full_name":"01alchemist/sls-yaml","owner":"01alchemist","description":"Serverless framework yaml extension compiler and more","archived":false,"fork":false,"pushed_at":"2024-07-10T08:42:22.000Z","size":1119,"stargazers_count":3,"open_issues_count":19,"forks_count":1,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-09-13T15:31:43.993Z","etag":null,"topics":["extension","nodejs","serverless-framework","yaml","yaml-parser"],"latest_commit_sha":null,"homepage":"","language":"TypeScript","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/01alchemist.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":"2019-07-29T08:13:01.000Z","updated_at":"2024-07-10T08:42:25.000Z","dependencies_parsed_at":"2024-07-10T10:23:14.800Z","dependency_job_id":null,"html_url":"https://github.com/01alchemist/sls-yaml","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/01alchemist/sls-yaml","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/01alchemist%2Fsls-yaml","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/01alchemist%2Fsls-yaml/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/01alchemist%2Fsls-yaml/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/01alchemist%2Fsls-yaml/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/01alchemist","download_url":"https://codeload.github.com/01alchemist/sls-yaml/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/01alchemist%2Fsls-yaml/sbom","scorecard":{"id":127,"data":{"date":"2025-08-11","repo":{"name":"github.com/01alchemist/sls-yaml","commit":"f6878df386e2d8b747b4b949a3e9e33b4ab96b66"},"scorecard":{"version":"v5.2.1-40-gf6ed084d","commit":"f6ed084d17c9236477efd66e5b258b9d4cc7b389"},"score":2.5,"checks":[{"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/25 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":"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":-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":"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":"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":"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":"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: 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":"SAST","score":0,"reason":"SAST tool is not run on all commits -- score normalized to 0","details":["Warn: 0 commits out of 6 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":6,"reason":"4 existing vulnerabilities detected","details":["Warn: Project is vulnerable to: GHSA-968p-4wvh-cqc8","Warn: Project is vulnerable to: GHSA-v6h2-p8h4-qcjw","Warn: Project is vulnerable to: GHSA-3xgq-45jj-v275","Warn: Project is vulnerable to: GHSA-952p-6rrq-rcjv"],"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-14T12:18:53.012Z","repository_id":46926225,"created_at":"2025-08-14T12:18:53.012Z","updated_at":"2025-08-14T12:18:53.012Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":278592817,"owners_count":26012382,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-10-06T02:00:05.630Z","response_time":65,"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":["extension","nodejs","serverless-framework","yaml","yaml-parser"],"created_at":"2024-08-17T08:04:43.774Z","updated_at":"2025-10-06T10:21:40.508Z","avatar_url":"https://github.com/01alchemist.png","language":"TypeScript","funding_links":[],"categories":["yaml"],"sub_categories":[],"readme":"## Serverless YAML extension parser\n\n[![CircleCI]][ci-sls-yaml] [![Maintainability]][codeclimate] [![Test Coverage]][coverage]\n\nThis tiny library will parse YAML extensions used in serverless framework.\n\n### Usage\n\n```bash\nnpm install sls-yaml\n```\n\n```js\nimport yaml from \"sls-yaml\";\nconst compiledYamlAsJsonObject = yaml(YAML_FILE_PATH_OR_BUFFER);\n```\n\n### Supported sls extensions\n\n- [Include external file](#include-external-file) `${file(path/to/file.yml)}`\n- [Inject environment variable](#inject-environment-variable) `${env:NODE_ENV}`\n- [Inject global variables](#inject-global-variables) `${global:path.to.variable}`\n- [Inject local variables](#inject-local-variables) `${self:path.to.variable}`\n\n### New extensions\\*\n\n- [Inject current git branch](#inject-current-git-branch) `${git:branch}`\n- [Inject last git commit hash](#inject-last-git-commit-hash) `${git:sha1}`\n- [String replace](#string-replace) `${replace(str, searchPattern, replaceValue )}`\n\n`* - New extension not present in serverless yaml`\n\n### Custom extensions\n\n```js\nconst context = {\n  custom: ([arg]: string[]) =\u003e {\n    return `${arg}-beta`;\n  }\n};\nconst result = yaml(content, null, context);\n```\n\n```yml\nname: service\nversion: v1.0.2\nsubset: service@${custom(${self:version})}\n```\n- output\n```yml\nname: service\nversion: v1.0.2\nsubset: service@v1.0.2-beta\n```\n\n### Include external file\n\nThis extension will include content of external yaml files.\n\n- config.yml\n\n```yaml\nversion: 1\nenv: dev\nconfig: ${file(./common.yml)}\n```\n\n- common.yml\n\n```yaml\nendpoint: http://service-url\n```\n\n- Generated final yaml\n\n```yaml\nversion: 1\nenv: dev\nconfig:\n  endpoint: http://service-url\n```\n\n### Inject environment variable\n\nThis extension will inject envronment values\n\n- config.yml `export NODE_ENV = development`\n\n```yaml\nversion: 1\nenv: ${env:NODE_ENV}\n```\n\n- Generated final yaml\n\n```yaml\nversion: 1\nenv: development\n```\n\n### Inject global variables\n\nThis extension will inject variable from global scope.\n\n- config.yml\n\n```yaml\nversion: 1\nenv: stage\nconfig: ${file(./common.yml)}\n```\n\n- common.yml\n\n```yaml\nendpoint: http://service-${global:env}\n```\n\n- Generated final yaml\n\n```yaml\nversion: 1\nenv: stage\nconfig:\n  endpoint: http://service-stage\n```\n\n### Inject local variables\n\nThis extension will inject variable from local scope.\n\n- config.yml\n\n```yaml\nversion: 1\nenv: stage\nconfig: ${file(./common.yml)}\n```\n\n- common.yml\n\n```yaml\nport: 8080\nendpoint: http://service:${self:port}\n```\n\n- Generated final yaml\n\n```yaml\nversion: 1\nenv: stage\nconfig:\n  port: 8080\n  endpoint: http://service:8080\n```\n\n### Inject current git branch\n\nThis extension will inject current git branch name\n\n- config.yml\n\n```yaml\nbranch: ${git:branch}\n```\n\n### Inject last git commit hash\n\nThis extension will inject last git commit hash\n\n- config.yml\n\n```yaml\nimage.tag: ${git:sha1}\n```\n\n### String replace\n```ts\nreplace(str:string, searchPattern:RegExp|string, replaceValue:string )\n```\nThis extension will returns a new string with some or all matches of a pattern replaced by a replacement. The pattern can be a string or a RegExp, and the replacement can be a string or a function to be called for each match. If pattern is a string, only the first occurrence will be replaced.\n\n- config.yml\n\n```yaml\nversion: v1.0.0\nname: ServiceName@${replace(${ self : version }, /\\\\./gi, - )}\n```\n\n- output\n\n```yaml\nversion: v1.0.0\nname: ServiceName@v1-0-0\n```\n\n[circleci]: https://circleci.com/gh/01alchemist/sls-yaml/tree/master.svg?style=svg\n[ci-sls-yaml]: https://circleci.com/gh/01alchemist/sls-yaml/tree/master\n[maintainability]: https://api.codeclimate.com/v1/badges/d3b19c4c45ebf451faf3/maintainability\n[codeclimate]: https://codeclimate.com/github/01alchemist/sls-yaml/maintainability\n[test coverage]: https://api.codeclimate.com/v1/badges/d3b19c4c45ebf451faf3/test_coverage\n[coverage]: https://codeclimate.com/github/01alchemist/sls-yaml/test_coverage\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2F01alchemist%2Fsls-yaml","html_url":"https://awesome.ecosyste.ms/projects/github.com%2F01alchemist%2Fsls-yaml","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2F01alchemist%2Fsls-yaml/lists"}