@@ -18,21 +18,13 @@ else!
18
18
19
19
* [ Features] ( #features )
20
20
* [ Installation] ( #installation )
21
- * [ GitHub Actions] ( #github-actions )
22
21
* [ Usage] ( #usage )
23
22
* [ Signing] ( #signing )
24
23
* [ Verifying] ( #verifying )
25
24
* [ Generic identities] ( #generic-identities )
26
25
* [ Signatures from GitHub Actions] ( #signatures-from-github-actions )
27
26
* [ Advanced usage] ( #advanced-usage )
28
- * [ Example uses] ( #example-uses )
29
- * [ Signing with ambient credentials] ( #signing-with-ambient-credentials )
30
- * [ Signing with an email identity] ( #signing-with-an-email-identity )
31
- * [ Signing with an explicit identity token] ( #signing-with-an-explicit-identity-token )
32
- * [ Verifying against a bundle] ( #verifying-against-a-bundle )
33
- * [ Offline verification] ( #offline-verification )
34
- * [ Verifying a digest instead of a file] ( #verifying-a-digest-instead-of-a-file )
35
- * [ Verifying signatures from GitHub Actions] ( #verifying-signatures-from-github-actions )
27
+ * [ Documentation] ( #documentation )
36
28
* [ Licensing] ( #licensing )
37
29
* [ Community] ( #community )
38
30
* [ Contributing] ( #contributing )
@@ -55,44 +47,17 @@ else!
55
47
python -m pip install sigstore
56
48
```
57
49
58
- Optionally, to install ` sigstore ` and all its dependencies with [ hash-checking mode] ( https://pip.pypa.io/en/stable/topics/secure-installs/#hash-checking-mode ) enabled, run the following:
59
-
60
- ``` console
61
- python -m pip install -r https://raw.githubusercontent.com/sigstore/sigstore-python/main/install/requirements.txt
62
- ```
63
-
64
- This installs the requirements file located [ here] ( https://github.com/sigstore/sigstore-python/blob/main/install/requirements.txt ) , which is kept up-to-date.
65
-
66
- ### GitHub Actions
67
-
68
- ` sigstore-python ` has [ an official GitHub Action] ( https://github.com/sigstore/gh-action-sigstore-python ) !
69
-
70
- You can install it from the
71
- [ GitHub Marketplace] ( https://github.com/marketplace/actions/gh-action-sigstore-python ) , or
72
- add it to your CI manually:
73
-
74
- ``` yaml
75
- jobs :
76
- sigstore-python :
77
- steps :
78
- -
uses :
sigstore/[email protected]
79
- with :
80
- inputs : foo.txt
81
- ` ` `
82
-
83
- See the
84
- [action documentation](https://github.com/sigstore/gh-action-sigstore-python/blob/main/README.md)
85
- for more details and usage examples.
50
+ See the [ installation] ( https://sigstore.github.io/sigstore-python/installation ) page in the documentation for more
51
+ installation options.
86
52
87
53
## Usage
88
54
89
- For Python API usage, see our [documentation ](https://sigstore.github.io/sigstore-python/).
55
+ For Python API usage, see our [ API ] ( https://sigstore.github.io/sigstore-python/api / ) .
90
56
91
- You can run ` sigstore` as a standalone program, or via `python -m` :
57
+ You can run ` sigstore ` as a standalone program:
92
58
93
59
``` console
94
60
sigstore --help
95
- python -m sigstore --help
96
61
```
97
62
98
63
Top-level:
@@ -236,12 +201,7 @@ Output options:
236
201
237
202
### Verifying
238
203
239
- #### Generic identities
240
-
241
- This is the most common verification done with `sigstore`, and therefore
242
- the one you probably want: you can use it to verify that a signature was
243
- produced by a particular identity (like `[email protected] `), as attested
244
- to by a particular OIDC provider (like `https://github.com/login/oauth`).
204
+ #### Identities
245
205
246
206
<!-- @begin-sigstore-verify-identity-help@ -->
247
207
```
@@ -281,11 +241,6 @@ Verification options:
281
241
282
242
#### Signatures from GitHub Actions
283
243
284
- If your signatures are coming from GitHub Actions (e.g., a workflow
285
- that uses its [ambient credentials](#signing-with-ambient-credentials)),
286
- then you can use the `sigstore verify github` subcommand to verify
287
- claims more precisely than `sigstore verify identity` allows:
288
-
289
244
<!-- @begin-sigstore-verify-github-help@ -->
290
245
```
291
246
usage: sigstore verify github [-h] [-v] [--certificate FILE]
@@ -330,195 +285,9 @@ Verification options:
330
285
```
331
286
<!-- @end-sigstore-verify-github-help@ -->
332
287
333
- ## Advanced usage
334
-
335
- ### Configuring a custom root of trust ("BYO PKI")
336
-
337
- Apart from the default and "staging" Sigstore instances, `sigstore` also
338
- supports "BYO PKI" setups, where a user maintains their own Sigstore
339
- instance services.
340
-
341
- These are supported via the `--trust-config` flag, which accepts a
342
- JSON-formatted file conforming to the `ClientTrustConfig` message
343
- in the [Sigstore protobuf specs](https://github.com/sigstore/protobuf-specs).
344
- This file configures the entire Sigstore instance state, *including* the URIs
345
- used to access the CA and artifact transparency services as well as the
346
- cryptographic root of trust itself.
347
-
348
- To use a custom client config, prepend `--trust-config` to any `sigstore`
349
- command:
350
-
351
- ```console
352
- $ sigstore --trust-config custom.trustconfig.json sign foo.txt
353
- $ sigstore --trust-config custom.trustconfig.json verify identity foo.txt ...
354
- ```
355
-
356
- ## Example uses
288
+ ## Documentation
357
289
358
- ` sigstore ` supports a wide variety of workflows and usages. Some common ones are
359
- provided below.
360
-
361
- ### Signing with ambient credentials
362
-
363
- For environments that support OpenID Connect, ` sigstore ` supports ambient credential
364
- detection. This includes many popular CI platforms and cloud providers. See the full list of
365
- supported environments [ here] ( https://github.com/di/id#supported-environments ) .
366
-
367
- Sign a single file (` foo.txt ` ) using an ambient OpenID Connect credential,
368
- saving the bundle to ` foo.txt.sigstore.json ` :
369
-
370
- ``` console
371
- $ python -m sigstore sign foo.txt
372
- ```
373
-
374
- ### Signing with an email identity
375
-
376
- ` sigstore ` can use an OAuth2 + OpenID flow to establish an email identity,
377
- allowing you to request signing certificates that attest to control over
378
- that email.
379
-
380
- Sign a single file (` foo.txt ` ) using the OAuth2 flow, saving the
381
- bundle to ` foo.txt.sigstore.json ` :
382
-
383
- ``` console
384
- $ python -m sigstore sign foo.txt
385
- ```
386
-
387
- By default, ` sigstore ` attempts to do
388
- [ ambient credential detection] ( #signing-with-ambient-credentials ) , which may preempt
389
- the OAuth2 flow. To force the OAuth2 flow, you can explicitly disable ambient detection:
390
-
391
- ``` console
392
- $ python -m sigstore sign --oidc-disable-ambient-providers foo.txt
393
- ```
394
-
395
- ### Signing with an explicit identity token
396
-
397
- If you can't use an ambient credential or the OAuth2 flow, you can pass a pre-created
398
- identity token directly into ` sigstore sign ` :
399
-
400
- ``` console
401
- $ python -m sigstore sign --identity-token YOUR-LONG-JWT-HERE foo.txt
402
- ```
403
-
404
- Note that passing a custom identity token does not circumvent Fulcio's requirements,
405
- namely the Fulcio's supported identity providers and the claims expected within the token.
406
-
407
- ### Verifying against a bundle
408
-
409
- By default, ` sigstore verify identity ` will attempt to find a ` <filename>.sigstore.json `
410
- or ` <filename>.sigstore ` in the same directory as the file being verified:
411
-
412
- ``` console
413
- # looks for foo.txt.sigstore.json
414
- $ python -m sigstore verify identity foo.txt \
415
- --cert-identity '[email protected] ' \
416
- --cert-oidc-issuer 'https://github.com/login/oauth'
417
- ```
418
-
419
- Multiple files can be verified at once:
420
-
421
- ``` console
422
- # looks for {foo,bar}.txt.sigstore.json
423
- $ python -m sigstore verify identity foo.txt bar.txt \
424
- --cert-identity '[email protected] ' \
425
- --cert-oidc-issuer 'https://github.com/login/oauth'
426
- ```
427
-
428
- ### Offline verification
429
-
430
- > [ !IMPORTANT]
431
- > Because ` --offline ` disables trust root updates, ` sigstore-python ` falls back
432
- > to the latest cached trust root or, if none exists, the trust root baked
433
- > into ` sigstore-python ` itself. Like with any other offline verification,
434
- > this means that users may miss trust root changes (such as new root keys,
435
- > or revocations) unless they separately keep the trust root up-to-date.
436
- >
437
- > Users who need to operationalize offline verification may wish to do this
438
- > by distributing their own trust configuration; see
439
- > [ Configuring a custom root of trust] ( #configuring-a-custom-root-of-trust-byo-pki ) .
440
-
441
- During verification, there are two kinds of network access that ` sigstore-python `
442
- * can* perform:
443
-
444
- 1 . When verifying against "detached" materials (e.g. separate ` .crt ` and ` .sig `
445
- files), ` sigstore-python ` can perform an online transparency log lookup.
446
- 2 . By default, during all verifications, ` sigstore-python ` will attempt to
447
- refresh the locally cached root of trust via a TUF update.
448
-
449
- When performing bundle verification (i.e. ` .sigstore ` or ` .sigstore.json ` ),
450
- (1) does not apply. However, (2) can still result in online accesses.
451
-
452
- To perform ** fully** offline verification, pass ` --offline ` to your
453
- ` sigstore verify ` subcommand:
454
-
455
- ``` bash
456
- $ python -m sigstore verify identity foo.txt \
457
- --offline \
458
- --cert-identity
' [email protected] ' \
459
- --cert-oidc-issuer ' https://github.com/login/oauth'
460
- ```
461
-
462
- Alternatively, users may choose to bypass TUF entirely by passing
463
- an entire trust configuration to ` sigstore-python ` via ` --trust-config ` :
464
-
465
- ``` bash
466
- $ python -m sigstore --trust-config public.trustconfig.json verify identity ...
467
- ```
468
-
469
- This will similarly result in fully offline operation, as the trust
470
- configuration contains a full trust root.
471
-
472
- ### Verifying a digest instead of a file
473
-
474
- ` sigstore-python ` supports verifying digests directly, without requiring the artifact to be
475
- present. The digest should be prefixed with the ` sha256: ` string:
476
-
477
- ``` console
478
- $ python -m sigstore verify identity sha256:ce8ab2822671752e201ea1e19e8c85e73d497e1c315bfd9c25f380b7625d1691 \
479
- --cert-identity '[email protected] ' \
480
- --cert-oidc-issuer 'https://github.com/login/oauth'
481
- --bundle 'foo.txt.sigstore.json'
482
- ```
483
-
484
- ### Verifying signatures from GitHub Actions
485
-
486
- ` sigstore verify github ` can be used to verify claims specific to signatures coming from GitHub
487
- Actions. ` sigstore-python ` signs releases via GitHub Actions, so the examples below are working
488
- examples of how you can verify a given ` sigstore-python ` release.
489
-
490
- When using ` sigstore verify github ` , you must pass ` --cert-identity ` or ` --repository ` , or both.
491
- Unlike ` sigstore verify identity ` , ` --cert-oidc-issuer ` is ** not** required (since it's
492
- inferred to be GitHub Actions).
493
-
494
- Verifying with ` --cert-identity ` :
495
-
496
- ``` console
497
- $ python -m sigstore verify github sigstore-0.10.0-py3-none-any.whl \
498
- --bundle sigstore-0.10.0-py3-none-any.whl.bundle \
499
- --cert-identity https://github.com/sigstore/sigstore-python/.github/workflows/release.yml@refs/tags/v0.10.0
500
- ```
501
-
502
- Verifying with ` --repository ` :
503
-
504
- ``` console
505
- $ python -m sigstore verify github sigstore-0.10.0-py3-none-any.whl \
506
- --bundle sigstore-0.10.0-py3-none-any.whl.bundle \
507
- --repository sigstore/sigstore-python
508
- ```
509
-
510
- Additional GitHub Actions specific claims can be verified like so:
511
-
512
- ``` console
513
- $ python -m sigstore verify github sigstore-0.10.0-py3-none-any.whl \
514
- --bundle sigstore-0.10.0-py3-none-any.whl.bundle \
515
- --cert-identity https://github.com/sigstore/sigstore-python/.github/workflows/release.yml@refs/tags/v0.10.0 \
516
- --trigger release \
517
- --sha 66581529803929c3ccc45334632ccd90f06e0de4 \
518
- --name Release \
519
- --repository sigstore/sigstore-python \
520
- --ref refs/tags/v0.10.0
521
- ```
290
+ ` sigstore ` documentation is available on [ https://sigstore.github.io/sigstore-python ] ( https://sigstore.github.io/sigstore-python )
522
291
523
292
## Licensing
524
293
@@ -544,9 +313,3 @@ Everyone interacting with this project is expected to follow the
544
313
545
314
Should you discover any security issues, please refer to sigstore's [ security
546
315
process] ( https://github.com/sigstore/.github/blob/main/SECURITY.md ) .
547
-
548
- ### SLSA Provenance
549
- This project emits a SLSA provenance on its release! This enables you to verify the integrity
550
- of the downloaded artifacts and ensured that the binary's code really comes from this source code.
551
-
552
- To do so, please follow the instructions [ here] ( https://github.com/slsa-framework/slsa-github-generator#verification-of-provenance ) .
0 commit comments