{"id":20155868,"url":"https://github.com/bruj0/yapi","last_synced_at":"2026-04-17T04:34:21.042Z","repository":{"id":50182662,"uuid":"219966985","full_name":"bruj0/yapi","owner":"bruj0","description":"Using yaml to talk to APIs in an automated, descriptive way.","archived":false,"fork":false,"pushed_at":"2022-12-08T06:50:12.000Z","size":86,"stargazers_count":0,"open_issues_count":1,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2026-02-19T01:52:25.180Z","etag":null,"topics":["api","python3","vault-api","yaml"],"latest_commit_sha":null,"homepage":null,"language":"Python","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/bruj0.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}},"created_at":"2019-11-06T10:06:39.000Z","updated_at":"2021-12-30T00:19:39.000Z","dependencies_parsed_at":"2023-01-24T22:31:13.973Z","dependency_job_id":null,"html_url":"https://github.com/bruj0/yapi","commit_stats":null,"previous_names":[],"tags_count":3,"template":false,"template_full_name":null,"purl":"pkg:github/bruj0/yapi","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bruj0%2Fyapi","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bruj0%2Fyapi/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bruj0%2Fyapi/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bruj0%2Fyapi/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/bruj0","download_url":"https://codeload.github.com/bruj0/yapi/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bruj0%2Fyapi/sbom","scorecard":{"id":255085,"data":{"date":"2025-08-11","repo":{"name":"github.com/bruj0/yapi","commit":"c5541631e658e2df798e251a11a6323a7a64f888"},"scorecard":{"version":"v5.2.1-40-gf6ed084d","commit":"f6ed084d17c9236477efd66e5b258b9d4cc7b389"},"score":2.5,"checks":[{"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":"Code-Review","score":0,"reason":"Found 0/24 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":"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":"Token-Permissions","score":0,"reason":"detected GitHub workflow tokens with excessive permissions","details":["Warn: no topLevel permission defined: .github/workflows/publish-to-pypi.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":"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/publish-to-pypi.yml:9: update your workflow using https://app.stepsecurity.io/secureworkflow/bruj0/yapi/publish-to-pypi.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/publish-to-pypi.yml:11: update your workflow using https://app.stepsecurity.io/secureworkflow/bruj0/yapi/publish-to-pypi.yml/master?enable=pin","Warn: third-party GitHubAction not pinned by hash: .github/workflows/publish-to-pypi.yml:24: update your workflow using https://app.stepsecurity.io/secureworkflow/bruj0/yapi/publish-to-pypi.yml/master?enable=pin","Warn: third-party GitHubAction not pinned by hash: .github/workflows/publish-to-pypi.yml:30: update your workflow using https://app.stepsecurity.io/secureworkflow/bruj0/yapi/publish-to-pypi.yml/master?enable=pin","Warn: pipCommand not pinned by hash: .github/workflows/publish-to-pypi.yml:16","Warn: pipCommand not pinned by hash: .github/workflows/publish-to-pypi.yml:17","Warn: pipCommand not pinned by hash: .github/workflows/publish-to-pypi.yml:18","Info:   0 out of   2 GitHub-owned GitHubAction dependencies pinned","Info:   0 out of   2 third-party GitHubAction dependencies pinned","Info:   0 out of   3 pipCommand 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":"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":"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":"Vulnerabilities","score":0,"reason":"10 existing vulnerabilities detected","details":["Warn: Project is vulnerable to: PYSEC-2022-42986 / GHSA-43fp-rhv2-5gv8","Warn: Project is vulnerable to: PYSEC-2023-135 / GHSA-xqr8-7jwr-rhp7","Warn: Project is vulnerable to: PYSEC-2024-60 / GHSA-jjg7-2v4v-x38h","Warn: Project is vulnerable to: GHSA-9hjg-9r4m-mvj7","Warn: Project is vulnerable to: GHSA-9wx4-h78v-vm56","Warn: Project is vulnerable to: PYSEC-2023-74 / GHSA-j8r2-6x86-q33q","Warn: Project is vulnerable to: GHSA-34jh-p97f-mpxf","Warn: Project is vulnerable to: PYSEC-2023-212 / GHSA-g4mx-q9vg-27p4","Warn: Project is vulnerable to: GHSA-pq67-6m6q-mj2v","Warn: Project is vulnerable to: PYSEC-2023-192 / GHSA-v845-jxx5-vc9f"],"documentation":{"short":"Determines if the project has open, known unfixed vulnerabilities.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#vulnerabilities"}},{"name":"SAST","score":0,"reason":"SAST tool is not run on all commits -- score normalized to 0","details":["Warn: 0 commits out of 8 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"}}]},"last_synced_at":"2025-08-17T09:29:13.128Z","repository_id":50182662,"created_at":"2025-08-17T09:29:13.128Z","updated_at":"2025-08-17T09:29:13.128Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":31915363,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-16T18:22:33.417Z","status":"online","status_checked_at":"2026-04-17T02:00:06.879Z","response_time":62,"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":["api","python3","vault-api","yaml"],"created_at":"2024-11-13T23:36:26.484Z","updated_at":"2026-04-17T04:34:21.025Z","avatar_url":"https://github.com/bruj0.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Description of yapi\n\nIt allows to use declarative language (yaml) to talk to APIs and to save the response for future calls.\n\nThe main use case is to talk to [HashiCorp Vault API](https://www.vaultproject.io/api/overview.html).\n\nIt is heavily based on [Tavern-ci](https://github.com/taverntesting/tavern)\n# Installing it\n```\npip install yapi-ci\n```\n# How to use it\nFor this example we will use `http://httpbin.org/put` as `VAULT_ADDR`, this service will echo everything we send plus extra information about our request.\n# Example file vault-init.yaml\n```yaml\n---\nstages:\n  - name: 01-Init Vault\n    request:\n      url: \"{env_vars.VAULT_ADDR}\"\n      method: PUT\n      json:\n        secret_shares: 1\n        secret_threshold: 1\n        mykeys:\n           - 7f921414b13ad05eb844dc349423765d857e8175b48c5854ada0e24e96924ac2\n    response:\n      status_code: 200\n      save:\n        $ext:\n          function: extensions.save_response\n          extra_kwargs:\n            path: \"examples/data/{env_vars.VAULT_CLUSTER}/init.json\"\n      body:\n        headers: headers\n        json_keys_list: json.mykeys\n        json_secret_shares: json.secret_shares\n        json_full: json\n  - name: 02-Unseal Vault\n    request:\n      url: \"{env_vars.VAULT_ADDR}\"\n      method: PUT\n      json:\n        mykeys: \"ext.json.mykeys.to_list()\"\n        myheaders: \"resp.headers.to_dict()\"\n        json_keys_list: \"resp.json_keys_list.to_list()[0]\"\n        json_secret_shares: \"test string {resp.json_secret_shares}\"\n        json_full: \"resp.json_full.to_dict()\"\n        $ext:\n          function: extensions.read_json\n          extra_kwargs:\n            path: \"examples/data/{env_vars.VAULT_CLUSTER}/init.json\"\n            sub_vars: True\n    response:\n      status_code: 200\n      save:\n        $ext:\n          function: extensions.save_response\n          extra_kwargs:\n            path: \"examples/data/{env_vars.VAULT_CLUSTER}/unsealed_response.json\"\n```\n\n### The first stage called `01-Init Vault`\n- `env_vars.VAULT_ADDR` will be replaced by the enviromental variable `$VAULT_ADDR` as is the same with all variables starting with `env_vars.`\n- Do a `GET` call to `url`\n- The json sent to the API will be:\n```json\n{\n    \"mykeys\": [\n        \"7f921414b13ad05eb844dc349423765d857e8175b48c5854ada0e24e96924ac2\"\n    ],\n    \"secret_shares\": 1,\n    \"secret_threshold\": 1\n}\n```\n- It expects a HTTP response of `200` or it will error out.\n- It will save the output of the response as a json file under `data/{env_vars.VAULT_CLUSTER}/init.json`\n- It will try to convert the response to json and save them in variables for the next stage:\n```yaml\n    response:\n    ...\n      body:\n        headers: headers\n        json_keys_list: json.mykeys\n        json_secret_shares: json.secret_shares\n        json_full: json\n```\n### The second stage called `02-Unseal Vault` \n- Replace replace variables that start with `{env_vars.}` with environmental variables.\n- Insert the variables saved in previous stages from `resp.` converting them to a python dictionary or list depending if we want a json object or array.\n- Variables that have `{}` are used to `format` the string instead of replacing it with its value.\n- \n```yaml\n      json:\n        mykeys: \"ext.json.mykeys.to_list()\"\n        myheaders: \"resp.headers.to_dict()\"\n        json_keys_list: \"resp.json_keys_list.to_list()[0]\"\n        json_secret_shares: \"test string {resp.json_secret_shares}\"\n        json_full: \"resp.json_full.to_dict()\"\n```\n- Read `data/{env_vars.VAULT_CLUSTER}/init.json` and replace variables that start with `ext.` in the body with data from the json when `sub_vars` is set to `True`.\n```json\n  \"json\": {\n    \"mykeys\": [\n      \"7f921414b13ad05eb844dc349423765d857e8175b48c5854ada0e24e96924ac2\"\n    ],\n```\n\nBecomes:\n\n```yaml\n    mykeys: \"ext.json.mykeys.to_list()\"\n```\n\n- Do a `PUT` call to `url`\n- With the json:\n```json\n{\n    \"json_full\": {\n        \"mykeys\": [\n            \"7f921414b13ad05eb844dc349423765d857e8175b48c5854ada0e24e96924ac2\"\n        ],\n        \"secret_shares\": 1,\n        \"secret_threshold\": 1\n    },\n    \"json_keys_list\": \"7f921414b13ad05eb844dc349423765d857e8175b48c5854ada0e24e96924ac2\",\n    \"json_secret_shares\": \"test string 1\",\n    \"myheaders\": {\n        \"Accept-Encoding\": \"identity\",\n        \"Content-Length\": \"123\",\n        \"Content-Type\": \"application/json\",\n        \"Host\": \"httpbin.org\"\n    },\n    \"mykeys\": [\n        \"7f921414b13ad05eb844dc349423765d857e8175b48c5854ada0e24e96924ac2\"\n    ]\n}\n```\n- It will expect a `200` response code or error out.\n- It will save the response to `data/{env_vars.VAULT_CLUSTER}/unsealed_response.json`\n\n\n## TODO \n- [ ] Add Automated testing\n- [ ] Add version tagging\n- [ ] Add package automatic building from tags\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbruj0%2Fyapi","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbruj0%2Fyapi","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbruj0%2Fyapi/lists"}