Skip to content

Conversation

bdehamer
Copy link
Contributor

@bdehamer bdehamer commented Feb 26, 2025

Updates the buildSLSAProvenancePredicate function in the @actions/attest package to populate the workflow.ref field from the ref claim in the OIDC token.

For most events which trigger a workflow run (push, release, workflow_dispatch, etc) this will have no impact on generated predicate statement. For other events which may be triggered from ref-less commits, this will ensure that the populated value more accurately reflects the state of the workflow run.

Updates the `buildSLSAProvenancePredicate` function to populate the
`workflow.ref` field from the `ref` claim in the OIDC token.

Signed-off-by: Brian DeHamer <bdehamer@github.com>
@bdehamer bdehamer force-pushed the bdehamer/workflow-ref branch from c59c9d5 to 0bc338a Compare February 26, 2025 16:47
@bdehamer bdehamer marked this pull request as ready for review February 26, 2025 16:48
@bdehamer bdehamer requested a review from a team as a code owner February 26, 2025 16:48
Comment on lines -78 to -87

it('handle tags including "@" character', async () => {
nock.cleanAll()
await mockIssuer({
...claims,
workflow_ref: 'owner/repo/.github/workflows/main.yml@foo@1.0.0'
})
const predicate = await buildSLSAProvenancePredicate()
expect(predicate).toMatchSnapshot()
})
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This test was specifically handling the scenario where the ref was parsed from the workflow_ref claim and is no longer necessary since we no longer need to extract this value.

Copy link

@ejahnGithub ejahnGithub left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

@bdehamer bdehamer merged commit ec9716b into main Feb 26, 2025
16 of 17 checks passed
@bdehamer bdehamer deleted the bdehamer/workflow-ref branch February 26, 2025 17:50
denialhaag pushed a commit to munich-quantum-toolkit/qudits that referenced this pull request Sep 10, 2025
This PR contains the following updates:

| Package | Type | Update | Change |
|---|---|---|---|
|
[actions/attest-build-provenance](https://redirect.github.com/actions/attest-build-provenance)
| action | major | `v2` -> `v3.0.0` |

---

### Release Notes

<details>
<summary>actions/attest-build-provenance
(actions/attest-build-provenance)</summary>

###
[`v3.0.0`](https://redirect.github.com/actions/attest-build-provenance/releases/tag/v3.0.0)

[Compare
Source](https://redirect.github.com/actions/attest-build-provenance/compare/v2.4.0...v3)

#### What's Changed

- Adjust node max-http-header-size setting by
[@&#8203;bdehamer](https://redirect.github.com/bdehamer) in
[#&#8203;687](https://redirect.github.com/actions/attest-build-provenance/pull/687)
- Bump actions/attest from v2.4.0 to
[v3.0.0](https://redirect.github.com/actions/attest/releases/tag/v3.0.0)
by [@&#8203;bdehamer](https://redirect.github.com/bdehamer) in
[#&#8203;691](https://redirect.github.com/actions/attest-build-provenance/pull/691)
  - Bump to node24 runtime
  - Improved checksum parsing
- Bump attest-build-provenance/predicate to v2.0.0 by
[@&#8203;bdehamer](https://redirect.github.com/bdehamer) in
[#&#8203;693](https://redirect.github.com/actions/attest-build-provenance/pull/693)
- Bump to node24 runtime by
[@&#8203;bdehamer](https://redirect.github.com/bdehamer) in
[#&#8203;692](https://redirect.github.com/actions/attest-build-provenance/pull/692)

#### ⚠️ Minimum Compatible Runner Version

v2.327.1
[Release
Notes](https://redirect.github.com/actions/runner/releases/tag/v2.327.1)

Make sure your runner is updated to this version or newer to use this
release.

**Full Changelog**:
<actions/attest-build-provenance@v2.4.0...v3.0.0>

###
[`v2.4.0`](https://redirect.github.com/actions/attest-build-provenance/releases/tag/v2.4.0)

[Compare
Source](https://redirect.github.com/actions/attest-build-provenance/compare/v2.3.0...v2.4.0)

#### What's Changed

- Bump undici from 5.28.5 to 5.29.0 by
[@&#8203;dependabot](https://redirect.github.com/dependabot) in
[#&#8203;633](https://redirect.github.com/actions/attest-build-provenance/pull/633)
- Bump actions/attest from 2.3.0 to
[2.4.0](https://redirect.github.com/actions/attest/releases/tag/v2.4.0)
by [@&#8203;bdehamer](https://redirect.github.com/bdehamer) in
[#&#8203;654](https://redirect.github.com/actions/attest-build-provenance/pull/654)
- Includes support for the new well-known summary file which will
accumulate paths to all attestations generated in a given workflow run

**Full Changelog**:
<actions/attest-build-provenance@v2.3.0...v2.4.0>

###
[`v2.3.0`](https://redirect.github.com/actions/attest-build-provenance/releases/tag/v2.3.0)

[Compare
Source](https://redirect.github.com/actions/attest-build-provenance/compare/v2.2.3...v2.3.0)

#### What's Changed

- Bump `actions/attest` from 2.2.1 to 2.3.0 by
[@&#8203;bdehamer](https://redirect.github.com/bdehamer) in
[#&#8203;615](https://redirect.github.com/actions/attest-build-provenance/pull/615)
  - Updates `@sigstore/oci` from 0.4.0 to 0.5.0

**Full Changelog**:
<actions/attest-build-provenance@v2.2.3...v2.3.0>

###
[`v2.2.3`](https://redirect.github.com/actions/attest-build-provenance/releases/tag/v2.2.3)

[Compare
Source](https://redirect.github.com/actions/attest-build-provenance/compare/v2.2.2...v2.2.3)

#### What's Changed

- Pin actions/attest reference by commit SHA by
[@&#8203;bdehamer](https://redirect.github.com/bdehamer) in
[#&#8203;493](https://redirect.github.com/actions/attest-build-provenance/pull/493)

**Full Changelog**:
<actions/attest-build-provenance@v2.2.2...v2.2.3>

###
[`v2.2.2`](https://redirect.github.com/actions/attest-build-provenance/releases/tag/v2.2.2)

[Compare
Source](https://redirect.github.com/actions/attest-build-provenance/compare/v2.2.1...v2.2.2)

#### What's Changed

- Bump predicate action from 1.1.4 to 1.1.5 by
[@&#8203;bdehamer](https://redirect.github.com/bdehamer) in
[#&#8203;485](https://redirect.github.com/actions/attest-build-provenance/pull/485)
- Bump
[@&#8203;actions/attest](https://redirect.github.com/actions/attest)
from 1.5.0 to 1.6.0 by
[@&#8203;bdehamer](https://redirect.github.com/bdehamer) in
[#&#8203;484](https://redirect.github.com/actions/attest-build-provenance/pull/484)
- Update buildSLSAProvenancePredicate to populate `workflow.ref` field
from the `ref` claim in the OIDC token
([actions/toolkit#1969](https://redirect.github.com/actions/toolkit/pull/1969))

**Full Changelog**:
<actions/attest-build-provenance@v2.2.1...v2.2.2>

###
[`v2.2.1`](https://redirect.github.com/actions/attest-build-provenance/releases/tag/v2.2.1)

[Compare
Source](https://redirect.github.com/actions/attest-build-provenance/compare/v2.2.0...v2.2.1)

#### What's Changed

- Bump undici from 5.28.4 to 5.28.5 by
[@&#8203;dependabot](https://redirect.github.com/dependabot) in
[#&#8203;457](https://redirect.github.com/actions/attest-build-provenance/pull/457)
- Bump
[@&#8203;octokit/request-error](https://redirect.github.com/octokit/request-error)
from 5.0.1 to 5.1.1 by
[@&#8203;dependabot](https://redirect.github.com/dependabot) in
[#&#8203;469](https://redirect.github.com/actions/attest-build-provenance/pull/469)
- Bump
[@&#8203;octokit/request](https://redirect.github.com/octokit/request)
from 8.2.0 to 8.4.1 by
[@&#8203;dependabot](https://redirect.github.com/dependabot) in
[#&#8203;478](https://redirect.github.com/actions/attest-build-provenance/pull/478)
- Bump actions/attest from 2.2.0 to 2.2.1 by
[@&#8203;bdehamer](https://redirect.github.com/bdehamer) in
[#&#8203;481](https://redirect.github.com/actions/attest-build-provenance/pull/481)
- Includes `@actions/attest`
[v1.6.0](https://redirect.github.com/actions/toolkit/blob/main/packages/attest/RELEASES.md#160)

**Full Changelog**:
<actions/attest-build-provenance@v2.2.0...v2.2.1>

###
[`v2.2.0`](https://redirect.github.com/actions/attest-build-provenance/releases/tag/v2.2.0)

[Compare
Source](https://redirect.github.com/actions/attest-build-provenance/compare/v2.1.0...v2.2.0)

#### What's Changed

- Bump actions/attest from v2.1.0 to v2.2.0 by
[@&#8203;bdehamer](https://redirect.github.com/bdehamer) in
[#&#8203;449](https://redirect.github.com/actions/attest-build-provenance/pull/449)
  - Includes support for now `subject-checksums` input parameter

**Full Changelog**:
<actions/attest-build-provenance@v2.1.0...v2.2.0>

###
[`v2.1.0`](https://redirect.github.com/actions/attest-build-provenance/releases/tag/v2.1.0)

[Compare
Source](https://redirect.github.com/actions/attest-build-provenance/compare/v2.0.1...v2.1.0)

#### What's Changed

- Update README w/ note about GH plans supporting attestations by
[@&#8203;bdehamer](https://redirect.github.com/bdehamer) in
[#&#8203;414](https://redirect.github.com/actions/attest-build-provenance/pull/414)
- Add `attestation-id` and `attestation-url` outputs by
[@&#8203;bdehamer](https://redirect.github.com/bdehamer) in
[#&#8203;415](https://redirect.github.com/actions/attest-build-provenance/pull/415)

**Full Changelog**:
<actions/attest-build-provenance@v2.0.1...v2.1.0>

###
[`v2.0.1`](https://redirect.github.com/actions/attest-build-provenance/releases/tag/v2.0.1)

[Compare
Source](https://redirect.github.com/actions/attest-build-provenance/compare/v2...v2.0.1)

#### What's Changed

- Bump actions/attest from 2.0.0 to 2.0.1 by
[@&#8203;bdehamer](https://redirect.github.com/bdehamer) in
[#&#8203;406](https://redirect.github.com/actions/attest-build-provenance/pull/406)
  - Deduplicate subjects before adding to in-toto statement

**Full Changelog**:
<actions/attest-build-provenance@v2.0.0...v2.0.1>

</details>

---

### Configuration

📅 **Schedule**: Branch creation - "every weekend" (UTC), Automerge - At
any time (no schedule defined).

🚦 **Automerge**: Disabled by config. Please merge this manually once you
are satisfied.

♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the
rebase/retry checkbox.

🔕 **Ignore**: Close this PR and you won't be reminded about this update
again.

---

- [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check
this box

---

This PR was generated by [Mend Renovate](https://mend.io/renovate/).
View the [repository job
log](https://developer.mend.io/github/munich-quantum-toolkit/qudits).

<!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiI0MS45MS4xIiwidXBkYXRlZEluVmVyIjoiNDEuOTcuMTAiLCJ0YXJnZXRCcmFuY2giOiJtYWluIiwibGFiZWxzIjpbImRlcGVuZGVuY2llcyIsImdpdGh1Yi1hY3Rpb25zIl19-->

Signed-off-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
burgholzer pushed a commit to munich-quantum-toolkit/qusat that referenced this pull request Sep 10, 2025
This PR contains the following updates:

| Package | Type | Update | Change |
|---|---|---|---|
|
[actions/attest-build-provenance](https://redirect.github.com/actions/attest-build-provenance)
| action | minor | `v2` -> `v2.4.0` |

---

### Release Notes

<details>
<summary>actions/attest-build-provenance
(actions/attest-build-provenance)</summary>

###
[`v2.4.0`](https://redirect.github.com/actions/attest-build-provenance/releases/tag/v2.4.0)

[Compare
Source](https://redirect.github.com/actions/attest-build-provenance/compare/v2.3.0...v2.4.0)

#### What's Changed

- Bump undici from 5.28.5 to 5.29.0 by
[@&#8203;dependabot](https://redirect.github.com/dependabot) in
[#&#8203;633](https://redirect.github.com/actions/attest-build-provenance/pull/633)
- Bump actions/attest from 2.3.0 to
[2.4.0](https://redirect.github.com/actions/attest/releases/tag/v2.4.0)
by [@&#8203;bdehamer](https://redirect.github.com/bdehamer) in
[#&#8203;654](https://redirect.github.com/actions/attest-build-provenance/pull/654)
- Includes support for the new well-known summary file which will
accumulate paths to all attestations generated in a given workflow run

**Full Changelog**:
<actions/attest-build-provenance@v2.3.0...v2.4.0>

###
[`v2.3.0`](https://redirect.github.com/actions/attest-build-provenance/releases/tag/v2.3.0)

[Compare
Source](https://redirect.github.com/actions/attest-build-provenance/compare/v2.2.3...v2.3.0)

#### What's Changed

- Bump `actions/attest` from 2.2.1 to 2.3.0 by
[@&#8203;bdehamer](https://redirect.github.com/bdehamer) in
[#&#8203;615](https://redirect.github.com/actions/attest-build-provenance/pull/615)
  - Updates `@sigstore/oci` from 0.4.0 to 0.5.0

**Full Changelog**:
<actions/attest-build-provenance@v2.2.3...v2.3.0>

###
[`v2.2.3`](https://redirect.github.com/actions/attest-build-provenance/releases/tag/v2.2.3)

[Compare
Source](https://redirect.github.com/actions/attest-build-provenance/compare/v2.2.2...v2.2.3)

#### What's Changed

- Pin actions/attest reference by commit SHA by
[@&#8203;bdehamer](https://redirect.github.com/bdehamer) in
[#&#8203;493](https://redirect.github.com/actions/attest-build-provenance/pull/493)

**Full Changelog**:
<actions/attest-build-provenance@v2.2.2...v2.2.3>

###
[`v2.2.2`](https://redirect.github.com/actions/attest-build-provenance/releases/tag/v2.2.2)

[Compare
Source](https://redirect.github.com/actions/attest-build-provenance/compare/v2.2.1...v2.2.2)

#### What's Changed

- Bump predicate action from 1.1.4 to 1.1.5 by
[@&#8203;bdehamer](https://redirect.github.com/bdehamer) in
[#&#8203;485](https://redirect.github.com/actions/attest-build-provenance/pull/485)
- Bump
[@&#8203;actions/attest](https://redirect.github.com/actions/attest)
from 1.5.0 to 1.6.0 by
[@&#8203;bdehamer](https://redirect.github.com/bdehamer) in
[#&#8203;484](https://redirect.github.com/actions/attest-build-provenance/pull/484)
- Update buildSLSAProvenancePredicate to populate `workflow.ref` field
from the `ref` claim in the OIDC token
([actions/toolkit#1969](https://redirect.github.com/actions/toolkit/pull/1969))

**Full Changelog**:
<actions/attest-build-provenance@v2.2.1...v2.2.2>

###
[`v2.2.1`](https://redirect.github.com/actions/attest-build-provenance/releases/tag/v2.2.1)

[Compare
Source](https://redirect.github.com/actions/attest-build-provenance/compare/v2.2.0...v2.2.1)

#### What's Changed

- Bump undici from 5.28.4 to 5.28.5 by
[@&#8203;dependabot](https://redirect.github.com/dependabot) in
[#&#8203;457](https://redirect.github.com/actions/attest-build-provenance/pull/457)
- Bump
[@&#8203;octokit/request-error](https://redirect.github.com/octokit/request-error)
from 5.0.1 to 5.1.1 by
[@&#8203;dependabot](https://redirect.github.com/dependabot) in
[#&#8203;469](https://redirect.github.com/actions/attest-build-provenance/pull/469)
- Bump
[@&#8203;octokit/request](https://redirect.github.com/octokit/request)
from 8.2.0 to 8.4.1 by
[@&#8203;dependabot](https://redirect.github.com/dependabot) in
[#&#8203;478](https://redirect.github.com/actions/attest-build-provenance/pull/478)
- Bump actions/attest from 2.2.0 to 2.2.1 by
[@&#8203;bdehamer](https://redirect.github.com/bdehamer) in
[#&#8203;481](https://redirect.github.com/actions/attest-build-provenance/pull/481)
- Includes `@actions/attest`
[v1.6.0](https://redirect.github.com/actions/toolkit/blob/main/packages/attest/RELEASES.md#160)

**Full Changelog**:
<actions/attest-build-provenance@v2.2.0...v2.2.1>

###
[`v2.2.0`](https://redirect.github.com/actions/attest-build-provenance/releases/tag/v2.2.0)

[Compare
Source](https://redirect.github.com/actions/attest-build-provenance/compare/v2.1.0...v2.2.0)

#### What's Changed

- Bump actions/attest from v2.1.0 to v2.2.0 by
[@&#8203;bdehamer](https://redirect.github.com/bdehamer) in
[#&#8203;449](https://redirect.github.com/actions/attest-build-provenance/pull/449)
  - Includes support for now `subject-checksums` input parameter

**Full Changelog**:
<actions/attest-build-provenance@v2.1.0...v2.2.0>

###
[`v2.1.0`](https://redirect.github.com/actions/attest-build-provenance/releases/tag/v2.1.0)

[Compare
Source](https://redirect.github.com/actions/attest-build-provenance/compare/v2.0.1...v2.1.0)

#### What's Changed

- Update README w/ note about GH plans supporting attestations by
[@&#8203;bdehamer](https://redirect.github.com/bdehamer) in
[#&#8203;414](https://redirect.github.com/actions/attest-build-provenance/pull/414)
- Add `attestation-id` and `attestation-url` outputs by
[@&#8203;bdehamer](https://redirect.github.com/bdehamer) in
[#&#8203;415](https://redirect.github.com/actions/attest-build-provenance/pull/415)

**Full Changelog**:
<actions/attest-build-provenance@v2.0.1...v2.1.0>

###
[`v2.0.1`](https://redirect.github.com/actions/attest-build-provenance/releases/tag/v2.0.1)

[Compare
Source](https://redirect.github.com/actions/attest-build-provenance/compare/v2...v2.0.1)

#### What's Changed

- Bump actions/attest from 2.0.0 to 2.0.1 by
[@&#8203;bdehamer](https://redirect.github.com/bdehamer) in
[#&#8203;406](https://redirect.github.com/actions/attest-build-provenance/pull/406)
  - Deduplicate subjects before adding to in-toto statement

**Full Changelog**:
<actions/attest-build-provenance@v2.0.0...v2.0.1>

</details>

---

### Configuration

📅 **Schedule**: Branch creation - "every weekend" (UTC), Automerge - At
any time (no schedule defined).

🚦 **Automerge**: Disabled by config. Please merge this manually once you
are satisfied.

♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the
rebase/retry checkbox.

🔕 **Ignore**: Close this PR and you won't be reminded about this update
again.

---

- [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check
this box

---

This PR was generated by [Mend Renovate](https://mend.io/renovate/).
View the [repository job
log](https://developer.mend.io/github/munich-quantum-toolkit/qusat).

<!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiI0MS45Ny4xMCIsInVwZGF0ZWRJblZlciI6IjQxLjk3LjEwIiwidGFyZ2V0QnJhbmNoIjoibWFpbiIsImxhYmVscyI6WyJkZXBlbmRlbmNpZXMiLCJnaXRodWItYWN0aW9ucyJdfQ==-->

Signed-off-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants