-
Notifications
You must be signed in to change notification settings - Fork 51
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
Inconsistent path match behaviour compared to python implementation #209
Labels
bug
Something isn't working
Comments
I'd wager we should handle this and add tests via in-toto/in-toto#563 to catch regressions in future. |
Yea, I think a common test suite to check the different implementations against is one of the nicer way of dealing with it and catching other differences proactively :) |
I should also note that the spec is being updated (in-toto/specification#75) to be more explicit about the patterns. That'd make in-toto-golang non compliant. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
General information:
Hey. So in the general spec https://github.com/in-toto/docs/blob/master/in-toto-spec.md#433-artifact-rules , we have this statement about the path patterns accepted in expected materials / products paths:
"The 'pattern' value is a path-pattern that will be matched against paths reported in the link metadata, including bash-style wildcards (e.g., '*')."
This is implemented differently between Golang and Python.
Could you comment on the differences?
Description of the bug:
I've noticed the python implementation for in-toto uses
fnmatch
:https://github.com/in-toto/in-toto/blob/develop/in_toto/verifylib.py#L676
In the Golang implementation, this is achieved via https://github.com/in-toto/in-toto-golang/blob/master/in_toto/match.go . The following test for example wouldn't be true if using
fnmatch
https://github.com/in-toto/in-toto-golang/blob/master/in_toto/match_test.go#L49 .Anything special you want to tell us?
The text was updated successfully, but these errors were encountered: