1
0
mirror of https://github.com/golangci/golangci-lint-action.git synced 2026-06-18 01:05:47 +07:00

build(deps): bump tmp from 0.2.5 to 0.2.6 (#1397)

Co-authored-by: Fernandez Ludovic <ldez@users.noreply.github.com>
This commit is contained in:
dependabot[bot]
2026-05-28 13:01:57 +02:00
committed by GitHub
parent 5403a413de
commit 8182aa3494
4 changed files with 47 additions and 17 deletions

25
dist/post_run/index.js generated vendored
View File

@@ -29642,6 +29642,19 @@ function _generateTmpName(opts) {
return path.join(tmpDir, opts.dir, name); return path.join(tmpDir, opts.dir, name);
} }
/**
* Check the prefix and postfix options
*
* @private
*/
function _assertPath(path) {
if (path.includes("..")) {
throw new Error("Relative value not allowed");
}
return path;
}
/** /**
* Asserts and sanitizes the basic options. * Asserts and sanitizes the basic options.
* *
@@ -29656,9 +29669,10 @@ function _assertOptionsBase(options) {
// must not fail on valid .<name> or ..<name> or similar such constructs // must not fail on valid .<name> or ..<name> or similar such constructs
const basename = path.basename(name); const basename = path.basename(name);
if (basename === '..' || basename === '.' || basename !== name) if (basename === '..' || basename === '.' || basename !== name) {
throw new Error(`name option must not contain a path, found "${name}".`); throw new Error(`name option must not contain a path, found "${name}".`);
} }
}
/* istanbul ignore else */ /* istanbul ignore else */
if (!_isUndefined(options.template) && !options.template.match(TEMPLATE_PATTERN)) { if (!_isUndefined(options.template) && !options.template.match(TEMPLATE_PATTERN)) {
@@ -29678,8 +29692,9 @@ function _assertOptionsBase(options) {
options.unsafeCleanup = !!options.unsafeCleanup; options.unsafeCleanup = !!options.unsafeCleanup;
// for completeness' sake only, also keep (multiple) blanks if the user, purportedly sane, requests us to // for completeness' sake only, also keep (multiple) blanks if the user, purportedly sane, requests us to
options.prefix = _isUndefined(options.prefix) ? '' : options.prefix; options.prefix = _isUndefined(options.prefix) ? '' : _assertPath(options.prefix);
options.postfix = _isUndefined(options.postfix) ? '' : options.postfix; options.postfix = _isUndefined(options.postfix) ? '' : _assertPath(options.postfix);
options.template = _isUndefined(options.template) ? undefined : _assertPath(options.template);
} }
/** /**
@@ -29695,7 +29710,7 @@ function _getRelativePath(option, name, tmpDir, cb) {
const relativePath = path.relative(tmpDir, resolvedPath); const relativePath = path.relative(tmpDir, resolvedPath);
if (!resolvedPath.startsWith(tmpDir)) { if (relativePath.startsWith('..') || path.isAbsolute(relativePath)) {
return cb(new Error(`${option} option must be relative to "${tmpDir}", found "${relativePath}".`)); return cb(new Error(`${option} option must be relative to "${tmpDir}", found "${relativePath}".`));
} }
@@ -29714,7 +29729,7 @@ function _getRelativePathSync(option, name, tmpDir) {
const resolvedPath = _resolvePathSync(name, tmpDir); const resolvedPath = _resolvePathSync(name, tmpDir);
const relativePath = path.relative(tmpDir, resolvedPath); const relativePath = path.relative(tmpDir, resolvedPath);
if (!resolvedPath.startsWith(tmpDir)) { if (relativePath.startsWith('..') || path.isAbsolute(relativePath)) {
throw new Error(`${option} option must be relative to "${tmpDir}", found "${relativePath}".`); throw new Error(`${option} option must be relative to "${tmpDir}", found "${relativePath}".`);
} }

25
dist/run/index.js generated vendored
View File

@@ -29642,6 +29642,19 @@ function _generateTmpName(opts) {
return path.join(tmpDir, opts.dir, name); return path.join(tmpDir, opts.dir, name);
} }
/**
* Check the prefix and postfix options
*
* @private
*/
function _assertPath(path) {
if (path.includes("..")) {
throw new Error("Relative value not allowed");
}
return path;
}
/** /**
* Asserts and sanitizes the basic options. * Asserts and sanitizes the basic options.
* *
@@ -29656,9 +29669,10 @@ function _assertOptionsBase(options) {
// must not fail on valid .<name> or ..<name> or similar such constructs // must not fail on valid .<name> or ..<name> or similar such constructs
const basename = path.basename(name); const basename = path.basename(name);
if (basename === '..' || basename === '.' || basename !== name) if (basename === '..' || basename === '.' || basename !== name) {
throw new Error(`name option must not contain a path, found "${name}".`); throw new Error(`name option must not contain a path, found "${name}".`);
} }
}
/* istanbul ignore else */ /* istanbul ignore else */
if (!_isUndefined(options.template) && !options.template.match(TEMPLATE_PATTERN)) { if (!_isUndefined(options.template) && !options.template.match(TEMPLATE_PATTERN)) {
@@ -29678,8 +29692,9 @@ function _assertOptionsBase(options) {
options.unsafeCleanup = !!options.unsafeCleanup; options.unsafeCleanup = !!options.unsafeCleanup;
// for completeness' sake only, also keep (multiple) blanks if the user, purportedly sane, requests us to // for completeness' sake only, also keep (multiple) blanks if the user, purportedly sane, requests us to
options.prefix = _isUndefined(options.prefix) ? '' : options.prefix; options.prefix = _isUndefined(options.prefix) ? '' : _assertPath(options.prefix);
options.postfix = _isUndefined(options.postfix) ? '' : options.postfix; options.postfix = _isUndefined(options.postfix) ? '' : _assertPath(options.postfix);
options.template = _isUndefined(options.template) ? undefined : _assertPath(options.template);
} }
/** /**
@@ -29695,7 +29710,7 @@ function _getRelativePath(option, name, tmpDir, cb) {
const relativePath = path.relative(tmpDir, resolvedPath); const relativePath = path.relative(tmpDir, resolvedPath);
if (!resolvedPath.startsWith(tmpDir)) { if (relativePath.startsWith('..') || path.isAbsolute(relativePath)) {
return cb(new Error(`${option} option must be relative to "${tmpDir}", found "${relativePath}".`)); return cb(new Error(`${option} option must be relative to "${tmpDir}", found "${relativePath}".`));
} }
@@ -29714,7 +29729,7 @@ function _getRelativePathSync(option, name, tmpDir) {
const resolvedPath = _resolvePathSync(name, tmpDir); const resolvedPath = _resolvePathSync(name, tmpDir);
const relativePath = path.relative(tmpDir, resolvedPath); const relativePath = path.relative(tmpDir, resolvedPath);
if (!resolvedPath.startsWith(tmpDir)) { if (relativePath.startsWith('..') || path.isAbsolute(relativePath)) {
throw new Error(`${option} option must be relative to "${tmpDir}", found "${relativePath}".`); throw new Error(`${option} option must be relative to "${tmpDir}", found "${relativePath}".`);
} }

12
package-lock.json generated
View File

@@ -1,12 +1,12 @@
{ {
"name": "golanci-lint-action", "name": "golanci-lint-action",
"version": "8.0.0", "version": "9.2.1",
"lockfileVersion": 3, "lockfileVersion": 3,
"requires": true, "requires": true,
"packages": { "packages": {
"": { "": {
"name": "golanci-lint-action", "name": "golanci-lint-action",
"version": "8.0.0", "version": "9.2.1",
"license": "MIT", "license": "MIT",
"dependencies": { "dependencies": {
"@actions/cache": "^5.0.3", "@actions/cache": "^5.0.3",
@@ -20,7 +20,7 @@
"@types/semver": "^7.7.1", "@types/semver": "^7.7.1",
"@types/tmp": "^0.2.6", "@types/tmp": "^0.2.6",
"@types/which": "^3.0.4", "@types/which": "^3.0.4",
"tmp": "^0.2.5", "tmp": "^0.2.6",
"which": "^7.0.0", "which": "^7.0.0",
"yaml": "^2.9.0" "yaml": "^2.9.0"
}, },
@@ -4038,9 +4038,9 @@
} }
}, },
"node_modules/tmp": { "node_modules/tmp": {
"version": "0.2.5", "version": "0.2.6",
"resolved": "https://registry.npmjs.org/tmp/-/tmp-0.2.5.tgz", "resolved": "https://registry.npmjs.org/tmp/-/tmp-0.2.6.tgz",
"integrity": "sha512-voyz6MApa1rQGUxT3E+BK7/ROe8itEx7vD8/HEvt4xwXucvQ5G5oeEiHkmHZJuBO21RpOf+YYm9MOivj709jow==", "integrity": "sha512-5sJPdPjfI5Kx+qbrDesxkglRBxW//g7hCsqspEjwkewGvBMGIKMOTKzLt1hFVJzyadba3lDUN20O9qhvbQUSTA==",
"license": "MIT", "license": "MIT",
"engines": { "engines": {
"node": ">=14.14" "node": ">=14.14"

View File

@@ -38,7 +38,7 @@
"@types/semver": "^7.7.1", "@types/semver": "^7.7.1",
"@types/tmp": "^0.2.6", "@types/tmp": "^0.2.6",
"@types/which": "^3.0.4", "@types/which": "^3.0.4",
"tmp": "^0.2.5", "tmp": "^0.2.6",
"which": "^7.0.0", "which": "^7.0.0",
"yaml": "^2.9.0" "yaml": "^2.9.0"
}, },