{"id":31654803,"url":"https://github.com/step-security/action-read-yaml","last_synced_at":"2026-05-14T03:06:12.956Z","repository":{"id":318281504,"uuid":"1070551951","full_name":"step-security/action-read-yaml","owner":"step-security","description":"Custom github action used to read yaml files, supporting multiple keys and variable replacements. Secure drop-in replacement for pietrobolcato/action-read-yaml.","archived":false,"fork":false,"pushed_at":"2026-02-16T00:35:56.000Z","size":541,"stargazers_count":0,"open_issues_count":9,"forks_count":1,"subscribers_count":0,"default_branch":"main","last_synced_at":"2026-02-16T08:18:15.089Z","etag":null,"topics":["step-security-maintained-actions"],"latest_commit_sha":null,"homepage":"https://docs.stepsecurity.io/actions/stepsecurity-maintained-actions","language":"JavaScript","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/step-security.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":"SECURITY.md","support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2025-10-06T05:27:22.000Z","updated_at":"2025-11-19T05:07:00.000Z","dependencies_parsed_at":null,"dependency_job_id":"ce4d4151-f677-40cb-9f50-6f7a41c6b131","html_url":"https://github.com/step-security/action-read-yaml","commit_stats":null,"previous_names":["step-security/action-read-yaml"],"tags_count":2,"template":false,"template_full_name":null,"purl":"pkg:github/step-security/action-read-yaml","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/step-security%2Faction-read-yaml","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/step-security%2Faction-read-yaml/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/step-security%2Faction-read-yaml/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/step-security%2Faction-read-yaml/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/step-security","download_url":"https://codeload.github.com/step-security/action-read-yaml/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/step-security%2Faction-read-yaml/sbom","scorecard":{"id":1239391,"data":{"date":"2025-10-28T07:26:33Z","repo":{"name":"github.com/step-security/action-read-yaml","commit":"08f859a2769067ea7fd26c1cd03a9b940c0ac01b"},"scorecard":{"version":"v5.0.0","commit":"ea7e27ed41b76ab879c862fa0ca4cc9c61764ee4"},"score":7.1,"checks":[{"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/ea7e27ed41b76ab879c862fa0ca4cc9c61764ee4/docs/checks.md#binary-artifacts"}},{"name":"Branch-Protection","score":8,"reason":"branch protection is not maximal on development and all release branches","details":["Info: 'allow deletion' disabled on branch 'main'","Info: 'force pushes' disabled on branch 'main'","Warn: required approving review count is 1 on branch 'main'","Warn: codeowners review is required - but no codeowners file found in repo","Info: status check found to merge onto on branch 'main'","Info: PRs are required in order to make changes on branch 'main'"],"documentation":{"short":"Determines if the default and release branches are protected with GitHub's branch protection settings.","url":"https://github.com/ossf/scorecard/blob/ea7e27ed41b76ab879c862fa0ca4cc9c61764ee4/docs/checks.md#branch-protection"}},{"name":"CI-Tests","score":10,"reason":"4 out of 4 merged PRs checked by a CI test -- score normalized to 10","details":null,"documentation":{"short":"Determines if the project runs tests before pull requests are merged.","url":"https://github.com/ossf/scorecard/blob/ea7e27ed41b76ab879c862fa0ca4cc9c61764ee4/docs/checks.md#ci-tests"}},{"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/ea7e27ed41b76ab879c862fa0ca4cc9c61764ee4/docs/checks.md#cii-best-practices"}},{"name":"Code-Review","score":8,"reason":"Found 4/5 approved changesets -- score normalized to 8","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/ea7e27ed41b76ab879c862fa0ca4cc9c61764ee4/docs/checks.md#code-review"}},{"name":"Contributors","score":0,"reason":"project has 0 contributing companies or organizations -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project has a set of contributors from multiple organizations (e.g., companies).","url":"https://github.com/ossf/scorecard/blob/ea7e27ed41b76ab879c862fa0ca4cc9c61764ee4/docs/checks.md#contributors"}},{"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/ea7e27ed41b76ab879c862fa0ca4cc9c61764ee4/docs/checks.md#dangerous-workflow"}},{"name":"Dependency-Update-Tool","score":10,"reason":"update tool detected","details":["Info: detected update tool: Dependabot: .github/dependabot.yml:1"],"documentation":{"short":"Determines if the project uses a dependency update tool.","url":"https://github.com/ossf/scorecard/blob/ea7e27ed41b76ab879c862fa0ca4cc9c61764ee4/docs/checks.md#dependency-update-tool"}},{"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/ea7e27ed41b76ab879c862fa0ca4cc9c61764ee4/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/ea7e27ed41b76ab879c862fa0ca4cc9c61764ee4/docs/checks.md#license"}},{"name":"Maintained","score":0,"reason":"project was created in last 90 days. please review its contents carefully","details":["Warn: Repository was created in last 90 days."],"documentation":{"short":"Determines if the project is \"actively maintained\".","url":"https://github.com/ossf/scorecard/blob/ea7e27ed41b76ab879c862fa0ca4cc9c61764ee4/docs/checks.md#maintained"}},{"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/ea7e27ed41b76ab879c862fa0ca4cc9c61764ee4/docs/checks.md#packaging"}},{"name":"Pinned-Dependencies","score":10,"reason":"all dependencies are pinned","details":["Info:   9 out of   9 GitHub-owned GitHubAction dependencies pinned","Info:   4 out of   4 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/ea7e27ed41b76ab879c862fa0ca4cc9c61764ee4/docs/checks.md#pinned-dependencies"}},{"name":"SAST","score":8,"reason":"SAST tool detected but not run on all commits","details":["Info: SAST configuration detected: CodeQL","Warn: 4 commits out of 9 are checked with a SAST tool"],"documentation":{"short":"Determines if the project uses static code analysis.","url":"https://github.com/ossf/scorecard/blob/ea7e27ed41b76ab879c862fa0ca4cc9c61764ee4/docs/checks.md#sast"}},{"name":"Security-Policy","score":10,"reason":"security policy file detected","details":["Info: security policy file detected: SECURITY.md:1","Info: Found linked content: SECURITY.md:1","Info: Found disclosure, vulnerability, and/or timelines in security policy: SECURITY.md:1","Info: Found text in security policy: SECURITY.md:1"],"documentation":{"short":"Determines if the project has published a security policy.","url":"https://github.com/ossf/scorecard/blob/ea7e27ed41b76ab879c862fa0ca4cc9c61764ee4/docs/checks.md#security-policy"}},{"name":"Signed-Releases","score":10,"reason":"1 out of the last 1 releases have a total of 1 signed artifacts.","details":["Info: provenance for release artifact: multiple.intoto.jsonl: https://api.github.com/repos/step-security/action-read-yaml/releases/assets/301802473"],"documentation":{"short":"Determines if the project cryptographically signs release artifacts.","url":"https://github.com/ossf/scorecard/blob/ea7e27ed41b76ab879c862fa0ca4cc9c61764ee4/docs/checks.md#signed-releases"}},{"name":"Token-Permissions","score":0,"reason":"detected GitHub workflow tokens with excessive permissions","details":["Warn: jobLevel 'contents' permission set to 'write': .github/workflows/actions_release.yml:19","Info: jobLevel 'actions' permission set to 'read': .github/workflows/actions_release.yml:17","Info: jobLevel 'actions' permission set to 'read': .github/workflows/codeql.yml:31","Info: jobLevel 'contents' permission set to 'read': .github/workflows/codeql.yml:32","Info: jobLevel 'pull-requests' permission set to 'read': .github/workflows/scorecards.yml:33","Info: jobLevel 'checks' permission set to 'read': .github/workflows/scorecards.yml:35","Info: jobLevel 'contents' permission set to 'read': .github/workflows/scorecards.yml:29","Info: jobLevel 'actions' permission set to 'read': .github/workflows/scorecards.yml:30","Info: jobLevel 'issues' permission set to 'read': .github/workflows/scorecards.yml:32","Info: topLevel 'contents' permission set to 'read': .github/workflows/actions_release.yml:12","Warn: topLevel 'contents' permission set to 'write': .github/workflows/audit_package.yml:25","Info: topLevel 'packages' permission set to 'read': .github/workflows/audit_package.yml:27","Info: topLevel 'contents' permission set to 'read': .github/workflows/claude_review.yml:14","Info: topLevel 'packages' permission set to 'read': .github/workflows/claude_review.yml:16","Info: topLevel 'contents' permission set to 'read': .github/workflows/codeql.yml:24","Info: topLevel 'contents' permission set to 'read': .github/workflows/dependency-review.yml:13","Info: topLevel 'contents' permission set to 'read': .github/workflows/guarddog.yml:10","Info: topLevel permissions set to 'read-all': .github/workflows/scorecards.yml:18"],"documentation":{"short":"Determines if the project's workflows follow the principle of least privilege.","url":"https://github.com/ossf/scorecard/blob/ea7e27ed41b76ab879c862fa0ca4cc9c61764ee4/docs/checks.md#token-permissions"}},{"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/ea7e27ed41b76ab879c862fa0ca4cc9c61764ee4/docs/checks.md#vulnerabilities"}}]},"last_synced_at":"2025-10-31T22:14:47.452Z","repository_id":318281504,"created_at":"2025-10-31T22:14:47.452Z","updated_at":"2025-10-31T22:14:47.452Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29529416,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-17T00:57:22.232Z","status":"ssl_error","status_checked_at":"2026-02-17T00:54:25.811Z","response_time":115,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6:443 state=error: 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":["step-security-maintained-actions"],"created_at":"2025-10-07T12:17:02.060Z","updated_at":"2026-05-14T03:06:12.950Z","avatar_url":"https://github.com/step-security.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"[![StepSecurity Maintained Action](https://raw.githubusercontent.com/step-security/maintained-actions-assets/main/assets/maintained-action-banner.png)](https://docs.stepsecurity.io/actions/stepsecurity-maintained-actions)\n\n# action-read-yaml\n\nA lightweight GitHub Action that loads data from a YAML file and exposes each key as an output or environment variable.  \nThis lets you use YAML files as dynamic configuration sources inside your workflows.\n\nThe action supports:\n- Variable interpolation using the `$(var)` syntax  \n- Nested key flattening (dot notation output)  \n- Optional key filtering via regex patterns  \n- Automatic environment variable creation with a configurable prefix  \n\n---\n\n## 🔧 Inputs\n\n| Name | Required | Description |\n|------|-----------|-------------|\n| `config` | ✅ Yes | The path to the YAML configuration file. |\n| `env-var-prefix` | ❌ No | Optional prefix for environment variables derived from keys. Dots (`.`) in key names are replaced with underscores. |\n| `key-path` | ❌ No | A regular expression to filter which keys are included and to strip that matching part from their names. |\n\n---\n\n## 🧠 How It Works\n\n1. The YAML file is parsed into an object.  \n2. Nested keys are flattened using dot notation (e.g., `database.user.name`).  \n3. Any `$(variable)` patterns are replaced with their corresponding resolved values.  \n4. You can limit which keys are exported using a regex filter.  \n5. Optionally, environment variables are created with a prefix.\n\n---\n\n## ⚙️ Example 1 — Basic Configuration\n\n**YAML file:**\n```yaml\nnamespace: demo\nregion: us-east\nenvironment: dev\n\nresource_group: $(namespace)-$(region)-$(environment)\n```\n\n**Workflow:**\n```yaml\nname: Read YAML Example\n\non:\n  push:\n  workflow_dispatch:\n\njobs:\n  read-config:\n    runs-on: ubuntu-latest\n    steps:\n      - uses: actions/checkout@v5\n\n      - name: Load YAML configuration\n        id: read\n        uses: step-security/action-read-yaml@v1\n        with:\n          config: ${{ github.workspace }}/examples/basic.yaml\n\n      - name: Display loaded values\n        run: |\n          echo \"Namespace: ${{ steps.read.outputs['namespace'] }}\"\n          echo \"Region: ${{ steps.read.outputs['region'] }}\"\n          echo \"Environment: ${{ steps.read.outputs['environment'] }}\"\n          echo \"Resource Group: ${{ steps.read.outputs['resource_group'] }}\"\n```\n\n**Output:**\n```\nNamespace: demo\nRegion: us-east\nEnvironment: dev\nResource Group: demo-us-east-dev\n```\n\n---\n\n## ⚙️ Example 2 — Nested Structure\n\n**YAML file:**\n```yaml\nservice:\n  name: web\n  replicas: 3\n  containers:\n    - name: api\n      image: node:20\n    - name: db\n      image: postgres:14\ndeploy:\n  region: europe\n  version: 2.0.1\n```\n\n**Workflow:**\n```yaml\n- name: Read nested YAML\n  id: config\n  uses: step-security/action-read-yaml@v1\n  with:\n    config: ${{ github.workspace }}/examples/nested.yaml\n\n- name: Print results\n  run: |\n    echo \"Service name: ${{ steps.config.outputs['service.name'] }}\"\n    echo \"First container: ${{ steps.config.outputs['service.containers.0.name'] }}\"\n    echo \"Deploy region: ${{ steps.config.outputs['deploy.region'] }}\"\n```\n\n**Output:**\n```\nService name: web\nFirst container: api\nDeploy region: europe\n```\n\n---\n\n## ⚙️ Example 3 — Filtering Keys and Generating Environment Variables\n\n**YAML file:**\n```yaml\napplication:\n  config:\n    host: localhost\n    port: 8080\n  credentials:\n    username: admin\n    password: secret\ndeployment:\n  path: /opt/app\n  target: production\n```\n\n**Workflow:**\n```yaml\nname: Filter YAML Output\n\non:\n  workflow_dispatch:\n\njobs:\n  read-yaml:\n    runs-on: ubuntu-latest\n    steps:\n      - uses: actions/checkout@v5\n\n      - name: Parse config section only\n        id: filtered\n        uses: step-security/action-read-yaml@v1\n        with:\n          config: ${{ github.workspace }}/examples/filter.yaml\n          env-var-prefix: APP_CONF\n          key-path: ^application\\.config\\.\n\n      - name: Show filtered values\n        run: |\n          echo \"Host: ${{ steps.filtered.outputs['host'] }}\"\n          echo \"Port: ${{ steps.filtered.outputs['port'] }}\"\n          echo\n          echo \"Environment variables:\"\n          env | grep APP_CONF_\n```\n\n**Output:**\n```\nHost: localhost\nPort: 8080\n\nAPP_CONF_host=localhost\nAPP_CONF_port=8080\n```\n\n---\n\n## 💡 Notes\n\n- Variable interpolation happens before exporting outputs or env vars.  \n- Filtering both removes and trims matching patterns from key names.  \n- Nested arrays are automatically expanded using numeric indexes (e.g., `permissions.0.name`).  \n- The action can be reused multiple times in the same workflow for different YAML sources.  \n\n---\n\n## 🪪 License\n\nThis project is licensed under the **MIT License**.  \nSee the [LICENSE](LICENSE) file for full text.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fstep-security%2Faction-read-yaml","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fstep-security%2Faction-read-yaml","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fstep-security%2Faction-read-yaml/lists"}