Skip to content

Commit ee1cb49

Browse files
committed
internal/helm: check size of meta files in package
Signed-off-by: Hidde Beydals <hello@hidde.co>
1 parent 87c7c80 commit ee1cb49

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

internal/helm/chart/metadata.go

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -228,6 +228,9 @@ func LoadChartMetadataFromArchive(archive string) (*helmchart.Metadata, error) {
228228

229229
switch parts[1] {
230230
case chartutil.ChartfileName, "requirements.yaml":
231+
if hd.Size > helm.MaxChartFileSize {
232+
return nil, fmt.Errorf("size of '%s' exceeds '%d' bytes limit", hd.Name, helm.MaxChartFileSize)
233+
}
231234
b, err := io.ReadAll(tr)
232235
if err != nil {
233236
return nil, err

0 commit comments

Comments
 (0)