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

Add unusual rolename tests #138

Merged
merged 6 commits into from
Aug 14, 2024

Conversation

jku
Copy link
Member

@jku jku commented Aug 13, 2024

These tests are useful in codifying some expectations on how to handle weird rolenames. I wouldn't be surprised if some clients want to skip this test but the "../delegatedrole" case comes from an actual security issue we've had (file traversal when storing the metadata).

This also enables #137 although I did not replace usage of _file_exist() yet -- I'm not sure if the new trusted_roles(self) is the right API?

jku added 3 commits August 13, 2024 17:58
Use "-vvv" to do debug logging.

Signed-off-by: Jussi Kukkonen <jkukkonen@google.com>
We can't 100% know what filenames the client uses: so tests can't
always ask "is this role trusted?" but have to look at whole list.

Signed-off-by: Jussi Kukkonen <jkukkonen@google.�com>
Signed-off-by: Jussi Kukkonen <jkukkonen@google.com>
@jku

This comment was marked as outdated.

@jku jku marked this pull request as draft August 13, 2024 15:19
Signed-off-by: Jussi Kukkonen <jkukkonen@google.com>
@jku jku marked this pull request as ready for review August 13, 2024 15:36
tuf_conformance/client_runner.py Outdated Show resolved Hide resolved
jku added 2 commits August 14, 2024 17:06
Signed-off-by: Jussi Kukkonen <jkukkonen@google.com>
This matches metadata_statstics in repository simulator.

Signed-off-by: Jussi Kukkonen <jkukkonen@google.com>
@jku
Copy link
Member Author

jku commented Aug 14, 2024

This also enables #137 although I did not replace usage of _file_exist() yet -- I'm not sure if the new trusted_roles(self) is the right API?

I did not change the existing uses yet but I think trusted_roles() looks ok to me now -- it's the same as RepositorySimulator.metadata_statistics, except it's not sorted by time: mtime did not seem accurate enough since the files are written very quickly. So it is sorted by alpha.

@jku jku requested a review from AdamKorcz August 14, 2024 14:13
@AdamKorcz AdamKorcz merged commit c26f0c1 into theupdateframework:main Aug 14, 2024
3 checks passed
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.

2 participants