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

Adversarial tests for provenance-only workflow #133

Closed
1 task done
ianlewis opened this issue May 31, 2022 · 10 comments
Closed
1 task done

Adversarial tests for provenance-only workflow #133

ianlewis opened this issue May 31, 2022 · 10 comments
Assignees
Labels
area:generic Issue with the generic generator area:tests An issue with tests (unit, e2e, etc.)

Comments

@ianlewis
Copy link
Member

ianlewis commented May 31, 2022

Depends on #28

Adversarial tests:

  • Adversarial tests with an invalid input file name
@ianlewis ianlewis added area:generic Issue with the generic generator area:tests An issue with tests (unit, e2e, etc.) labels May 31, 2022
@ianlewis ianlewis self-assigned this May 31, 2022
@ianlewis ianlewis added this to the v1.1 milestone Jun 7, 2022
@ianlewis
Copy link
Member Author

@laurentsimon Do we really need adversarial tests? The seem to be inherently flaky and only really seem be testing the sha check that we do when uploading/downloading the artifact between jobs.

We already check most of the important stuff like modifying the binary in our existing e2e tests

@laurentsimon
Copy link
Collaborator

I think we want the checks for places where we upload/download to/from the artifact registry, in order to validate that tampering is detected. This is really important since the re-usable workflow is different from the Go re-usable workflows. So I'd say yes for the first item.

The other twos are less important. The release one is flaky and does not add much security anyway. The second item on the list is simple enough that we could add it.

Wdut?

@ianlewis
Copy link
Member Author

For the generic provenance we don't build the artifacts or upload/download them so there's not really anything to actually test for the first.

I can maybe take a stab at the second and/or third, though I actually think they are pretty much all flaky and depend a lot on timing. Several of the ones for the Go workflow have just not been creating issues for other reasons. See slsa-framework/example-package#71

@laurentsimon
Copy link
Collaborator

For the generic provenance we don't build the artifacts or upload/download them so there's not really anything to actually test for the first.

ah right, I forgot it all happens in a single VM. Good point.

I suppose item 2 is the only one we may verify then?

@ianlewis
Copy link
Member Author

Yeah, if we can get it to work.

@laurentsimon
Copy link
Collaborator

this one should be easy, since it does not involved timing

@ianlewis
Copy link
Member Author

SG

@ianlewis
Copy link
Member Author

I may not even need to write the one for invalid path either since the generic workflow doesn't have an input config file.

I'm assuming the corresponding test for the Go workflow is this one.
https://github.com/slsa-framework/example-package/blob/main/.github/workflows/e2e.go.schedule.main.adversarial-invalidpath.yml

@laurentsimon
Copy link
Collaborator

You're correct. Maybe you can write one with invalid subject formatting instead?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area:generic Issue with the generic generator area:tests An issue with tests (unit, e2e, etc.)
Projects
None yet
Development

No branches or pull requests

2 participants