{"id":31628049,"url":"https://github.com/jirutka/yaml-env-tag","last_synced_at":"2025-10-06T20:17:22.782Z","repository":{"id":56898934,"uuid":"113086712","full_name":"jirutka/yaml-env-tag","owner":"jirutka","description":"Custom YAML tag for referring environment variables in YAML documents","archived":false,"fork":false,"pushed_at":"2022-09-28T00:54:52.000Z","size":20,"stargazers_count":4,"open_issues_count":0,"forks_count":3,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-09-15T06:49:16.847Z","etag":null,"topics":["psych","ruby","yaml","yaml-tag"],"latest_commit_sha":null,"homepage":"","language":"Ruby","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/jirutka.png","metadata":{"files":{"readme":"README.adoc","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}},"created_at":"2017-12-04T19:39:34.000Z","updated_at":"2025-02-28T08:41:56.000Z","dependencies_parsed_at":"2022-08-20T17:40:44.435Z","dependency_job_id":null,"html_url":"https://github.com/jirutka/yaml-env-tag","commit_stats":null,"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"purl":"pkg:github/jirutka/yaml-env-tag","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jirutka%2Fyaml-env-tag","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jirutka%2Fyaml-env-tag/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jirutka%2Fyaml-env-tag/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jirutka%2Fyaml-env-tag/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/jirutka","download_url":"https://codeload.github.com/jirutka/yaml-env-tag/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jirutka%2Fyaml-env-tag/sbom","scorecard":{"id":521638,"data":{"date":"2025-08-11","repo":{"name":"github.com/jirutka/yaml-env-tag","commit":"b8f9bf0a55115f56166582e90c6eb2e7375e1a5c"},"scorecard":{"version":"v5.2.1-40-gf6ed084d","commit":"f6ed084d17c9236477efd66e5b258b9d4cc7b389"},"score":3.4,"checks":[{"name":"Code-Review","score":0,"reason":"Found 0/20 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":"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":"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":"Token-Permissions","score":0,"reason":"detected GitHub workflow tokens with excessive permissions","details":["Warn: no topLevel permission defined: .github/workflows/ci.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":"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":"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":0,"reason":"dependency not pinned by hash detected -- score normalized to 0","details":["Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/ci.yml:22: update your workflow using https://app.stepsecurity.io/secureworkflow/jirutka/yaml-env-tag/ci.yml/master?enable=pin","Warn: third-party GitHubAction not pinned by hash: .github/workflows/ci.yml:24: update your workflow using https://app.stepsecurity.io/secureworkflow/jirutka/yaml-env-tag/ci.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/ci.yml:44: update your workflow using https://app.stepsecurity.io/secureworkflow/jirutka/yaml-env-tag/ci.yml/master?enable=pin","Warn: third-party GitHubAction not pinned by hash: .github/workflows/ci.yml:46: update your workflow using https://app.stepsecurity.io/secureworkflow/jirutka/yaml-env-tag/ci.yml/master?enable=pin","Info:   0 out of   2 GitHub-owned GitHubAction dependencies pinned","Info:   0 out of   2 third-party GitHubAction 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":"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":"Vulnerabilities","score":10,"reason":"0 existing vulnerabilities detected","details":null,"documentation":{"short":"Determines if the project has open, known unfixed vulnerabilities.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#vulnerabilities"}},{"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":"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":"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":"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"}}]},"last_synced_at":"2025-08-20T03:09:56.014Z","repository_id":56898934,"created_at":"2025-08-20T03:09:56.014Z","updated_at":"2025-08-20T03:09:56.014Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":278672041,"owners_count":26025826,"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":["psych","ruby","yaml","yaml-tag"],"created_at":"2025-10-06T20:17:20.475Z","updated_at":"2025-10-06T20:17:22.772Z","avatar_url":"https://github.com/jirutka.png","language":"Ruby","funding_links":[],"categories":[],"sub_categories":[],"readme":"= YAML !ENV Tag\nJakub Jirutka \u003chttps://github.com/jirutka\u003e\n// custom\n:gem-name: yaml-env-tag\n:gh-name: jirutka/{gem-name}\n:gh-branch: master\n:codacy-id: d1b32c16409c46a0b81882a679713a67\n\nifdef::env-github[]\nimage:https://github.com/{gh-name}/workflows/CI/badge.svg[CI Status, link=https://github.com/{gh-name}/actions?query=workflow%3A%22CI%22]\nimage:https://api.codacy.com/project/badge/Coverage/{codacy-id}[\"Test Coverage\", link=\"https://www.codacy.com/app/{gh-name}\"]\nimage:https://api.codacy.com/project/badge/Grade/{codacy-id}[\"Codacy Code quality\", link=\"https://www.codacy.com/app/{gh-name}\"]\nimage:https://img.shields.io/gem/v/{gem-name}.svg?style=flat[Gem Version, link=\"https://rubygems.org/gems/{gem-name}\"]\nendif::env-github[]\n\nA custom YAML tag for referring environment variables in YAML files.\nNo need to use ERB in YAML just to set some keys from environment variables.\n\n[source, yaml]\n.*Sample YAML file using !ENV tag*\noauth:\n  base_uri: !ENV API_BASE_URI\n  client_id: !ENV [API_CLIENT_ID, \"demo\"]\n  client_secret: !ENV [API_CLIENT_SECRET, API_CLIENT_KEY, ~]\n\n\n== Usage\n\nJust require `{gem-name}` and load YAML as you’re used to:\n\n[source, rb, subs=\"+attributes\"]\n----\nrequire '{gem-name}'\n\nyaml = YAML.safe_load('secret: !ENV API_CLIENT_SECRET', permitted_classes: [YamlEnvTag::EnvVariable])\nyaml['secret']  # =\u003e \"top-secret\"\n----\n\n*Note:* Since Ruby 3.1, `YAML.load` is an alias for `YAML.safe_load`, which means you have to explicitly whitelist the `YamlEnvTag::EnvVariable` class (see keyword argument `permitted_classes`).\nAnalogously, `YAML.load_file` became an alias for `YAML.safe_load_file`.\nAlso keep in mind that the _safe_ variant disables aliases (anchors); you can enable them by setting the `aliases` parameter to `true` (e.g. `YAML.safe_load(..., aliases: true)`).\nFor compatibility with older Ruby versions, it’s better to always use `YAML.safe_load` and `YAML.safe_load_file`.\n\n\n=== Single Required Variable\n\nSpecify one environment variable as a `!ENV` tagged scalar.\nIf it does not exist (is not set), `YAML.load` (and other load methods) will raise `YamlEnvTag::MissingEnvVariableError`.\n\n[source, yaml]\n!ENV SOME_VARIABLE\n\nThis can be also written as a tagged sequence `!ENV [SOME_VARIABLE]` or `!ENV [SOME_VARIABLE, ~]`, all three variants are equivalent.\n\n\n=== Default Value\n\nYou can define a default value that is used when the specified environment variable does not exist.\nThis makes the variable optional.\nDefault value is the last element of a `!ENV` tagged sequence (array) with more than one element.\n\n[source, yaml]\n!ENV [SOME_VARIABLE, \"default value\"]\n\n\n=== Multiple Variables (Fallbacks)\n\nYou may also specify more environment variables in a `!ENV` tagged sequence (array) – the first one that does exist is used.\nKeep in mind that the last element of a multi-element sequence is always interpreted as a default value, not a name of environment variable!\n\n[source, yaml]\n!ENV [SOME_VARIABLE, LEGACY_VARIABLE, \"default value\"]\n\nIf you want to raise an exception when none of the specified environment variables exist, use `~` (nil) as the last element:\n\n[source, yaml]\n!ENV [SOME_VARIABLE, LEGACY_VARIABLE, ~]\n\n\n== License\n\nThis project is licensed under http://opensource.org/licenses/MIT/[MIT License].\nFor the full text of the license, see the link:LICENSE[LICENSE] file.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjirutka%2Fyaml-env-tag","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjirutka%2Fyaml-env-tag","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjirutka%2Fyaml-env-tag/lists"}