From 870820227c6626b172c7f60fc7fa7b00402cc2e1 Mon Sep 17 00:00:00 2001 From: adrobuta Date: Tue, 6 Aug 2024 15:29:13 +0300 Subject: [PATCH] fix: container support hashing .jar files of size up to buffer.constants.MAX_LENGTH The bumped version of snyk-docker-plugin fixes the exception thrown by the crypto module `The RangeError: data is too long` by reading and computing the sha1 of .jar files in chunks. This allows snyk container to scan embedded .jar files of up to buffer.constants.MAX_LENGTH. On 32-bit architectures, this value currently is 230 - 1 (about 1 GiB). On 64-bit architectures, this value currently is 232 (about 4 GiB). --- package-lock.json | 14 +++++++------- package.json | 2 +- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/package-lock.json b/package-lock.json index 634a39c747..b4e32b73e4 100644 --- a/package-lock.json +++ b/package-lock.json @@ -68,7 +68,7 @@ "semver": "^6.0.0", "snyk-config": "^5.0.0", "snyk-cpp-plugin": "2.24.0", - "snyk-docker-plugin": "6.13.1", + "snyk-docker-plugin": "6.13.2", "snyk-go-plugin": "1.23.0", "snyk-gradle-plugin": "4.1.0", "snyk-module": "3.1.0", @@ -20281,9 +20281,9 @@ "integrity": "sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A==" }, "node_modules/snyk-docker-plugin": { - "version": "6.13.1", - "resolved": "https://registry.npmjs.org/snyk-docker-plugin/-/snyk-docker-plugin-6.13.1.tgz", - "integrity": "sha512-BojEnE0Rb8a00A2P/INXPDAE6rXL5pghv/6NRfrGjoc1OPu7HWbA/a+Vv5loAi2MYCRLryrA7IN6TlzMW7T/+A==", + "version": "6.13.2", + "resolved": "https://registry.npmjs.org/snyk-docker-plugin/-/snyk-docker-plugin-6.13.2.tgz", + "integrity": "sha512-phUxaUm50IOiruC61Eyqwy1dEJ0KjtF+Fqs3qp7RBT4jPHYqoDxKnyHMCmxwS2+XDFigbA0r9MR5FEKfdvdL8Q==", "dependencies": { "@snyk/composer-lockfile-parser": "^1.4.1", "@snyk/dep-graph": "^2.8.1", @@ -39643,9 +39643,9 @@ } }, "snyk-docker-plugin": { - "version": "6.13.1", - "resolved": "https://registry.npmjs.org/snyk-docker-plugin/-/snyk-docker-plugin-6.13.1.tgz", - "integrity": "sha512-BojEnE0Rb8a00A2P/INXPDAE6rXL5pghv/6NRfrGjoc1OPu7HWbA/a+Vv5loAi2MYCRLryrA7IN6TlzMW7T/+A==", + "version": "6.13.2", + "resolved": "https://registry.npmjs.org/snyk-docker-plugin/-/snyk-docker-plugin-6.13.2.tgz", + "integrity": "sha512-phUxaUm50IOiruC61Eyqwy1dEJ0KjtF+Fqs3qp7RBT4jPHYqoDxKnyHMCmxwS2+XDFigbA0r9MR5FEKfdvdL8Q==", "requires": { "@snyk/composer-lockfile-parser": "^1.4.1", "@snyk/dep-graph": "^2.8.1", diff --git a/package.json b/package.json index c1ad7c0952..9752a483de 100644 --- a/package.json +++ b/package.json @@ -116,7 +116,7 @@ "semver": "^6.0.0", "snyk-config": "^5.0.0", "snyk-cpp-plugin": "2.24.0", - "snyk-docker-plugin": "6.13.1", + "snyk-docker-plugin": "6.13.2", "snyk-go-plugin": "1.23.0", "snyk-gradle-plugin": "4.1.0", "snyk-module": "3.1.0",