mirror of
https://github.com/actions/attest-build-provenance.git
synced 2026-03-16 12:05:46 +00:00
Compare commits
No commits in common. "main" and "v4.0.0" have entirely different histories.
17
.github/dependabot.yml
vendored
17
.github/dependabot.yml
vendored
@ -9,3 +9,20 @@ updates:
|
|||||||
update-types:
|
update-types:
|
||||||
- minor
|
- minor
|
||||||
- patch
|
- patch
|
||||||
|
ignore:
|
||||||
|
- dependency-name: 'actions/attest-build-provenance'
|
||||||
|
|
||||||
|
- package-ecosystem: npm
|
||||||
|
directory: /
|
||||||
|
schedule:
|
||||||
|
interval: weekly
|
||||||
|
groups:
|
||||||
|
npm-development:
|
||||||
|
dependency-type: development
|
||||||
|
update-types:
|
||||||
|
- minor
|
||||||
|
- patch
|
||||||
|
npm-production:
|
||||||
|
dependency-type: production
|
||||||
|
update-types:
|
||||||
|
- patch
|
||||||
|
|||||||
18
.github/workflows/prober-github.yml
vendored
Normal file
18
.github/workflows/prober-github.yml
vendored
Normal file
@ -0,0 +1,18 @@
|
|||||||
|
name: GitHub Sigstore Prober
|
||||||
|
|
||||||
|
on:
|
||||||
|
workflow_dispatch:
|
||||||
|
schedule:
|
||||||
|
# run every 5 minutes, as often as Github Actions allows
|
||||||
|
- cron: '*/5 * * * *'
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
prober:
|
||||||
|
if: github.repository_owner == 'actions'
|
||||||
|
permissions:
|
||||||
|
attestations: write
|
||||||
|
id-token: write
|
||||||
|
secrets: inherit
|
||||||
|
uses: ./.github/workflows/prober.yml
|
||||||
|
with:
|
||||||
|
sigstore: github
|
||||||
18
.github/workflows/prober-public-good.yml
vendored
Normal file
18
.github/workflows/prober-public-good.yml
vendored
Normal file
@ -0,0 +1,18 @@
|
|||||||
|
name: Public-Good Sigstore Prober
|
||||||
|
|
||||||
|
on:
|
||||||
|
workflow_dispatch:
|
||||||
|
schedule:
|
||||||
|
# run every 5 minutes, as often as Github Actions allows
|
||||||
|
- cron: '*/5 * * * *'
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
prober:
|
||||||
|
if: github.repository_owner == 'actions'
|
||||||
|
permissions:
|
||||||
|
attestations: write
|
||||||
|
id-token: write
|
||||||
|
secrets: inherit
|
||||||
|
uses: ./.github/workflows/prober.yml
|
||||||
|
with:
|
||||||
|
sigstore: public-good
|
||||||
84
.github/workflows/prober.yml
vendored
Normal file
84
.github/workflows/prober.yml
vendored
Normal file
@ -0,0 +1,84 @@
|
|||||||
|
name: Prober Workflow
|
||||||
|
|
||||||
|
on:
|
||||||
|
workflow_call:
|
||||||
|
inputs:
|
||||||
|
sigstore:
|
||||||
|
description: 'Which Sigstore instance to use for signing'
|
||||||
|
required: true
|
||||||
|
type: string
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
probe:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
permissions:
|
||||||
|
attestations: write
|
||||||
|
id-token: write
|
||||||
|
|
||||||
|
steps:
|
||||||
|
- name: Request OIDC Token
|
||||||
|
run: |
|
||||||
|
curl "${ACTIONS_ID_TOKEN_REQUEST_URL}&audience=nobody" \
|
||||||
|
-H "Authorization: bearer ${ACTIONS_ID_TOKEN_REQUEST_TOKEN}" \
|
||||||
|
-H "Accept: application/json; api-version=2.0" \
|
||||||
|
-H "Content-Type: application/json" \
|
||||||
|
--silent | jq -r '.value' | jq -R 'split(".") | .[0],.[1] | @base64d | fromjson'
|
||||||
|
|
||||||
|
- name: Create artifact
|
||||||
|
run: |
|
||||||
|
date > artifact
|
||||||
|
|
||||||
|
- name: Attest build provenance
|
||||||
|
uses: actions/attest-build-provenance@v3
|
||||||
|
env:
|
||||||
|
INPUT_PRIVATE-SIGNING: ${{ inputs.sigstore == 'github' && 'true' || 'false' }}
|
||||||
|
with:
|
||||||
|
subject-path: artifact
|
||||||
|
|
||||||
|
- name: Verify build artifact
|
||||||
|
env:
|
||||||
|
GH_TOKEN: ${{ github.token }}
|
||||||
|
run: |
|
||||||
|
gh attestation verify ./artifact --owner "$GITHUB_REPOSITORY_OWNER"
|
||||||
|
|
||||||
|
- name: Upload build artifact
|
||||||
|
uses: actions/upload-artifact@b7c566a772e6b6bfb58ed0dc250532a479d7789f # v6.0.0
|
||||||
|
with:
|
||||||
|
path: "artifact"
|
||||||
|
|
||||||
|
- name: Report attestation prober success
|
||||||
|
if: ${{ success() }}
|
||||||
|
uses: masci/datadog@a3f481d2ed0f4e1edde2be2f564b94719d6d4bc2 # v1.9.3
|
||||||
|
with:
|
||||||
|
api-key: "${{ secrets.DATADOG_API_KEY }}"
|
||||||
|
service-checks: |
|
||||||
|
- check: "attestation-integration.actions.prober"
|
||||||
|
status: 0
|
||||||
|
host_name: github.com
|
||||||
|
tags:
|
||||||
|
- "catalog_service:${{ secrets.CATALOG_SERVICE }}"
|
||||||
|
- "service:${{ secrets.CATALOG_SERVICE }}"
|
||||||
|
- "stamp:${{ secrets.STAMP }}"
|
||||||
|
- "env:production"
|
||||||
|
- "repo:${{ github.repository }}"
|
||||||
|
- "team:${{ secrets.TEAM }}"
|
||||||
|
- "sigstore:${{ inputs.sigstore }}"
|
||||||
|
|
||||||
|
- name: Report attestation prober failure
|
||||||
|
if: ${{ failure() }}
|
||||||
|
uses: masci/datadog@a3f481d2ed0f4e1edde2be2f564b94719d6d4bc2 # v1.9.3
|
||||||
|
with:
|
||||||
|
api-key: "${{ secrets.DATADOG_API_KEY }}"
|
||||||
|
service-checks: |
|
||||||
|
- check: "attestation-integration.actions.prober"
|
||||||
|
message: "${{ github.repository_owner }} failed prober check"
|
||||||
|
status: 2
|
||||||
|
host_name: github.com
|
||||||
|
tags:
|
||||||
|
- "catalog_service:${{ secrets.CATALOG_SERVICE }}"
|
||||||
|
- "service:${{ secrets.CATALOG_SERVICE }}"
|
||||||
|
- "stamp:${{ secrets.STAMP }}"
|
||||||
|
- "env:production"
|
||||||
|
- "repo:${{ github.repository }}"
|
||||||
|
- "team:${{ secrets.TEAM }}"
|
||||||
|
- "sigstore:${{ inputs.sigstore }}"
|
||||||
@ -1,5 +1,8 @@
|
|||||||
# `actions/attest-build-provenance`
|
# `actions/attest-build-provenance`
|
||||||
|
|
||||||
|
[](https://github.com/actions/attest-build-provenance/actions/workflows/prober-public-good.yml)
|
||||||
|
[](https://github.com/actions/attest-build-provenance/actions/workflows/prober-github.yml)
|
||||||
|
|
||||||
Generate signed build provenance attestations for workflow artifacts. Internally
|
Generate signed build provenance attestations for workflow artifacts. Internally
|
||||||
powered by the [@actions/attest][1] package.
|
powered by the [@actions/attest][1] package.
|
||||||
|
|
||||||
|
|||||||
19
RELEASE.md
19
RELEASE.md
@ -3,6 +3,25 @@
|
|||||||
Follow the steps below to tag a new release for the
|
Follow the steps below to tag a new release for the
|
||||||
`actions/attest-build-provenance` action.
|
`actions/attest-build-provenance` action.
|
||||||
|
|
||||||
|
If changes were made to the internal `actions/attest-build-provenance/predicate`
|
||||||
|
action (any updates to [`./predicate/action.yaml`](./predicate/action.yml) or
|
||||||
|
any of the code in the [`./src`](./src) directory), start with step #1;
|
||||||
|
otherwise, skip directly to step #5.
|
||||||
|
|
||||||
|
1. Merge the latest changes to the `main` branch.
|
||||||
|
1. Create and push a new predicate tag of the form `predicate@X.X.X` following
|
||||||
|
SemVer conventions:
|
||||||
|
|
||||||
|
```shell
|
||||||
|
git tag -a "predicate@X.X.X" -m "predicate@X.X.X Release"
|
||||||
|
git push --tags
|
||||||
|
```
|
||||||
|
|
||||||
|
1. Update the reference to the `actions/attest-build-provenance/predicate`
|
||||||
|
action in [`action.yml`](./action.yml) to point to the SHA of the newly
|
||||||
|
created tag.
|
||||||
|
1. Push the `action.yml` change and open a PR. Once it has been reviewed, merge
|
||||||
|
the PR and proceed with the release instructions.
|
||||||
1. Create a new release for the top-level action using a tag of the form
|
1. Create a new release for the top-level action using a tag of the form
|
||||||
`vX.X.X` following SemVer conventions:
|
`vX.X.X` following SemVer conventions:
|
||||||
|
|
||||||
|
|||||||
@ -92,7 +92,7 @@ runs:
|
|||||||
id: attest
|
id: attest
|
||||||
env:
|
env:
|
||||||
NODE_OPTIONS: "--max-http-header-size=32768"
|
NODE_OPTIONS: "--max-http-header-size=32768"
|
||||||
uses: actions/attest@59d89421af93a897026c735860bf21b6eb4f7b26 # v4.1.0
|
uses: actions/attest@c32b4b8b198b65d0bd9d63490e847ff7b53989d4 # v4.0.0
|
||||||
with:
|
with:
|
||||||
subject-path: ${{ inputs.subject-path }}
|
subject-path: ${{ inputs.subject-path }}
|
||||||
subject-name: ${{ inputs.subject-name }}
|
subject-name: ${{ inputs.subject-name }}
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user