Skip to content

Conversation

@stefanberger
Copy link
Contributor

Summary

Adjust all paths when signing or verifying when the model_path is '.'. This is the case when signing while the current working directory is the model's directory.

Resolves: #451

Checklist
  • All commits are signed-off, using DCO
  • All new code has docstrings and type annotations
  • All new code is covered by tests. Aim for at least 90% coverage. CI is configured to highlight lines not covered by tests.
  • Public facing changes are paired with documentation changes
  • Release note has been added to CHANGELOG.md if needed

@stefanberger stefanberger requested review from a team as code owners May 2, 2025 18:54
@stefanberger stefanberger marked this pull request as draft May 2, 2025 18:55
@stefanberger stefanberger marked this pull request as ready for review May 2, 2025 19:48
@stefanberger stefanberger marked this pull request as draft May 2, 2025 19:52
@stefanberger stefanberger force-pushed the adjust_paths branch 4 times, most recently from 2266ee1 to a3c5347 Compare May 6, 2025 11:55
When signing or verifying in model_path '.' then the model_path.name
becomes an empty string and cannot be used for the name of the model in
the Manifest. In this case, derive the name of the model from the model
paths' absolute path and use the last directory's name. Use the same
method for the model_path '..'.

Extend a test case with signing while in the model directory and add a
test case when signing while in a sub-directory of the model directory
while using '.. for the model path.

Resolves: sigstore#451
Signed-off-by: Stefan Berger <[email protected]>
@stefanberger stefanberger marked this pull request as ready for review May 19, 2025 22:44
@mihaimaruseac mihaimaruseac merged commit 742cee0 into sigstore:main May 20, 2025
51 checks passed
@stefanberger stefanberger deleted the adjust_paths branch May 21, 2025 17:51
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.

Signing and verifying from model directory not working (when using model_path '.')

2 participants