{"id":20238458,"url":"https://github.com/smallstep/ansible-collection-sigstore","last_synced_at":"2025-04-10T19:34:51.672Z","repository":{"id":182885871,"uuid":"668024343","full_name":"smallstep/ansible-collection-sigstore","owner":"smallstep","description":"An Ansible collection for using Sigstore to verify file signatures","archived":false,"fork":false,"pushed_at":"2024-04-16T17:18:49.000Z","size":55,"stargazers_count":4,"open_issues_count":0,"forks_count":1,"subscribers_count":10,"default_branch":"main","last_synced_at":"2025-03-24T17:13:20.134Z","etag":null,"topics":["ansible","ansible-collection","ansible-module","ansible-role","sigstore"],"latest_commit_sha":null,"homepage":"https://smallstep.com","language":"Python","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/smallstep.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":"CODEOWNERS","security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2023-07-18T20:58:47.000Z","updated_at":"2023-08-30T19:32:22.000Z","dependencies_parsed_at":"2024-04-16T18:52:07.098Z","dependency_job_id":null,"html_url":"https://github.com/smallstep/ansible-collection-sigstore","commit_stats":null,"previous_names":["smallstep/ansible-collection-sigstore"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/smallstep%2Fansible-collection-sigstore","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/smallstep%2Fansible-collection-sigstore/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/smallstep%2Fansible-collection-sigstore/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/smallstep%2Fansible-collection-sigstore/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/smallstep","download_url":"https://codeload.github.com/smallstep/ansible-collection-sigstore/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248281423,"owners_count":21077423,"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","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":["ansible","ansible-collection","ansible-module","ansible-role","sigstore"],"created_at":"2024-11-14T08:34:15.382Z","updated_at":"2025-04-10T19:34:51.646Z","avatar_url":"https://github.com/smallstep.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Ansible Collection - smallstep.sigstore\n\nThis is collection provides the `smallstep.sigstore.sigstore_verify` module which requires the [sigstore](https://github.com/sigstore/sigstore-python) python package. This module can be used verify the signature on an artifact that was signed by [Sigstore](https://www.sigstore.dev/). It also provides the `smallstep.sigstore.verify_artifact` role which can be included in playbooks to verify the Sigstore signature on an artifact and it can ensure that [sigstore](https://github.com/sigstore/sigstore-python) python package is installed and it can be configured to fail the playbook run if the verification of the signature fails.\n\n## Requirements\n\n* `ansible-galaxy collection install smallstep.sigstore` (on control node)\n* `pip install sigstore` (on servers)\n\n## Module: smallstep.sigstore.sigstore_verify\n\n### Usage\n\nHere is an example of using the module:\n\n```yaml\n- name: Verify an artifact with Sigstore\n  smallstep.sigstore.sigstore_verify:\n    file: /path/to/foo.tar.gz\n    certificate: /path/to/foo.tar.gz.pem\n    signature: /path/to/foo.tar.gz.sig\n    cert_identity: user@example.com\n    cert_oidc_issuer: https://oidc.example.com\n  register: sigstore_verify_results\n```\n\n### Return data\n\nIf you register the results from `smallstep.sigstore.sigstore_verify` it will return the `file`, `certificate`, `signature`, `cert_identity`, and `cert_oidc_issuer` (useful for debugging) and `verification_status` will return `True` or `False`. If it returns `False`, it will also return `verification_failure_reason` which is the reason for the error from [sigstore](https://github.com/sigstore/sigstore-python). Here are two examples of the return data.\n\n#### Verification successful\n\n```json\n\"cert_identity\": \"https://github.com/smallstep/cli/.github/workflows/release.yml@refs/tags/v0.24.4\",\n\"cert_oidc_issuer\": \"https://token.actions.githubusercontent.com\",\n\"certificate\": \"/files/checksums.txt.pem\",\n\"file\": \"/files/checksums.txt\",\n\"signature\": \"/files/checksums.txt.sig\",\n\"verification_status\": \"True\"\n```\n\n#### Verification failure\n\n```json\n\"cert_identity\": \"https://github.com/smallstep/cli/.github/workflows/release.yml@refs/tags/v0.24.4\",\n\"cert_oidc_issuer\": \"https://token.actions.githubusercontent.com\",\n\"certificate\": \"/files/checksums.txt.pem\",\n\"file\": \"/files/checksums.txt\",\n\"signature\": \"/files/checksums.txt.sig.bad\",\n\"verification_failure_reason\": \"Signature is invalid for input\",\n\"verification_status\": \"False\"\n```\n\n## Role: smallstep.sigstore.verify_artifact\n\n### Role variables\n\n```yaml\nverify_artifact_file: /path/to/artifact.tar.gz # Has to be full path to the archive (Required)\nverify_artifact_certificate: /path/to/artifact.tar.gz.pem # Has to be full path to the certificate and it can be an ASCII PEM or Base64 encoded PEM (Required)\nverify_artifact_signature: /path/to/artifact.tar.gz.sig # Has to be full path to the archive signature file (Required)\nverify_artifact_cert_identity: user@example.com # The identity to check for in the certificate's Subject Alternative Name (Required)\nverify_artifact_cert_oidc_issuer: https://oidc.example.com # The OIDC issuer URL to check for in the certificate's OIDC issuer extension (Required)\nverify_artifact_fail_run: True # If set to False it will _not_ fail the playbook run if verification fails (Defaults to True)\nverify_artifact_pip_sigstore_install: True # Ensure the pip sigstore package is installed (Defaults to True)\nverify_artifact_pip_sigstore_version: 2.0.1 # Specific version to install. (Defaults to 2.0.1)\n```\n\n### Example Playbook\n\n```yaml\n- hosts: localhost\n  tasks:\n  - name: Verify the foo.tar.gz artifact using Sigstore and fail if it doesn't pass verification\n    ansible.builtin.include_role:\n      name: smallstep.sigstore.verify_artifact\n    vars:\n      verify_artifact_file: /path/to/foo.tar.gz\n      verify_artifact_certificate: /path/to/foo.tar.gz.pem\n      verify_artifact_signature: /path/to/foo.tar.gz.sig\n      verify_artifact_cert_identity: user@example.com\n      verify_artifact_cert_oidc_issuer: https://oidc.example.com\n      verify_artifact_fail_run: True\n      verify_artifact_pip_sigstore_install: True\n      verify_artifact_pip_sigstore_version: 2.0.1\n```\n\n## Testing\n\n### Install the collection locally\n\n```bash\nansible-galaxy collection build --output-path /tmp --force\nansible-galaxy collection install /tmp/smallstep-sigstore-0.0.1.tar.gz --force\n```\n\nYou can then use the example playbook to test your changes. See `tests/integration/targets/sigstore_verify/files/` for some test data.\n\n### ansible-test sanity\n\n```bash\nansible-test sanity --docker --skip-test validate-modules\n```\n\n### ansible-test integration*\n\n```bash\nansible-test integration --docker\n```\n\n## License\n\n[Apache License Version 2.0](http://www.apache.org/licenses/LICENSE-2.0)\n\nCopyright 2023 Smallstep Labs Inc.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsmallstep%2Fansible-collection-sigstore","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsmallstep%2Fansible-collection-sigstore","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsmallstep%2Fansible-collection-sigstore/lists"}