Skip to content

Commit

Permalink
sigstore-python-conformance: Update wrapper (#85)
Browse files Browse the repository at this point in the history
* sigstore-python-conformance: Update wrapper

Signed-off-by: Alex Cameron <asc@tetsuo.sh>

* conformance: 2.0.0rc1

Signed-off-by: William Woodruff <william@trailofbits.com>

---------

Signed-off-by: Alex Cameron <asc@tetsuo.sh>
Signed-off-by: William Woodruff <william@trailofbits.com>
Co-authored-by: William Woodruff <william@trailofbits.com>
  • Loading branch information
tetsuo-cpp and woodruffw authored Jun 26, 2023
1 parent fc98610 commit ea3a712
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 3 deletions.
6 changes: 5 additions & 1 deletion .github/workflows/conformance.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,11 +11,15 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3

- uses: actions/setup-python@v4
with:
python-version: "3.11"

- name: install sigstore-python
run: pip install sigstore
# TODO: Remove this version pin once the 2.x series is released.
run: pip install sigstore==2.0.0rc1

- name: conformance test sigstore-python
uses: ./
id: sigstore-conformance
Expand Down
11 changes: 9 additions & 2 deletions sigstore-python-conformance
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,14 @@ fixed_args = [
ARG_REPLACEMENTS[arg] if arg in ARG_REPLACEMENTS else arg for arg in fixed_args
]

# Prepend the `sigstore-python` executable name.
fixed_args = ["sigstore"] + fixed_args
# Fix-up the subcommand: the conformance suite uses `verify`, but
# `sigstore` requires `verify identity` for identity based verifications.
subcommand, *fixed_args = fixed_args
if subcommand == "sign":
fixed_args = ["sigstore", "sign", *fixed_args]
elif subcommand == "verify":
fixed_args = ["sigstore", "verify", "identity", *fixed_args]
else:
raise ValueError(f"unsupported subcommand: {subcommand}")

subprocess.run(fixed_args, text=True, check=True)

0 comments on commit ea3a712

Please sign in to comment.