{"id":39073278,"url":"https://github.com/marcelocarlos/datasubst","last_synced_at":"2026-01-17T18:24:15.178Z","repository":{"id":51335004,"uuid":"348856132","full_name":"marcelocarlos/datasubst","owner":"marcelocarlos","description":"A simple go template based tool that supports JSON, YAML and environment variables as data sources.","archived":false,"fork":false,"pushed_at":"2023-08-22T07:11:41.000Z","size":35,"stargazers_count":4,"open_issues_count":0,"forks_count":1,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-10-04T17:51:33.178Z","etag":null,"topics":["datasubst","environment-variables","envsubst","gotemplate","json","templating","yaml"],"latest_commit_sha":null,"homepage":"","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/marcelocarlos.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":".github/CODEOWNERS","security":"SECURITY.md","support":null,"governance":null,"roadmap":null,"authors":null}},"created_at":"2021-03-17T21:24:53.000Z","updated_at":"2022-08-05T14:53:38.000Z","dependencies_parsed_at":"2024-01-06T05:34:31.978Z","dependency_job_id":"8f66d859-d243-4ffd-ae73-a4ac7e2e4488","html_url":"https://github.com/marcelocarlos/datasubst","commit_stats":{"total_commits":23,"total_committers":3,"mean_commits":7.666666666666667,"dds":"0.26086956521739135","last_synced_commit":"7baf535024484f4a15a198c1a28092d2f7e38d4c"},"previous_names":[],"tags_count":6,"template":false,"template_full_name":null,"purl":"pkg:github/marcelocarlos/datasubst","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/marcelocarlos%2Fdatasubst","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/marcelocarlos%2Fdatasubst/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/marcelocarlos%2Fdatasubst/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/marcelocarlos%2Fdatasubst/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/marcelocarlos","download_url":"https://codeload.github.com/marcelocarlos/datasubst/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/marcelocarlos%2Fdatasubst/sbom","scorecard":{"id":617604,"data":{"date":"2025-08-11","repo":{"name":"github.com/marcelocarlos/datasubst","commit":"7baf535024484f4a15a198c1a28092d2f7e38d4c"},"scorecard":{"version":"v5.2.1-40-gf6ed084d","commit":"f6ed084d17c9236477efd66e5b258b9d4cc7b389"},"score":4.6,"checks":[{"name":"Code-Review","score":0,"reason":"Found 1/16 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":"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/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#security-policy"}},{"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":"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":["Info: jobLevel 'actions' permission set to 'read': .github/workflows/codeql-analysis.yml:23","Info: jobLevel 'contents' permission set to 'read': .github/workflows/codeql-analysis.yml:24","Warn: jobLevel 'contents' permission set to 'write': .github/workflows/release-drafter.yaml:17","Warn: no topLevel permission defined: .github/workflows/build.yaml:1","Info: topLevel 'contents' permission set to 'read': .github/workflows/checks.yaml:7","Info: topLevel 'actions' permission set to 'read': .github/workflows/codeql-analysis.yml:15","Info: topLevel 'contents' permission set to 'read': .github/workflows/release-drafter.yaml:11"],"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":"Pinned-Dependencies","score":1,"reason":"dependency not pinned by hash detected -- score normalized to 1","details":["Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/build.yaml:15: update your workflow using https://app.stepsecurity.io/secureworkflow/marcelocarlos/datasubst/build.yaml/main?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/build.yaml:20: update your workflow using https://app.stepsecurity.io/secureworkflow/marcelocarlos/datasubst/build.yaml/main?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/build.yaml:41: update your workflow using https://app.stepsecurity.io/secureworkflow/marcelocarlos/datasubst/build.yaml/main?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/build.yaml:47: update your workflow using https://app.stepsecurity.io/secureworkflow/marcelocarlos/datasubst/build.yaml/main?enable=pin","Warn: third-party GitHubAction not pinned by hash: .github/workflows/build.yaml:72: update your workflow using https://app.stepsecurity.io/secureworkflow/marcelocarlos/datasubst/build.yaml/main?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/checks.yaml:15: update your workflow using https://app.stepsecurity.io/secureworkflow/marcelocarlos/datasubst/checks.yaml/main?enable=pin","Warn: third-party GitHubAction not pinned by hash: .github/workflows/checks.yaml:18: update your workflow using https://app.stepsecurity.io/secureworkflow/marcelocarlos/datasubst/checks.yaml/main?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/codeql-analysis.yml:34: update your workflow using https://app.stepsecurity.io/secureworkflow/marcelocarlos/datasubst/codeql-analysis.yml/main?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/codeql-analysis.yml:38: update your workflow using https://app.stepsecurity.io/secureworkflow/marcelocarlos/datasubst/codeql-analysis.yml/main?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/codeql-analysis.yml:49: update your workflow using https://app.stepsecurity.io/secureworkflow/marcelocarlos/datasubst/codeql-analysis.yml/main?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/codeql-analysis.yml:63: update your workflow using https://app.stepsecurity.io/secureworkflow/marcelocarlos/datasubst/codeql-analysis.yml/main?enable=pin","Warn: third-party GitHubAction not pinned by hash: .github/workflows/release-drafter.yaml:22: update your workflow using https://app.stepsecurity.io/secureworkflow/marcelocarlos/datasubst/release-drafter.yaml/main?enable=pin","Warn: containerImage not pinned by hash: Dockerfile:1","Info:   0 out of   9 GitHub-owned GitHubAction dependencies pinned","Info:   0 out of   3 third-party GitHubAction dependencies pinned","Info:   0 out of   1 containerImage dependencies pinned","Info:   1 out of   1 goCommand 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":"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":"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":"License","score":10,"reason":"license file detected","details":["Info: project has a license file: LICENSE:0","Info: FSF or OSI recognized license: Apache License 2.0: 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":0,"reason":"Project has not signed or included provenance with any releases.","details":["Warn: release artifact v0.7.0 not signed: https://api.github.com/repos/marcelocarlos/datasubst/releases/52332939","Warn: release artifact v0.6.0 not signed: https://api.github.com/repos/marcelocarlos/datasubst/releases/42974042","Warn: release artifact v0.5.0 not signed: https://api.github.com/repos/marcelocarlos/datasubst/releases/41354411","Warn: release artifact v0.4.0 not signed: https://api.github.com/repos/marcelocarlos/datasubst/releases/40843418","Warn: release artifact v0.3.1 not signed: https://api.github.com/repos/marcelocarlos/datasubst/releases/40835193","Warn: release artifact v0.7.0 does not have provenance: https://api.github.com/repos/marcelocarlos/datasubst/releases/52332939","Warn: release artifact v0.6.0 does not have provenance: https://api.github.com/repos/marcelocarlos/datasubst/releases/42974042","Warn: release artifact v0.5.0 does not have provenance: https://api.github.com/repos/marcelocarlos/datasubst/releases/41354411","Warn: release artifact v0.4.0 does not have provenance: https://api.github.com/repos/marcelocarlos/datasubst/releases/40843418","Warn: release artifact v0.3.1 does not have provenance: https://api.github.com/repos/marcelocarlos/datasubst/releases/40835193"],"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":7,"reason":"SAST tool detected but not run on all commits","details":["Info: SAST configuration detected: CodeQL","Warn: 0 commits out of 19 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":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"}}]},"last_synced_at":"2025-08-21T04:22:28.569Z","repository_id":51335004,"created_at":"2025-08-21T04:22:28.569Z","updated_at":"2025-08-21T04:22:28.569Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28515418,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-17T17:57:59.192Z","status":"ssl_error","status_checked_at":"2026-01-17T17:57:52.527Z","response_time":85,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5: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":["datasubst","environment-variables","envsubst","gotemplate","json","templating","yaml"],"created_at":"2026-01-17T18:24:14.703Z","updated_at":"2026-01-17T18:24:15.165Z","avatar_url":"https://github.com/marcelocarlos.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# datasubst\n\nA simple [go template](https://golang.org/pkg/text/template/) based tool that supports JSON, YAML and environment variables as data sources.\n\nThis tool has been written as an alternative to `envsubst` in order to support additional data source formats, such as YAML and JSON files. Since it is powered by go template, [built-in functions](https://golang.org/pkg/text/template/#hdr-Functions), loops, conditionals and more can be used for extra flexibility.\n\n## Installation\n\nOn macOS or Linux, a Homebrew formula is available:\n\n```shell\nbrew tap marcelocarlos/tap\nbrew install datasubst\n```\n\nAlternatively, you can install a development version using:\n\n```shell\ngo get github.com/marcelocarlos/datasubst\n```\n\nIf you don't want to install it, you can run `datasubst` via Docker instead:\n\n```shell\ndocker run --rm ghcr.io/marcelocarlos/datasubst:v0\n```\n\n### GitHub Action\n\nThere is also a [setup-datasubst](https://github.com/marcelocarlos/setup-datasubst) action available so you can use\ndatasubst in your GitHub Actions workflow. To use it, just add the following step in you workflow:\n\n```yaml\n- name: Setup datasubst\n  uses: marcelocarlos/setup-datasubst@v1\n  with:\n    version: v0.7.0\n```\n\n## Usage\n\n```shell\n# Using JSON as data source\ndatasubst --json-data examples/basic-data.json -i examples/basic-input.txt\n# Using YAML as data source\ndatasubst --yaml-data examples/basic-data.yaml -i examples/basic-input.txt\n# Using environment variables as data source\nTEST1=\"hello\" TEST2=\"world\" datasubst --input examples/basic-input-env.txt --env-data\n\n# Using stdin - JSON\necho \"v1: {{ .key1 }}\" | datasubst --json-data examples/basic-data.json\n# Using stdin - YAML\necho \"v3: {{ .key2.first.key3 }}\" | datasubst --yaml-data examples/basic-data.yaml\n# Using stdin - env\necho \"{{ .TEST1 }} {{ .TEST2 }}\" | TEST1=\"hello\" TEST2=\"world\" datasubst --env-data\n\n# Specifying JSON subtrees to use (available for JSON and YAML)\necho \"{{ .first.key3 }}\" | datasubst --json-data examples/basic-data.json --subtree .key2\n# Specifying YAML subtrees to use (available for JSON and YAML)\ndatasubst --json-data examples/basic-data.json --subtree .key2 -i examples/basic-input-subtree.txt\n\n# Using additional options, such -s (strict mode) and -d (change delimiters)\necho \"(( .TEST ))\" | TEST=\"hi\" datasubst --env-data -d '((:))' -s\n```\n\nSee [examples](./examples/) for more.\n\n## Build from source\n\n```shell\ngo build -ldflags=-X=main.Version=$(git describe --tags)\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmarcelocarlos%2Fdatasubst","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmarcelocarlos%2Fdatasubst","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmarcelocarlos%2Fdatasubst/lists"}