Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

workflows: Add conformance testing workflow #298

Merged
merged 8 commits into from
Nov 17, 2022
Merged

Conversation

tetsuo-cpp
Copy link
Collaborator

Closes #297

Signed-off-by: Alex Cameron <asc@tetsuo.sh>
Signed-off-by: Alex Cameron <asc@tetsuo.sh>
#!/usr/bin/env python3

"""
A wrapper to convert `sigstore-conformance` CLI protocol invocations to match `sigstore-python`.
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Not really sure where the right spot for this is.

It doesn't seem like it belongs in the actual package itself. But on the other hand, I want to access this wrapper from the sigstore-conformance tests so that when we iterate on the action, we have visibility when we're breaking basic things.

Copy link
Member

@woodruffw woodruffw Nov 14, 2022

Choose a reason for hiding this comment

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

IMO test/integration/sigstore-python-conformance would be a reasonable path -- that would reuse our existing test structure but shouldn't interfere with pytest.

If it does, we could move our current unit tests from test/ to test/unit/.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Good idea. I think that's definitely cleaner.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

#!/usr/bin/env python3

"""
A wrapper to convert `sigstore-conformance` CLI protocol invocations to match `sigstore-python`.
Copy link
Member

Choose a reason for hiding this comment

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

Separate tiny nit: could we expand this comment to include a link to the sigstore-conformance repo?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Signed-off-by: Alex Cameron <asc@tetsuo.sh>
Signed-off-by: Alex Cameron <asc@tetsuo.sh>
Signed-off-by: Alex Cameron <asc@tetsuo.sh>
Signed-off-by: Alex Cameron <asc@tetsuo.sh>
- uses: actions/setup-python@7f80679172b057fc5e90d70d197929d454754a5a
- name: install sigstore-python
run: python -m pip install .
- uses: trailofbits/sigstore-conformance@v0.0.1
Copy link
Member

Choose a reason for hiding this comment

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

nit: could use hash pinning like the other actions do -- dependabot* should still follow your latest release.

*) just realized dependabot does not seem to be set up for GH actions currently: will file an issue

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Signed-off-by: Alex Cameron <asc@tetsuo.sh>
@tetsuo-cpp tetsuo-cpp requested a review from jku November 17, 2022 11:53
@jku
Copy link
Member

jku commented Nov 17, 2022

Github is currently censoring me: leaving a review doesn't do anything... So here it is as a comment:


(Github ate my original review: apologies if this is a duplicate)

Looks good to me. The brutally simple test scaffold seems like a good start: it may be too simplistic but this should be a good way to find out.

Can you verify the effects of id-token: write: We are delegating the current toplevel workflow identity (so in this PR "sigstore/sigstore-python/.github/workflows/conformance.yml") to sigstore-conformance to use, correct? So security-wise this project just needs to remember to not include this workflow in release.yml (to avoid using the release identity for this).

README.md Show resolved Hide resolved
Copy link
Member

@woodruffw woodruffw left a comment

Choose a reason for hiding this comment

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

LGTM! :shipit:

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.

Add conformance testing workflow
3 participants