From c300b167c2f309710410616a1cb416075874fd84 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 30 Jun 2026 20:01:56 +0000 Subject: [PATCH 1/2] chore: Bump tmp from 0.2.6 to 0.2.7 Bumps [tmp](https://github.com/raszi/node-tmp) from 0.2.6 to 0.2.7. - [Changelog](https://github.com/raszi/node-tmp/blob/master/CHANGELOG.md) - [Commits](https://github.com/raszi/node-tmp/compare/v0.2.6...v0.2.7) --- updated-dependencies: - dependency-name: tmp dependency-version: 0.2.7 dependency-type: direct:production ... Signed-off-by: dependabot[bot] --- package-lock.json | 10 +++++----- package.json | 2 +- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/package-lock.json b/package-lock.json index 487de3c2..5c4b8aa2 100644 --- a/package-lock.json +++ b/package-lock.json @@ -6,12 +6,12 @@ "packages": { "": { "name": "aws-actions-amazon-ecs-render-task-definition", - "version": "1.8.5", + "version": "1.9.0", "license": "MIT", "dependencies": { "@actions/core": "^2.0.2", "@aws-sdk/client-ecs": "^3.1076.0", - "tmp": "^0.2.6" + "tmp": "^0.2.7" }, "devDependencies": { "@vercel/ncc": "^0.38.4", @@ -4500,9 +4500,9 @@ } }, "node_modules/tmp": { - "version": "0.2.6", - "resolved": "https://registry.npmjs.org/tmp/-/tmp-0.2.6.tgz", - "integrity": "sha512-5sJPdPjfI5Kx+qbrDesxkglRBxW//g7hCsqspEjwkewGvBMGIKMOTKzLt1hFVJzyadba3lDUN20O9qhvbQUSTA==", + "version": "0.2.7", + "resolved": "https://registry.npmjs.org/tmp/-/tmp-0.2.7.tgz", + "integrity": "sha512-e0votIpp4Uo2AJYSzVHV6xCcawuiez3DzqDAbrTc3YxBkplN6e+dM13ZeIcZnDg/QpSuU2zfZ3rzwY8ukEnaXw==", "license": "MIT", "engines": { "node": ">=14.14" diff --git a/package.json b/package.json index b37b6f61..0c517158 100644 --- a/package.json +++ b/package.json @@ -27,7 +27,7 @@ "dependencies": { "@actions/core": "^2.0.2", "@aws-sdk/client-ecs": "^3.1076.0", - "tmp": "^0.2.6" + "tmp": "^0.2.7" }, "devDependencies": { "@vercel/ncc": "^0.38.4", From 8df7abe0e405eb9f87c1878d5a2eba71cf9a680f Mon Sep 17 00:00:00 2001 From: GitHub Actions Date: Tue, 30 Jun 2026 20:03:29 +0000 Subject: [PATCH 2/2] chore: Update dist --- dist/index.js | 33 ++++++++++++++++++++++++--------- 1 file changed, 24 insertions(+), 9 deletions(-) diff --git a/dist/index.js b/dist/index.js index 3eb3d916..63d9bfa8 100644 --- a/dist/index.js +++ b/dist/index.js @@ -31702,16 +31702,26 @@ function _generateTmpName(opts) { } /** - * Check the prefix and postfix options + * Check the prefix, postfix, and template options. + * + * Rejects non-string inputs so that a non-string `.includes('..')` cannot evade + * the substring check (e.g. an Array whose `.includes('..')` is element-wise, + * or a duck-typed object with a custom `.includes`), and so that the value is + * not later coerced to a string with traversal sequences via `Array.prototype.join` + * or `path.join`. * * @private */ -function _assertPath(path) { - if (path.includes("..")) { +function _assertPath(option, value) { + if (typeof value !== 'string') { + throw new Error(`${option} option must be a string, got "${typeof value}".`); + } + + if (value.includes("..")) { throw new Error("Relative value not allowed"); } - return path; + return value; } /** @@ -31734,8 +31744,13 @@ function _assertOptionsBase(options) { } /* istanbul ignore else */ - if (!_isUndefined(options.template) && !options.template.match(TEMPLATE_PATTERN)) { - throw new Error(`Invalid template, found "${options.template}".`); + if (!_isUndefined(options.template)) { + if (typeof options.template !== 'string') { + throw new Error(`template option must be a string, got "${typeof options.template}".`); + } + if (!options.template.match(TEMPLATE_PATTERN)) { + throw new Error(`Invalid template, found "${options.template}".`); + } } /* istanbul ignore else */ @@ -31751,9 +31766,9 @@ function _assertOptionsBase(options) { options.unsafeCleanup = !!options.unsafeCleanup; // for completeness' sake only, also keep (multiple) blanks if the user, purportedly sane, requests us to - options.prefix = _isUndefined(options.prefix) ? '' : _assertPath(options.prefix); - options.postfix = _isUndefined(options.postfix) ? '' : _assertPath(options.postfix); - options.template = _isUndefined(options.template) ? undefined : _assertPath(options.template); + options.prefix = _isUndefined(options.prefix) ? '' : _assertPath('prefix', options.prefix); + options.postfix = _isUndefined(options.postfix) ? '' : _assertPath('postfix', options.postfix); + options.template = _isUndefined(options.template) ? undefined : _assertPath('template', options.template); } /**