{"id":14256956,"url":"https://github.com/actions/attest","last_synced_at":"2026-02-26T23:00:50.699Z","repository":{"id":236372683,"uuid":"760701061","full_name":"actions/attest","owner":"actions","description":"Action for generating attestations for workflow artifacts","archived":false,"fork":false,"pushed_at":"2026-02-20T17:02:17.000Z","size":11947,"stargazers_count":66,"open_issues_count":11,"forks_count":28,"subscribers_count":5,"default_branch":"main","last_synced_at":"2026-02-22T19:28:41.031Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"TypeScript","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/actions.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":"CODEOWNERS","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":"2024-02-20T19:22:19.000Z","updated_at":"2026-02-22T06:07:16.000Z","dependencies_parsed_at":"2024-07-30T04:18:56.834Z","dependency_job_id":"2475010e-64fa-4d6a-9693-3e0a117c3d52","html_url":"https://github.com/actions/attest","commit_stats":{"total_commits":109,"total_committers":5,"mean_commits":21.8,"dds":0.4678899082568807,"last_synced_commit":"c15cb6aedcf9dbc95ea376c97de8eeac7c67aac3"},"previous_names":["actions/attest"],"tags_count":27,"template":false,"template_full_name":"actions/typescript-action","purl":"pkg:github/actions/attest","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/actions%2Fattest","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/actions%2Fattest/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/actions%2Fattest/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/actions%2Fattest/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/actions","download_url":"https://codeload.github.com/actions/attest/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/actions%2Fattest/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29827684,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-25T14:53:59.163Z","status":"ssl_error","status_checked_at":"2026-02-25T14:53:23.002Z","response_time":61,"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":"2024-08-22T07:01:38.835Z","updated_at":"2026-02-26T23:00:50.687Z","avatar_url":"https://github.com/actions.png","language":"TypeScript","readme":"# `actions/attest`\n\nGenerate signed attestations for workflow artifacts. Internally powered by the\n[@actions/attest][1] package.\n\nAttestations bind some subject (a named artifact along with its digest) to a\npredicate (some assertion about that subject) using the [in-toto][2] format.\n[Predicates][3] consist of a type URI and a JSON object containing\ntype-dependent parameters.\n\nA verifiable signature is generated for the attestation using a short-lived\n[Sigstore][4]-issued signing certificate. If the repository initiating the\nGitHub Actions workflow is public, the public-good instance of Sigstore will be\nused to generate the attestation signature. If the repository is\nprivate/internal, it will use the GitHub private Sigstore instance.\n\nOnce the attestation has been created and signed, it will be uploaded to the GH\nattestations API and associated with the repository from which the workflow was\ninitiated.\n\nWhen an attestation is created, the attestation is stored on the local\nfilesystem used by the runner. For each attestation created, the filesystem path\nwill be appended to the file `${RUNNER_TEMP}/created_attestation_paths.txt`.\nThis can be used to gather all attestations created by all jobs during a the\nworkflow.\n\nAttestations can be verified using the [`attestation` command in the GitHub\nCLI][5].\n\nSee [Using artifact attestations to establish provenance for builds][9] for more\ninformation on artifact attestations.\n\n\u003c!-- prettier-ignore-start --\u003e\n\u003e [!NOTE]\n\u003e Artifact attestations are available in public repositories for all\n\u003e current GitHub plans.\n\u003e\n\u003e To use artifact attestations in private or internal repositories, you must\n\u003e be on a GitHub Enterprise Cloud plan.\n\u003e\n\u003e Artifact attestations are NOT supported on GitHub Enterprise Server.\n\u003c!-- prettier-ignore-end --\u003e\n\n## Attestation Modes\n\nThis action supports three attestation modes, automatically detected based on\nthe inputs you provide:\n\n\u003c!-- markdownlint-disable MD013 --\u003e\n\n| Mode           | When Used                                              | Description                                      |\n| -------------- | ------------------------------------------------------ | ------------------------------------------------ |\n| **Provenance** | No `sbom-path` or predicate inputs                     | Auto-generates [SLSA build provenance][10]       |\n| **SBOM**       | `sbom-path` is provided                                | Creates attestation from SPDX or CycloneDX SBOM  |\n| **Custom**     | `predicate-type`/`predicate`/`predicate-path` provided | User-supplied predicate                          |\n\n\u003c!-- markdownlint-enable MD013 --\u003e\n\n## Usage\n\nWithin the GitHub Actions workflow which builds some artifact you would like to\nattest:\n\n1. Ensure that the following permissions are set:\n\n   ```yaml\n   permissions:\n     id-token: write\n     attestations: write\n     artifact-metadata: write\n   ```\n\n   The `id-token` permission gives the action the ability to mint the OIDC token\n   necessary to request a Sigstore signing certificate. The `attestations`\n   permission is necessary to persist the attestation. The `artifact-metadata`\n   permission is necessary to create the artifact storage record.\n\n1. Add the following to your workflow after your artifact has been built:\n\n   ```yaml\n   - uses: actions/attest@v4\n     with:\n       subject-path: '\u003cPATH TO ARTIFACT\u003e'\n   ```\n\n   By default, this generates a [SLSA build provenance][10] attestation. For\n   SBOM or custom attestations, see the [Attestation Modes](#attestation-modes)\n   section.\n\n### Inputs\n\nSee [action.yml](action.yml)\n\n```yaml\n- uses: actions/attest@v4\n  with:\n    # Path to the artifact serving as the subject of the attestation. Must\n    # specify exactly one of \"subject-path\", \"subject-digest\", or\n    # \"subject-checksums\". May contain a glob pattern or list of paths\n    # (total subject count cannot exceed 1024).\n    subject-path:\n\n    # SHA256 digest of the subject for the attestation. Must be in the form\n    # \"sha256:hex_digest\" (e.g. \"sha256:abc123...\"). Must specify exactly one\n    # of \"subject-path\", \"subject-digest\", or \"subject-checksums\".\n    subject-digest:\n\n    # Subject name as it should appear in the attestation. Required when\n    # identifying the subject with the \"subject-digest\" input.\n    subject-name:\n\n    # Path to checksums file containing digest and name of subjects for\n    # attestation. Must specify exactly one of \"subject-path\", \"subject-digest\",\n    # or \"subject-checksums\".\n    subject-checksums:\n\n    # Path to the JSON-formatted SBOM file (SPDX or CycloneDX) to attest.\n    # File size cannot exceed 16MB. When provided, creates an SBOM attestation.\n    # Cannot be used together with \"predicate-type\", \"predicate\", or\n    # \"predicate-path\".\n    sbom-path:\n\n    # URI identifying the type of the predicate. Required when using \"predicate\"\n    # or \"predicate-path\" for custom attestations.\n    predicate-type:\n\n    # String containing the value for the attestation predicate. String length\n    # cannot exceed 16MB. Must supply exactly one of \"predicate-path\" or\n    # \"predicate\" when creating custom attestations.\n    predicate:\n\n    # Path to the file which contains the content for the attestation predicate.\n    # File size cannot exceed 16MB. Must supply exactly one of \"predicate-path\"\n    # or \"predicate\" when creating custom attestations.\n    predicate-path:\n\n    # Whether to push the attestation to the image registry. Requires that the\n    # \"subject-name\" parameter specify the fully-qualified image name and that\n    # the \"subject-digest\" parameter be specified. Defaults to false.\n    push-to-registry:\n\n    # Whether to create a storage record for the artifact.\n    # Requires that push-to-registry is set to true.\n    # Requires that the \"subject-name\" parameter specify the fully-qualified\n    # image name. Defaults to true.\n    create-storage-record:\n\n    # Whether to attach a list of generated attestations to the workflow run\n    # summary page. Defaults to true.\n    show-summary:\n\n    # The GitHub token used to make authenticated API requests. Default is\n    # ${{ github.token }}\n    github-token:\n```\n\n### Outputs\n\n\u003c!-- markdownlint-disable MD013 --\u003e\n\n| Name                 | Description                                                    | Example                                          |\n| -------------------  | -------------------------------------------------------------- | ------------------------------------------------ |\n| `attestation-id`     | GitHub ID for the attestation                                  | `123456`                                         |\n| `attestation-url`    | URL for the attestation summary                                | `https://github.com/foo/bar/attestations/123456` |\n| `bundle-path`        | Absolute path to the file containing the generated attestation | `/tmp/attestation.json`                          |\n| `storage-record-ids` | GitHub IDs for the storage records                             | `987654`                                         |\n\n\u003c!-- markdownlint-enable MD013 --\u003e\n\nAttestations are saved in the JSON-serialized [Sigstore bundle][6] format.\n\nIf multiple subjects are being attested at the same time, a single attestation\nwill be created with references to each of the supplied subjects.\n\n## Attestation Limits\n\n### Subject Limits\n\nNo more than 1024 subjects can be attested at the same time.\n\n### Predicate Limits\n\nWhether supplied via the `predicate` or `predicatePath` input, the predicate\nstring cannot exceed 16MB.\n\n## Examples\n\n### Provenance Attestation (Default)\n\nThe simplest use case - just specify the artifact path and a SLSA build\nprovenance attestation is automatically generated:\n\n```yaml\nname: build-attest-provenance\n\non:\n  workflow_dispatch:\n\njobs:\n  build:\n    permissions:\n      id-token: write\n      contents: read\n      attestations: write\n\n    steps:\n      - name: Checkout\n        uses: actions/checkout@v4\n      - name: Build artifact\n        run: make my-app\n      - name: Attest\n        uses: actions/attest@v4\n        with:\n          subject-path: '${{ github.workspace }}/my-app'\n```\n\n### SBOM Attestation\n\nTo create an SBOM attestation, provide the path to an SPDX or CycloneDX JSON\nfile:\n\n```yaml\n- name: Generate SBOM\n  run: syft . -o spdx-json \u003e sbom.spdx.json\n\n- uses: actions/attest@v4\n  with:\n    subject-path: '${{ github.workspace }}/my-app'\n    sbom-path: '${{ github.workspace }}/sbom.spdx.json'\n```\n\n### Custom Attestation\n\nFor custom attestations, provide your own predicate type and content:\n\n```yaml\n- uses: actions/attest@v4\n  with:\n    subject-path: '${{ github.workspace }}/my-app'\n    predicate-type: 'https://example.com/predicate/v1'\n    predicate: '{}'\n```\n\n### Identify Multiple Subjects\n\nIf you are generating multiple artifacts, you can attest all of them at the same\ntime by using a wildcard in the `subject-path` input.\n\n```yaml\n- uses: actions/attest@v4\n  with:\n    subject-path: 'dist/**/my-bin-*'\n    predicate-type: 'https://example.com/predicate/v1'\n    predicate: '{}'\n```\n\nFor supported wildcards along with behavior and documentation, see\n[@actions/glob][8] which is used internally to search for files.\n\nAlternatively, you can explicitly list multiple subjects with either a comma or\nnewline delimited list:\n\n```yaml\n- uses: actions/attest@v4\n  with:\n    subject-path: 'dist/foo, dist/bar'\n```\n\n```yaml\n- uses: actions/attest@v4\n  with:\n    subject-path: |\n      dist/foo\n      dist/bar\n```\n\n### Identify Subjects with Checksums File\n\nIf you are using tools like\n[goreleaser](https://goreleaser.com/customization/checksum/) or\n[jreleaser](https://jreleaser.org/guide/latest/reference/checksum.html) which\ngenerate a checksums file you can identify the attestation subjects by passing\nthe path of the checksums file to the `subject-checksums` input. Each of the\nartifacts identified in the checksums file will be listed as a subject for the\nattestation.\n\n```yaml\n- name: Calculate artifact digests\n  run: |\n    shasum -a 256 foo_0.0.1_* \u003e subject.checksums.txt\n\n- uses: actions/attest@v4\n  with:\n    subject-checksums: subject.checksums.txt\n```\n\n\u003c!-- markdownlint-disable MD038 --\u003e\n\nThe file referenced by the `subject-checksums` input must conform to the same\nformat used by the shasum tools. Each subject should be listed on a separate\nline including the hex-encoded digest (either SHA256 or SHA512), a space, a\nsingle character flag indicating either binary (`*`) or text (` `) input mode,\nand the filename.\n\n\u003c!-- markdownlint-enable MD038 --\u003e\n\n```text\nb569bf992b287f55d78bf8ee476497e9b7e9d2bf1c338860bfb905016218c740  foo_0.0.1_darwin_amd64\na54fc515e616cac7fcf11a49d5c5ec9ec315948a5935c1e11dd610b834b14dde  foo_0.0.1_darwin_arm64\n```\n\n### Container Image\n\nWhen working with container images you can invoke the action with the\n`subject-name` and `subject-digest` inputs.\n\nIf you want to publish the attestation to the container registry with the\n`push-to-registry` option, it is important that the `subject-name` specify the\nfully-qualified image name (e.g. \"ghcr.io/user/app\" or\n\"acme.azurecr.io/user/app\"). Do NOT include a tag as part of the image name --\nthe specific image being attested is identified by the supplied digest.\n\nIf the `push-to-registry` option is set to true, the Action will also\nemit an Artifact Metadata Storage Record. If you do not want to emit a\nstorage record, set `create-storage-record` to `false`.\n\n\u003e **NOTE**: When pushing to Docker Hub, please use \"docker.io\" as the registry\n\u003e portion of the image name.\n\n```yaml\nname: build-attested-image\n\non:\n  push:\n    branches: [main]\n\njobs:\n  build:\n    runs-on: ubuntu-latest\n    permissions:\n      id-token: write\n      packages: write\n      contents: read\n      attestations: write\n      artifact-metadata: write\n    env:\n      REGISTRY: ghcr.io\n      IMAGE_NAME: ${{ github.repository }}\n\n    steps:\n      - name: Checkout\n        uses: actions/checkout@v4\n      - name: Login to GitHub Container Registry\n        uses: docker/login-action@v3\n        with:\n          registry: ${{ env.REGISTRY }}\n          username: ${{ github.actor }}\n          password: ${{ secrets.GITHUB_TOKEN }}\n      - name: Build and push image\n        id: push\n        uses: docker/build-push-action@v5.0.0\n        with:\n          context: .\n          push: true\n          tags: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:latest\n      - name: Attest\n        uses: actions/attest@v4\n        id: attest\n        with:\n          subject-name: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}\n          subject-digest: ${{ steps.push.outputs.digest }}\n          push-to-registry: true\n```\n\n[1]: https://github.com/actions/toolkit/tree/main/packages/attest\n[2]: https://github.com/in-toto/attestation/tree/main/spec/v1\n[3]:\n  https://github.com/in-toto/attestation/tree/main/spec/predicates#in-toto-attestation-predicates\n[4]: https://www.sigstore.dev/\n[5]: https://cli.github.com/manual/gh_attestation_verify\n[6]:\n  https://github.com/sigstore/protobuf-specs/blob/main/protos/sigstore_bundle.proto\n[8]: https://github.com/actions/toolkit/tree/main/packages/glob#patterns\n[9]:\n  https://docs.github.com/en/actions/security-guides/using-artifact-attestations-to-establish-provenance-for-builds\n[10]: https://slsa.dev/spec/v1.0/provenance\n","funding_links":[],"categories":["TypeScript"],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Factions%2Fattest","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Factions%2Fattest","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Factions%2Fattest/lists"}