mirror of
https://github.com/aws-actions/configure-aws-credentials.git
synced 2026-09-04 06:15:07 +09:00
chore: Update dist
This commit is contained in:
+13
-2
@@ -75531,6 +75531,13 @@ Support boolean input list: \`true | True | TRUE | false | False | FALSE\``
|
|||||||
);
|
);
|
||||||
}
|
}
|
||||||
var O_NOFOLLOW = fs.constants.O_NOFOLLOW ?? 0;
|
var O_NOFOLLOW = fs.constants.O_NOFOLLOW ?? 0;
|
||||||
|
function isAllowListed(filePath) {
|
||||||
|
const KUBERNETES_TOKEN_PATH_REGEX = /^\/var\/run\/secrets\/[^/]+\/serviceaccount\/token$/;
|
||||||
|
if (process.platform !== "win32") {
|
||||||
|
return KUBERNETES_TOKEN_PATH_REGEX.test(path.posix.normalize(filePath));
|
||||||
|
}
|
||||||
|
return false;
|
||||||
|
}
|
||||||
function isSymlink(filePath) {
|
function isSymlink(filePath) {
|
||||||
try {
|
try {
|
||||||
return fs.lstatSync(filePath).isSymbolicLink();
|
return fs.lstatSync(filePath).isSymbolicLink();
|
||||||
@@ -75555,10 +75562,14 @@ function assertRegularFile(fd, filePath) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
function readFileUtf8(filePath) {
|
function readFileUtf8(filePath) {
|
||||||
refuseSymlinkOnPath(filePath);
|
const allowSymlink = isAllowListed(filePath);
|
||||||
|
if (!allowSymlink) {
|
||||||
|
refuseSymlinkOnPath(filePath);
|
||||||
|
}
|
||||||
|
const openFlags = fs.constants.O_RDONLY | (allowSymlink ? 0 : O_NOFOLLOW);
|
||||||
let fd;
|
let fd;
|
||||||
try {
|
try {
|
||||||
fd = fs.openSync(filePath, fs.constants.O_RDONLY | O_NOFOLLOW);
|
fd = fs.openSync(filePath, openFlags);
|
||||||
} catch (err) {
|
} catch (err) {
|
||||||
const code = err.code;
|
const code = err.code;
|
||||||
if (code === "ENOENT") return null;
|
if (code === "ENOENT") return null;
|
||||||
|
|||||||
Reference in New Issue
Block a user