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

prevent serialization of symlinks by default #251

Merged
merged 6 commits into from
Jul 24, 2024

Conversation

spencerschrock
Copy link
Contributor

@spencerschrock spencerschrock commented Jul 23, 2024

Summary

Adds a serializer initializer argument (allow_symlink) to control whether symlinks raise a ValueError during serialization.

For rationale, see #196 (comment)

Release Note

NONE

Documentation

NONE

Signed-off-by: Spencer Schrock <sschrock@google.com>
This can be changed via the allow_symlink argument in the various
serialization initializers.

Signed-off-by: Spencer Schrock <sschrock@google.com>
@spencerschrock spencerschrock changed the title add serialization test for symlink model file prevent serialization of symlinks by default Jul 24, 2024
@spencerschrock spencerschrock marked this pull request as ready for review July 24, 2024 17:52
@spencerschrock spencerschrock requested review from a team as code owners July 24, 2024 17:52
@mihaimaruseac mihaimaruseac added this to the V1 release milestone Jul 24, 2024
Copy link
Collaborator

@mihaimaruseac mihaimaruseac left a comment

Choose a reason for hiding this comment

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

Thank you! This LGTM.

Added a request to change the test fixture to be a directory and then some minor nits here and there.

model_signing/conftest.py Outdated Show resolved Hide resolved
model_signing/serialization/serialize_by_file.py Outdated Show resolved Hide resolved
model_signing/serialization/serialize_by_file.py Outdated Show resolved Hide resolved
model_signing/serialization/serialize_by_file.py Outdated Show resolved Hide resolved
model_signing/serialization/serialize_by_file.py Outdated Show resolved Hide resolved
model_signing/serialization/serialize_by_file.py Outdated Show resolved Hide resolved
model_signing/serialization/serialize_by_file_shard.py Outdated Show resolved Hide resolved
model_signing/serialization/serialize_by_file_shard.py Outdated Show resolved Hide resolved
Signed-off-by: Spencer Schrock <sschrock@google.com>
Signed-off-by: Spencer Schrock <sschrock@google.com>
mihaimaruseac
mihaimaruseac previously approved these changes Jul 24, 2024
Copy link
Collaborator

@mihaimaruseac mihaimaruseac left a comment

Choose a reason for hiding this comment

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

Thank you!

Copy link
Collaborator

@mihaimaruseac mihaimaruseac left a comment

Choose a reason for hiding this comment

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

Nice! Thank you!

@mihaimaruseac mihaimaruseac merged commit 9798149 into sigstore:main Jul 24, 2024
20 checks passed
@spencerschrock spencerschrock deleted the symlink-test branch July 24, 2024 20:41
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