Compare commits
28 Commits
predicate@
...
v1.1.2
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
173725a120 | ||
|
|
f0669b95f6 | ||
|
|
951c0c5f8e | ||
|
|
33e2a1e792 | ||
|
|
f8d5ea8082 | ||
|
|
799a179922 | ||
|
|
317e60695d | ||
|
|
d811d1bcba | ||
|
|
7208362845 | ||
|
|
eab7f69317 | ||
|
|
2e836a7eae | ||
|
|
66366d853b | ||
|
|
9e9b7c8b0d | ||
|
|
fe33d38e84 | ||
|
|
897ed5eab6 | ||
|
|
c785889453 | ||
|
|
db1dde0f27 | ||
|
|
f59022ce92 | ||
|
|
2ac6f998d4 | ||
|
|
e9e8f489ae | ||
|
|
21a4fc8dbf | ||
|
|
203f050b50 | ||
|
|
e5f43eb153 | ||
|
|
7a844233d9 | ||
|
|
9439b15e22 | ||
|
|
d44e43c3e9 | ||
|
|
3a5d7a3add | ||
|
|
107023af50 |
2
.github/dependabot.yml
vendored
2
.github/dependabot.yml
vendored
@@ -9,6 +9,8 @@ updates:
|
||||
update-types:
|
||||
- minor
|
||||
- patch
|
||||
ignore:
|
||||
- dependency-name: "actions/attest-build-provenance"
|
||||
|
||||
- package-ecosystem: npm
|
||||
directory: /
|
||||
|
||||
3
.github/workflows/ci.yml
vendored
3
.github/workflows/ci.yml
vendored
@@ -50,7 +50,8 @@ jobs:
|
||||
name: Test attest-provenance action
|
||||
runs-on: ubuntu-latest
|
||||
permissions:
|
||||
contents: write
|
||||
attestations: write
|
||||
contents: read
|
||||
id-token: write
|
||||
|
||||
steps:
|
||||
|
||||
1
.github/workflows/linter.yml
vendored
1
.github/workflows/linter.yml
vendored
@@ -47,3 +47,4 @@ jobs:
|
||||
VALIDATE_ALL_CODEBASE: true
|
||||
VALIDATE_JAVASCRIPT_STANDARD: false
|
||||
VALIDATE_JSCPD: false
|
||||
VALIDATE_GITHUB_ACTIONS: false
|
||||
|
||||
31
README.md
31
README.md
@@ -1,6 +1,6 @@
|
||||
# `actions/attest-build-provenance`
|
||||
|
||||
Generate signed build provenace attestations for workflow artifacts. Internally
|
||||
Generate signed build provenance attestations for workflow artifacts. Internally
|
||||
powered by the [@actions/attest][1] package.
|
||||
|
||||
Attestations bind some subject (a named artifact along with its digest) to a
|
||||
@@ -16,9 +16,12 @@ Once the attestation has been created and signed, it will be uploaded to the GH
|
||||
attestations API and associated with the repository from which the workflow was
|
||||
initiated.
|
||||
|
||||
Attestations can be verified using the `attestation` command in the [GitHub
|
||||
Attestations can be verified using the [`attestation` command in the GitHub
|
||||
CLI][5].
|
||||
|
||||
See [Using artifact attestations to establish provenance for builds][9] for more
|
||||
information on artifact attestations.
|
||||
|
||||
## Usage
|
||||
|
||||
Within the GitHub Actions workflow which builds some artifact you would like to
|
||||
@@ -29,12 +32,12 @@ attest:
|
||||
```yaml
|
||||
permissions:
|
||||
id-token: write
|
||||
contents: write # TODO: Update this
|
||||
attestations: write
|
||||
```
|
||||
|
||||
The `id-token` permission gives the action the ability to mint the OIDC token
|
||||
permission is necessary to persist the attestation. The `contents` permission
|
||||
is necessary to persist the attestation.
|
||||
permission is necessary to persist the attestation. The `attestations`
|
||||
permission is necessary to persist the attestation.
|
||||
|
||||
1. Add the following to your workflow after your artifact has been built:
|
||||
|
||||
@@ -44,7 +47,7 @@ attest:
|
||||
subject-path: '<PATH TO ARTIFACT>'
|
||||
```
|
||||
|
||||
The `subject-path` parameter should identity the artifact for which you want
|
||||
The `subject-path` parameter should identify the artifact for which you want
|
||||
to generate an attestation.
|
||||
|
||||
### Inputs
|
||||
@@ -58,7 +61,7 @@ See [action.yml](action.yml)
|
||||
# specify exactly one of "subject-path" or "subject-digest".
|
||||
subject-path:
|
||||
|
||||
# SHA256 digest of the subject for for the attestation. Must be in the form
|
||||
# SHA256 digest of the subject for the attestation. Must be in the form
|
||||
# "sha256:hex_digest" (e.g. "sha256:abc123..."). Must specify exactly one
|
||||
# of "subject-path" or "subject-digest".
|
||||
subject-digest:
|
||||
@@ -112,7 +115,8 @@ jobs:
|
||||
build:
|
||||
permissions:
|
||||
id-token: write
|
||||
contents: write
|
||||
contents: read
|
||||
attestations: write
|
||||
|
||||
steps:
|
||||
- name: Checkout
|
||||
@@ -150,6 +154,9 @@ fully-qualified image name (e.g. "ghcr.io/user/app" or
|
||||
"acme.azurecr.io/user/app"). Do NOT include a tag as part of the image name --
|
||||
the specific image being attested is identified by the supplied digest.
|
||||
|
||||
Attestation bundles are stored in the OCI registry according to the [Cosign
|
||||
Bundle Specification][10].
|
||||
|
||||
> **NOTE**: When pushing to Docker Hub, please use "index.docker.io" as the
|
||||
> registry portion of the image name.
|
||||
|
||||
@@ -166,7 +173,8 @@ jobs:
|
||||
permissions:
|
||||
id-token: write
|
||||
packages: write
|
||||
contents: write
|
||||
contents: read
|
||||
attestations: write
|
||||
env:
|
||||
REGISTRY: ghcr.io
|
||||
IMAGE_NAME: ${{ github.repository }}
|
||||
@@ -200,8 +208,11 @@ jobs:
|
||||
[2]: https://github.com/in-toto/attestation/tree/main/spec/v1
|
||||
[3]: https://slsa.dev/spec/v1.0/provenance
|
||||
[4]: https://www.sigstore.dev/
|
||||
[5]: https://cli.github.com/
|
||||
[5]: https://cli.github.com/manual/gh_attestation_verify
|
||||
[6]:
|
||||
https://github.com/sigstore/protobuf-specs/blob/main/protos/sigstore_bundle.proto
|
||||
[7]: https://jsonlines.org/
|
||||
[8]: https://github.com/actions/toolkit/tree/main/packages/glob#patterns
|
||||
[9]:
|
||||
https://docs.github.com/en/actions/security-guides/using-artifact-attestations-to-establish-provenance-for-builds
|
||||
[10]: https://github.com/sigstore/cosign/blob/main/specs/BUNDLE_SPEC.md
|
||||
|
||||
@@ -28,3 +28,11 @@ otherwise, skip directly to step #5.
|
||||
```shell
|
||||
gh release create vX.X.X
|
||||
```
|
||||
|
||||
1. Move (or create) the major version tag to point to the same commit tagged
|
||||
above:
|
||||
|
||||
```shell
|
||||
git tag -fa vX -m "vX"
|
||||
git push origin vX --force
|
||||
```
|
||||
|
||||
@@ -1,6 +1,9 @@
|
||||
name: 'Attest Build Provenance'
|
||||
description: 'Generate provenance attestations for build artifacts'
|
||||
author: 'GitHub'
|
||||
branding:
|
||||
color: 'blue'
|
||||
icon: 'lock'
|
||||
|
||||
inputs:
|
||||
subject-path:
|
||||
@@ -40,9 +43,9 @@ outputs:
|
||||
runs:
|
||||
using: 'composite'
|
||||
steps:
|
||||
- uses: actions/attest-build-provenance/predicate@56a361a16034268025aa760d300531128e298f1c # predicate@0.1.0
|
||||
- uses: actions/attest-build-provenance/predicate@db1dde0f270afe12073070ac7aa802958ae3ec04 # predicate@1.0.0
|
||||
id: generate-build-provenance-predicate
|
||||
- uses: actions/attest@14e407ca15f1b08f4869fc058b059f7f1e434df6 # v0.1.0
|
||||
- uses: actions/attest@12c083815ed46d5d78222e3824f4a26c42c234d3 # v1.1.2
|
||||
id: attest
|
||||
with:
|
||||
subject-path: ${{ inputs.subject-path }}
|
||||
|
||||
2291
dist/index.js
generated
vendored
2291
dist/index.js
generated
vendored
File diff suppressed because it is too large
Load Diff
93
dist/licenses.txt
generated
vendored
93
dist/licenses.txt
generated
vendored
@@ -231,6 +231,31 @@ The above copyright notice and this permission notice (including the next paragr
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
|
||||
|
||||
@octokit/plugin-retry
|
||||
MIT
|
||||
MIT License
|
||||
|
||||
Copyright (c) 2018 Octokit contributors
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
of this software and associated documentation files (the "Software"), to deal
|
||||
in the Software without restriction, including without limitation the rights
|
||||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
copies of the Software, and to permit persons to whom the Software is
|
||||
furnished to do so, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in all
|
||||
copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||
SOFTWARE.
|
||||
|
||||
|
||||
@octokit/request
|
||||
MIT
|
||||
The MIT License
|
||||
@@ -1107,6 +1132,28 @@ Apache-2.0
|
||||
|
||||
agent-base
|
||||
MIT
|
||||
(The MIT License)
|
||||
|
||||
Copyright (c) 2013 Nathan Rajlich <nathan@tootallnate.net>
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining
|
||||
a copy of this software and associated documentation files (the
|
||||
'Software'), to deal in the Software without restriction, including
|
||||
without limitation the rights to use, copy, modify, merge, publish,
|
||||
distribute, sublicense, and/or sell copies of the Software, and to
|
||||
permit persons to whom the Software is furnished to do so, subject to
|
||||
the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be
|
||||
included in all copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND,
|
||||
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
||||
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
|
||||
IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
|
||||
CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
|
||||
TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
|
||||
SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
|
||||
aggregate-error
|
||||
MIT
|
||||
@@ -1351,6 +1398,30 @@ Apache-2.0
|
||||
limitations under the License.
|
||||
|
||||
|
||||
bottleneck
|
||||
MIT
|
||||
The MIT License (MIT)
|
||||
|
||||
Copyright (c) 2014 Simon Grondin
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy of
|
||||
this software and associated documentation files (the "Software"), to deal in
|
||||
the Software without restriction, including without limitation the rights to
|
||||
use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
|
||||
the Software, and to permit persons to whom the Software is furnished to do so,
|
||||
subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in all
|
||||
copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
|
||||
FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
|
||||
COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
|
||||
IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
|
||||
CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
|
||||
|
||||
brace-expansion
|
||||
MIT
|
||||
MIT License
|
||||
@@ -2962,6 +3033,28 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
|
||||
socks-proxy-agent
|
||||
MIT
|
||||
(The MIT License)
|
||||
|
||||
Copyright (c) 2013 Nathan Rajlich <nathan@tootallnate.net>
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining
|
||||
a copy of this software and associated documentation files (the
|
||||
'Software'), to deal in the Software without restriction, including
|
||||
without limitation the rights to use, copy, modify, merge, publish,
|
||||
distribute, sublicense, and/or sell copies of the Software, and to
|
||||
permit persons to whom the Software is furnished to do so, subject to
|
||||
the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be
|
||||
included in all copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND,
|
||||
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
||||
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
|
||||
IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
|
||||
CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
|
||||
TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
|
||||
SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
|
||||
sprintf-js
|
||||
BSD-3-Clause
|
||||
|
||||
702
package-lock.json
generated
702
package-lock.json
generated
File diff suppressed because it is too large
Load Diff
20
package.json
20
package.json
@@ -1,7 +1,7 @@
|
||||
{
|
||||
"name": "actions/attest-build-provenance",
|
||||
"description": "Generate signed build provenance attestations",
|
||||
"version": "0.2.0",
|
||||
"version": "1.0.0",
|
||||
"author": "",
|
||||
"private": true,
|
||||
"homepage": "https://github.com/actions/attest-build-provenance",
|
||||
@@ -70,27 +70,27 @@
|
||||
]
|
||||
},
|
||||
"dependencies": {
|
||||
"@actions/attest": "^1.1.0",
|
||||
"@actions/attest": "^1.2.1",
|
||||
"@actions/core": "^1.10.1"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@types/jest": "^29.5.12",
|
||||
"@types/node": "^20.11.30",
|
||||
"@typescript-eslint/eslint-plugin": "^7.3.1",
|
||||
"@typescript-eslint/parser": "^7.3.1",
|
||||
"@types/node": "^20.12.11",
|
||||
"@typescript-eslint/eslint-plugin": "^7.8.0",
|
||||
"@typescript-eslint/parser": "^7.8.0",
|
||||
"@vercel/ncc": "^0.38.1",
|
||||
"eslint": "^8.57.0",
|
||||
"eslint-plugin-github": "^4.10.2",
|
||||
"eslint-plugin-jest": "^27.9.0",
|
||||
"eslint-plugin-jsonc": "^2.14.1",
|
||||
"eslint-plugin-jest": "^28.5.0",
|
||||
"eslint-plugin-jsonc": "^2.15.1",
|
||||
"eslint-plugin-prettier": "^5.1.3",
|
||||
"jest": "^29.7.0",
|
||||
"jose": "^5.2.3",
|
||||
"markdownlint-cli": "^0.39.0",
|
||||
"jose": "^5.3.0",
|
||||
"markdownlint-cli": "^0.40.0",
|
||||
"nock": "^13.5.4",
|
||||
"prettier": "^3.2.5",
|
||||
"prettier-eslint": "^16.3.0",
|
||||
"ts-jest": "^29.1.2",
|
||||
"typescript": "^5.4.3"
|
||||
"typescript": "^5.4.5"
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user