-
Notifications
You must be signed in to change notification settings - Fork 29
chore: sign the vsix package, not the manifest #83
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
Conversation
// If this file is missing, it means the extension was added before | ||
// signatures were handled by the marketplace. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks like this opens the .vsix
, which should always exist (if not installing will also fail). Or I could be misreading this 😅
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
you are right!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Wait no, the manifest is expected to be there. Now that we are signing the vsix though, I might change this later to not require the file to be there.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This comment refers to loading the vsix though, not the manifest, and the vsix must always exist. Possibly it was supposed to go in the block above where we read the manifest?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oh yeah probably, the todo and error below also says manifest instead of vsix :D
} | ||
|
||
// TODO: Fetch the VSIX payload from the storage | ||
signed, err := s.SigZip(ctx, vsixData, manifestData) | ||
if err != nil { | ||
return nil, xerrors.Errorf("sign and zip manifest: %w", err) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oops meant to say before submitting, really big nit, but looks like this error would end up saying sign and zip manifest: sign and zip manifest: whatever the error is
with the first part twice which could look weird
I misread the nodejs implementation, see this line: filepath.Join(filepath.Dir(fp), vsixPath+".vsix")
Should be signing the vsix file.
Regardless, signatures are still not being checked 🤷♂️. Unsure why VSCode just accepts bad signatures 🤔.
Also adds a command line flag to save the signatures to disk. Really nice for debugging.