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

fix: notation plugin install error messages and tests #855

Merged
merged 16 commits into from
Jan 4, 2024

Conversation

Two-Hearts
Copy link
Contributor

@Two-Hearts Two-Hearts commented Dec 26, 2023

This PR improves error messages of notation plugin install command and updates the related cli specs as well.

This PR also adds zip bomb and zip slip tests.

Resolves #853.

Signed-off-by: Patrick Zheng <[email protected]>
Signed-off-by: Patrick Zheng <[email protected]>
Signed-off-by: Patrick Zheng <[email protected]>
@codecov-commenter
Copy link

codecov-commenter commented Dec 26, 2023

Codecov Report

Attention: 18 lines in your changes are missing coverage. Please review.

Comparison is base (dc575a6) 63.91% compared to head (29aabda) 65.14%.

Files Patch % Lines
cmd/notation/plugin/install.go 70.73% 8 Missing and 4 partials ⚠️
internal/osutil/file.go 20.00% 3 Missing and 1 partial ⚠️
cmd/notation/internal/plugin/plugin.go 0.00% 1 Missing ⚠️
cmd/notation/plugin/uninstall.go 0.00% 1 Missing ⚠️

❗ Your organization needs to install the Codecov GitHub app to enable full functionality.

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #855      +/-   ##
==========================================
+ Coverage   63.91%   65.14%   +1.23%     
==========================================
  Files          45       45              
  Lines        2699     2717      +18     
==========================================
+ Hits         1725     1770      +45     
+ Misses        820      787      -33     
- Partials      154      160       +6     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@Two-Hearts Two-Hearts changed the title update: notation plugin command error messages fix: notation plugin command error messages Dec 27, 2023
Signed-off-by: Patrick Zheng <[email protected]>
@Two-Hearts Two-Hearts changed the title fix: notation plugin command error messages fix: notation plugin install command error messages Dec 27, 2023
@Two-Hearts Two-Hearts changed the title fix: notation plugin install command error messages fix: notation plugin install error messages Dec 27, 2023
cmd/notation/internal/plugin/plugin.go Outdated Show resolved Hide resolved
test/e2e/testdata/malicious-plugin/largeFileZip.zip Outdated Show resolved Hide resolved
cmd/notation/plugin/install.go Outdated Show resolved Hide resolved
internal/osutil/file.go Outdated Show resolved Hide resolved
internal/osutil/file.go Outdated Show resolved Hide resolved
Signed-off-by: Patrick Zheng <[email protected]>
Signed-off-by: Patrick Zheng <[email protected]>
Signed-off-by: Patrick Zheng <[email protected]>
Signed-off-by: Patrick Zheng <[email protected]>
shizhMSFT
shizhMSFT previously approved these changes Jan 2, 2024
Copy link
Contributor

@shizhMSFT shizhMSFT left a comment

Choose a reason for hiding this comment

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

LGTM

cmd/notation/plugin/install.go Outdated Show resolved Hide resolved
specs/commandline/plugin.md Outdated Show resolved Hide resolved
specs/commandline/plugin.md Outdated Show resolved Hide resolved
Signed-off-by: Patrick Zheng <[email protected]>
@Two-Hearts Two-Hearts changed the title fix: notation plugin install error messages fix: notation plugin install error messages and tests Jan 3, 2024
Signed-off-by: Patrick Zheng <[email protected]>
Signed-off-by: Patrick Zheng <[email protected]>
Signed-off-by: Patrick Zheng <[email protected]>
Copy link
Contributor

@shizhMSFT shizhMSFT left a comment

Choose a reason for hiding this comment

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

LGTM

Copy link
Contributor

@priteshbandi priteshbandi left a comment

Choose a reason for hiding this comment

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

LGTM

@priteshbandi priteshbandi merged commit 95b9861 into notaryproject:main Jan 4, 2024
5 checks passed
@Two-Hearts Two-Hearts deleted the plugin-install branch January 4, 2024 07:35
rgnote pushed a commit to rgnote/notation that referenced this pull request Mar 8, 2024
…t#855)

* This PR improves error messages of `notation plugin install` command and updates the related cli specs. (Resolves notaryproject#853)
* This PR also adds zip bomb and zip slip tests.

Signed-off-by: Patrick Zheng <[email protected]>
rgnote pushed a commit to rgnote/notation that referenced this pull request Mar 8, 2024
…t#855)

* This PR improves error messages of `notation plugin install` command and updates the related cli specs. (Resolves notaryproject#853)
* This PR also adds zip bomb and zip slip tests.

Signed-off-by: Patrick Zheng <[email protected]>
Signed-off-by: rgnote <[email protected]>
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.

notation plugin command enhancements
5 participants