{"id":35109047,"url":"https://github.com/edvgui/inmanta-module-sops","last_synced_at":"2026-01-25T18:03:09.586Z","repository":{"id":330701321,"uuid":"1121824223","full_name":"edvgui/inmanta-module-sops","owner":"edvgui","description":"Module to interface with sops, and easily extract secrets defined in a sops file","archived":false,"fork":false,"pushed_at":"2026-01-23T20:24:57.000Z","size":24,"stargazers_count":0,"open_issues_count":1,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2026-01-24T09:20:11.022Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/edvgui.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":null,"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,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2025-12-23T16:04:09.000Z","updated_at":"2026-01-23T20:25:01.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/edvgui/inmanta-module-sops","commit_stats":null,"previous_names":["edvgui/inmanta-module-sops"],"tags_count":2,"template":false,"template_full_name":null,"purl":"pkg:github/edvgui/inmanta-module-sops","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/edvgui%2Finmanta-module-sops","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/edvgui%2Finmanta-module-sops/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/edvgui%2Finmanta-module-sops/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/edvgui%2Finmanta-module-sops/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/edvgui","download_url":"https://codeload.github.com/edvgui/inmanta-module-sops/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/edvgui%2Finmanta-module-sops/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28756432,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-25T16:32:25.380Z","status":"ssl_error","status_checked_at":"2026-01-25T16:32:09.189Z","response_time":113,"last_error":"SSL_read: 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":[],"created_at":"2025-12-27T19:03:03.465Z","updated_at":"2026-01-25T18:03:09.581Z","avatar_url":"https://github.com/edvgui.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Sops module\n\n[![pypi version](https://img.shields.io/pypi/v/inmanta-module-sops.svg)](https://pypi.python.org/pypi/inmanta-module-sops/)\n[![build status](https://img.shields.io/github/actions/workflow/status/edvgui/inmanta-module-sops/continuous-integration.yml)](https://github.com/edvgui/inmanta-module-sops/actions)\n\n## How to use\n\n1. Create gpg key on the orchestrator\n\n```console\ninmanta@96abdaa7233f:~$ gpg --full-generate-key\n```\n\n2. Generate key on the dev machine (same as step above)\n\n3. Import orchestrator key in dev keyring\n\n```console\n# On the orchestrator\ninmanta@96abdaa7233f:~$ gpg --armor --export email \u003e orchestrator.gpg\n\n# On the dev machine\nguillaume@framework:~$ gpg --import orchestrator.gpg\n```\n\n4. Create keyring file with sops providing fingerprint of dev key and orchestrator key.  Edit it using sops binary.\n\n```console\nguillaume@framework:/tmp/sops-test$ echo \"{}\" \u003e test.yml\nguillaume@framework:/tmp/sops-test$ sops --pgp 49CAF9DCDAC1643FCBDFCAB93BF8D3BC3B08C360,6F405B4881FF1DE18A4696641BCDCFE5D361E275 -e test.yml \u003e test.encrypted.yml\nguillaume@framework:/tmp/sops-test$ sops edit test.encrypted.yml\n```\n\n5. Reference existing value in sops file in the model.\n\n\u003cx-example-simple\u003e\n\n```\nimport mitogen\nimport files\nimport files::host\nimport sops\n\nimport std\n\nhost = std::Host(\n    name=\"localhost\",\n    os=std::linux,\n    via=mitogen::Local(),\n)\n\nfiles::TextFile(\n    host=host,\n    path='/example/folder/a.secret',\n    owner='guillaume',\n    group='guillaume',\n    purged=false,\n    # The content of the file should be the password of user \"a\"\n    content=sops::create_decrypted_value_reference(\n        # The password is located in the decrypted vault file\n        sops::create_decrypted_file_reference(\n            # The vault should be decrypted with sops, which is\n            # installed by this reference.\n            sops::create_sops_binary_reference(),\n            # The encrypted content of the file can be extracted\n            # using this reference\n            files::create_text_file_content_reference(\n                \"file:///example/folder/test.yml\",\n            ),\n            'yml',\n        ),\n        \"users[name=a].password\",\n    ),\n)\n\n```\n\n\u003c/x-example-simple\u003e\n\n6. (Alternatively) Reference value in sops file, create it if it doesn't exist.\n\n\u003cx-example-generate\u003e\n\n```\nimport mitogen\nimport files\nimport files::host\nimport sops\n\nimport std\n\nhost = std::Host(\n    name=\"localhost\",\n    os=std::linux,\n    via=mitogen::Local(),\n)\n\nfiles::TextFile(\n    host=host,\n    path='/example/folder/a.secret',\n    owner='guillaume',\n    group='guillaume',\n    purged=false,\n    # The content of the file should be the password of user \"a\", if no password\n    # for user a has been defined, create one with default value \"b\"\n    content=sops::create_value_in_vault(\n        # The vault should be decrypted with sops, which is\n        # installed by this reference.\n        sops::create_sops_binary_reference(),\n        # The vault is available at this path\n        \"file:///example/folder/test.yml\",\n        # This is the location of the password within the vault\n        \"users[name=a].password\",\n        default=\"b\",\n    ),\n)\n\n```\n\n\u003c/x-example-generate\u003e\n\n\n## Running tests\n\n1. Set up a new virtual environment using uv and install the dependencies.\n\n```bash\nuv venv -p 3.12\nmake install\n```\n\n2. Run tests\n\n```bash\nuv run pytest tests\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fedvgui%2Finmanta-module-sops","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fedvgui%2Finmanta-module-sops","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fedvgui%2Finmanta-module-sops/lists"}