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

artifact: protect against unbounded artifact decompression (1.2.x) (#… #16158

Merged
merged 1 commit into from
Feb 13, 2023

Conversation

shoenig
Copy link
Member

@shoenig shoenig commented Feb 13, 2023

Backport of #16126 (because BPA doesn't work on non-main branches)

…16126)

  • artifact: protect against unbounded artifact decompression

This PR enables mitigations provided by go-getter against payloads which decompress into an unbounded size or file count.

There are two new client config options under the artifact block:

artifact.decompression_size_limit (e.g. "10GB") - the maximum amount of data that will be decompressed before triggering an error and cancelling the operation

artifact.decompression_file_count_limit (e.g. 1024) - the maximum number of files that will be decompressed before triggering ana error and cancelling the operation.

  • fixup CR comments

  • deps: update to go-getter 1.7.0

…16126)

* artifact: protect against unbounded artifact decompression

This PR enables mitigations provided by go-getter against payloads which
decompress into an unbounded size or file count.

There are two new client config options under the artifact block:

artifact.decompression_size_limit (e.g. "10GB") - the maximum amount of
data that will be decompressed before triggering an error and cancelling
the operation

artifact.decompression_file_count_limit (e.g. 1024) - the maximum number
of files that will be decompressed before triggering ana error and
cancelling the operation.

* fixup CR comments

* deps: update to go-getter 1.7.0
@shoenig shoenig force-pushed the artifact-limits-backport-1.2.x branch from bd6fa53 to 4f78627 Compare February 13, 2023 18:07
@shoenig shoenig marked this pull request as ready for review February 13, 2023 18:28
@shoenig shoenig requested a review from lgfa29 February 13, 2023 18:28
@shoenig shoenig merged commit e0cc596 into release/1.2.x Feb 13, 2023
@shoenig shoenig deleted the artifact-limits-backport-1.2.x branch February 13, 2023 20:08
tgross pushed a commit that referenced this pull request Feb 14, 2023
…16126) (#16158)

* artifact: protect against unbounded artifact decompression

This PR enables mitigations provided by go-getter against payloads which
decompress into an unbounded size or file count.

There are two new client config options under the artifact block:

artifact.decompression_size_limit (e.g. "10GB") - the maximum amount of
data that will be decompressed before triggering an error and cancelling
the operation

artifact.decompression_file_count_limit (e.g. 1024) - the maximum number
of files that will be decompressed before triggering ana error and
cancelling the operation.

* fixup CR comments

* deps: update to go-getter 1.7.0
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