mirror of
https://github.com/github/codeql-action.git
synced 2025-12-07 00:08:06 +08:00
Compare commits
2 Commits
v4.31.7
...
henrymerce
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
4d8b358273 | ||
|
|
f336c09493 |
40
.github/workflows/__multi-language-autodetect.yml
generated
vendored
40
.github/workflows/__multi-language-autodetect.yml
generated
vendored
@@ -9,9 +9,6 @@ env:
|
||||
GO111MODULE: auto
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- main
|
||||
- releases/v*
|
||||
pull_request:
|
||||
types:
|
||||
- opened
|
||||
@@ -56,42 +53,8 @@ jobs:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
include:
|
||||
- os: macos-latest
|
||||
version: stable-v2.17.6
|
||||
- os: ubuntu-latest
|
||||
version: stable-v2.17.6
|
||||
- os: macos-latest
|
||||
version: stable-v2.18.4
|
||||
- os: ubuntu-latest
|
||||
version: stable-v2.18.4
|
||||
- os: macos-latest
|
||||
version: stable-v2.19.4
|
||||
- os: ubuntu-latest
|
||||
version: stable-v2.19.4
|
||||
- os: macos-latest
|
||||
version: stable-v2.20.7
|
||||
- os: ubuntu-latest
|
||||
version: stable-v2.20.7
|
||||
- os: macos-latest
|
||||
version: stable-v2.21.4
|
||||
- os: ubuntu-latest
|
||||
version: stable-v2.21.4
|
||||
- os: macos-latest
|
||||
version: stable-v2.22.4
|
||||
- os: ubuntu-latest
|
||||
version: stable-v2.22.4
|
||||
- os: macos-latest
|
||||
version: default
|
||||
- os: ubuntu-latest
|
||||
version: default
|
||||
- os: macos-latest
|
||||
version: linked
|
||||
- os: ubuntu-latest
|
||||
version: linked
|
||||
- os: macos-latest
|
||||
version: nightly-latest
|
||||
- os: ubuntu-latest
|
||||
version: nightly-latest
|
||||
name: Multi-language repository
|
||||
if: github.triggering_actor != 'dependabot[bot]'
|
||||
permissions:
|
||||
@@ -185,6 +148,3 @@ jobs:
|
||||
echo "Did not create a database for Swift, or created it in the wrong location."
|
||||
exit 1
|
||||
fi
|
||||
env:
|
||||
CODEQL_ACTION_RESOLVE_SUPPORTED_LANGUAGES_USING_CLI: true
|
||||
CODEQL_ACTION_TEST_MODE: true
|
||||
|
||||
31
lib/analyze-action.js
generated
31
lib/analyze-action.js
generated
@@ -89746,9 +89746,6 @@ function getErrorMessage(error2) {
|
||||
}
|
||||
async function checkDiskUsage(logger) {
|
||||
try {
|
||||
if (process.platform === "darwin" && (process.arch === "arm" || process.arch === "arm64") && !await checkSipEnablement(logger)) {
|
||||
return void 0;
|
||||
}
|
||||
const diskUsage = await fsPromises4.statfs(
|
||||
getRequiredEnvParam("GITHUB_WORKSPACE")
|
||||
);
|
||||
@@ -89800,34 +89797,6 @@ function satisfiesGHESVersion(ghesVersion, range, defaultIfInvalid) {
|
||||
function cloneObject(obj) {
|
||||
return JSON.parse(JSON.stringify(obj));
|
||||
}
|
||||
async function checkSipEnablement(logger) {
|
||||
if (process.env["CODEQL_ACTION_IS_SIP_ENABLED" /* IS_SIP_ENABLED */] !== void 0 && ["true", "false"].includes(process.env["CODEQL_ACTION_IS_SIP_ENABLED" /* IS_SIP_ENABLED */])) {
|
||||
return process.env["CODEQL_ACTION_IS_SIP_ENABLED" /* IS_SIP_ENABLED */] === "true";
|
||||
}
|
||||
try {
|
||||
const sipStatusOutput = await exec.getExecOutput("csrutil status");
|
||||
if (sipStatusOutput.exitCode === 0) {
|
||||
if (sipStatusOutput.stdout.includes(
|
||||
"System Integrity Protection status: enabled."
|
||||
)) {
|
||||
core3.exportVariable("CODEQL_ACTION_IS_SIP_ENABLED" /* IS_SIP_ENABLED */, "true");
|
||||
return true;
|
||||
}
|
||||
if (sipStatusOutput.stdout.includes(
|
||||
"System Integrity Protection status: disabled."
|
||||
)) {
|
||||
core3.exportVariable("CODEQL_ACTION_IS_SIP_ENABLED" /* IS_SIP_ENABLED */, "false");
|
||||
return false;
|
||||
}
|
||||
}
|
||||
return void 0;
|
||||
} catch (e) {
|
||||
logger.warning(
|
||||
`Failed to determine if System Integrity Protection was enabled: ${e}`
|
||||
);
|
||||
return void 0;
|
||||
}
|
||||
}
|
||||
async function cleanUpGlob(glob2, name, logger) {
|
||||
logger.debug(`Cleaning up ${name}.`);
|
||||
try {
|
||||
|
||||
31
lib/autobuild-action.js
generated
31
lib/autobuild-action.js
generated
@@ -78904,9 +78904,6 @@ function getErrorMessage(error2) {
|
||||
}
|
||||
async function checkDiskUsage(logger) {
|
||||
try {
|
||||
if (process.platform === "darwin" && (process.arch === "arm" || process.arch === "arm64") && !await checkSipEnablement(logger)) {
|
||||
return void 0;
|
||||
}
|
||||
const diskUsage = await fsPromises.statfs(
|
||||
getRequiredEnvParam("GITHUB_WORKSPACE")
|
||||
);
|
||||
@@ -78950,34 +78947,6 @@ function checkActionVersion(version, githubVersion) {
|
||||
function cloneObject(obj) {
|
||||
return JSON.parse(JSON.stringify(obj));
|
||||
}
|
||||
async function checkSipEnablement(logger) {
|
||||
if (process.env["CODEQL_ACTION_IS_SIP_ENABLED" /* IS_SIP_ENABLED */] !== void 0 && ["true", "false"].includes(process.env["CODEQL_ACTION_IS_SIP_ENABLED" /* IS_SIP_ENABLED */])) {
|
||||
return process.env["CODEQL_ACTION_IS_SIP_ENABLED" /* IS_SIP_ENABLED */] === "true";
|
||||
}
|
||||
try {
|
||||
const sipStatusOutput = await exec.getExecOutput("csrutil status");
|
||||
if (sipStatusOutput.exitCode === 0) {
|
||||
if (sipStatusOutput.stdout.includes(
|
||||
"System Integrity Protection status: enabled."
|
||||
)) {
|
||||
core3.exportVariable("CODEQL_ACTION_IS_SIP_ENABLED" /* IS_SIP_ENABLED */, "true");
|
||||
return true;
|
||||
}
|
||||
if (sipStatusOutput.stdout.includes(
|
||||
"System Integrity Protection status: disabled."
|
||||
)) {
|
||||
core3.exportVariable("CODEQL_ACTION_IS_SIP_ENABLED" /* IS_SIP_ENABLED */, "false");
|
||||
return false;
|
||||
}
|
||||
}
|
||||
return void 0;
|
||||
} catch (e) {
|
||||
logger.warning(
|
||||
`Failed to determine if System Integrity Protection was enabled: ${e}`
|
||||
);
|
||||
return void 0;
|
||||
}
|
||||
}
|
||||
async function asyncFilter(array, predicate) {
|
||||
const results = await Promise.all(array.map(predicate));
|
||||
return array.filter((_, index) => results[index]);
|
||||
|
||||
31
lib/init-action-post.js
generated
31
lib/init-action-post.js
generated
@@ -128022,9 +128022,6 @@ function getErrorMessage(error2) {
|
||||
}
|
||||
async function checkDiskUsage(logger) {
|
||||
try {
|
||||
if (process.platform === "darwin" && (process.arch === "arm" || process.arch === "arm64") && !await checkSipEnablement(logger)) {
|
||||
return void 0;
|
||||
}
|
||||
const diskUsage = await fsPromises4.statfs(
|
||||
getRequiredEnvParam("GITHUB_WORKSPACE")
|
||||
);
|
||||
@@ -128062,34 +128059,6 @@ function satisfiesGHESVersion(ghesVersion, range, defaultIfInvalid) {
|
||||
function cloneObject(obj) {
|
||||
return JSON.parse(JSON.stringify(obj));
|
||||
}
|
||||
async function checkSipEnablement(logger) {
|
||||
if (process.env["CODEQL_ACTION_IS_SIP_ENABLED" /* IS_SIP_ENABLED */] !== void 0 && ["true", "false"].includes(process.env["CODEQL_ACTION_IS_SIP_ENABLED" /* IS_SIP_ENABLED */])) {
|
||||
return process.env["CODEQL_ACTION_IS_SIP_ENABLED" /* IS_SIP_ENABLED */] === "true";
|
||||
}
|
||||
try {
|
||||
const sipStatusOutput = await exec.getExecOutput("csrutil status");
|
||||
if (sipStatusOutput.exitCode === 0) {
|
||||
if (sipStatusOutput.stdout.includes(
|
||||
"System Integrity Protection status: enabled."
|
||||
)) {
|
||||
core3.exportVariable("CODEQL_ACTION_IS_SIP_ENABLED" /* IS_SIP_ENABLED */, "true");
|
||||
return true;
|
||||
}
|
||||
if (sipStatusOutput.stdout.includes(
|
||||
"System Integrity Protection status: disabled."
|
||||
)) {
|
||||
core3.exportVariable("CODEQL_ACTION_IS_SIP_ENABLED" /* IS_SIP_ENABLED */, "false");
|
||||
return false;
|
||||
}
|
||||
}
|
||||
return void 0;
|
||||
} catch (e) {
|
||||
logger.warning(
|
||||
`Failed to determine if System Integrity Protection was enabled: ${e}`
|
||||
);
|
||||
return void 0;
|
||||
}
|
||||
}
|
||||
async function cleanUpGlob(glob2, name, logger) {
|
||||
logger.debug(`Cleaning up ${name}.`);
|
||||
try {
|
||||
|
||||
31
lib/init-action.js
generated
31
lib/init-action.js
generated
@@ -87061,9 +87061,6 @@ function prettyPrintPack(pack) {
|
||||
}
|
||||
async function checkDiskUsage(logger) {
|
||||
try {
|
||||
if (process.platform === "darwin" && (process.arch === "arm" || process.arch === "arm64") && !await checkSipEnablement(logger)) {
|
||||
return void 0;
|
||||
}
|
||||
const diskUsage = await fsPromises4.statfs(
|
||||
getRequiredEnvParam("GITHUB_WORKSPACE")
|
||||
);
|
||||
@@ -87121,34 +87118,6 @@ var BuildMode = /* @__PURE__ */ ((BuildMode3) => {
|
||||
function cloneObject(obj) {
|
||||
return JSON.parse(JSON.stringify(obj));
|
||||
}
|
||||
async function checkSipEnablement(logger) {
|
||||
if (process.env["CODEQL_ACTION_IS_SIP_ENABLED" /* IS_SIP_ENABLED */] !== void 0 && ["true", "false"].includes(process.env["CODEQL_ACTION_IS_SIP_ENABLED" /* IS_SIP_ENABLED */])) {
|
||||
return process.env["CODEQL_ACTION_IS_SIP_ENABLED" /* IS_SIP_ENABLED */] === "true";
|
||||
}
|
||||
try {
|
||||
const sipStatusOutput = await exec.getExecOutput("csrutil status");
|
||||
if (sipStatusOutput.exitCode === 0) {
|
||||
if (sipStatusOutput.stdout.includes(
|
||||
"System Integrity Protection status: enabled."
|
||||
)) {
|
||||
core3.exportVariable("CODEQL_ACTION_IS_SIP_ENABLED" /* IS_SIP_ENABLED */, "true");
|
||||
return true;
|
||||
}
|
||||
if (sipStatusOutput.stdout.includes(
|
||||
"System Integrity Protection status: disabled."
|
||||
)) {
|
||||
core3.exportVariable("CODEQL_ACTION_IS_SIP_ENABLED" /* IS_SIP_ENABLED */, "false");
|
||||
return false;
|
||||
}
|
||||
}
|
||||
return void 0;
|
||||
} catch (e) {
|
||||
logger.warning(
|
||||
`Failed to determine if System Integrity Protection was enabled: ${e}`
|
||||
);
|
||||
return void 0;
|
||||
}
|
||||
}
|
||||
async function cleanUpGlob(glob2, name, logger) {
|
||||
logger.debug(`Cleaning up ${name}.`);
|
||||
try {
|
||||
|
||||
31
lib/resolve-environment-action.js
generated
31
lib/resolve-environment-action.js
generated
@@ -78916,9 +78916,6 @@ function getErrorMessage(error2) {
|
||||
}
|
||||
async function checkDiskUsage(logger) {
|
||||
try {
|
||||
if (process.platform === "darwin" && (process.arch === "arm" || process.arch === "arm64") && !await checkSipEnablement(logger)) {
|
||||
return void 0;
|
||||
}
|
||||
const diskUsage = await fsPromises.statfs(
|
||||
getRequiredEnvParam("GITHUB_WORKSPACE")
|
||||
);
|
||||
@@ -78962,34 +78959,6 @@ function checkActionVersion(version, githubVersion) {
|
||||
function cloneObject(obj) {
|
||||
return JSON.parse(JSON.stringify(obj));
|
||||
}
|
||||
async function checkSipEnablement(logger) {
|
||||
if (process.env["CODEQL_ACTION_IS_SIP_ENABLED" /* IS_SIP_ENABLED */] !== void 0 && ["true", "false"].includes(process.env["CODEQL_ACTION_IS_SIP_ENABLED" /* IS_SIP_ENABLED */])) {
|
||||
return process.env["CODEQL_ACTION_IS_SIP_ENABLED" /* IS_SIP_ENABLED */] === "true";
|
||||
}
|
||||
try {
|
||||
const sipStatusOutput = await exec.getExecOutput("csrutil status");
|
||||
if (sipStatusOutput.exitCode === 0) {
|
||||
if (sipStatusOutput.stdout.includes(
|
||||
"System Integrity Protection status: enabled."
|
||||
)) {
|
||||
core3.exportVariable("CODEQL_ACTION_IS_SIP_ENABLED" /* IS_SIP_ENABLED */, "true");
|
||||
return true;
|
||||
}
|
||||
if (sipStatusOutput.stdout.includes(
|
||||
"System Integrity Protection status: disabled."
|
||||
)) {
|
||||
core3.exportVariable("CODEQL_ACTION_IS_SIP_ENABLED" /* IS_SIP_ENABLED */, "false");
|
||||
return false;
|
||||
}
|
||||
}
|
||||
return void 0;
|
||||
} catch (e) {
|
||||
logger.warning(
|
||||
`Failed to determine if System Integrity Protection was enabled: ${e}`
|
||||
);
|
||||
return void 0;
|
||||
}
|
||||
}
|
||||
async function asyncSome(array, predicate) {
|
||||
const results = await Promise.all(array.map(predicate));
|
||||
return results.some((result) => result);
|
||||
|
||||
31
lib/setup-codeql-action.js
generated
31
lib/setup-codeql-action.js
generated
@@ -85571,9 +85571,6 @@ function getErrorMessage(error2) {
|
||||
}
|
||||
async function checkDiskUsage(logger) {
|
||||
try {
|
||||
if (process.platform === "darwin" && (process.arch === "arm" || process.arch === "arm64") && !await checkSipEnablement(logger)) {
|
||||
return void 0;
|
||||
}
|
||||
const diskUsage = await fsPromises4.statfs(
|
||||
getRequiredEnvParam("GITHUB_WORKSPACE")
|
||||
);
|
||||
@@ -85617,34 +85614,6 @@ function checkActionVersion(version, githubVersion) {
|
||||
function cloneObject(obj) {
|
||||
return JSON.parse(JSON.stringify(obj));
|
||||
}
|
||||
async function checkSipEnablement(logger) {
|
||||
if (process.env["CODEQL_ACTION_IS_SIP_ENABLED" /* IS_SIP_ENABLED */] !== void 0 && ["true", "false"].includes(process.env["CODEQL_ACTION_IS_SIP_ENABLED" /* IS_SIP_ENABLED */])) {
|
||||
return process.env["CODEQL_ACTION_IS_SIP_ENABLED" /* IS_SIP_ENABLED */] === "true";
|
||||
}
|
||||
try {
|
||||
const sipStatusOutput = await exec.getExecOutput("csrutil status");
|
||||
if (sipStatusOutput.exitCode === 0) {
|
||||
if (sipStatusOutput.stdout.includes(
|
||||
"System Integrity Protection status: enabled."
|
||||
)) {
|
||||
core3.exportVariable("CODEQL_ACTION_IS_SIP_ENABLED" /* IS_SIP_ENABLED */, "true");
|
||||
return true;
|
||||
}
|
||||
if (sipStatusOutput.stdout.includes(
|
||||
"System Integrity Protection status: disabled."
|
||||
)) {
|
||||
core3.exportVariable("CODEQL_ACTION_IS_SIP_ENABLED" /* IS_SIP_ENABLED */, "false");
|
||||
return false;
|
||||
}
|
||||
}
|
||||
return void 0;
|
||||
} catch (e) {
|
||||
logger.warning(
|
||||
`Failed to determine if System Integrity Protection was enabled: ${e}`
|
||||
);
|
||||
return void 0;
|
||||
}
|
||||
}
|
||||
async function cleanUpGlob(glob, name, logger) {
|
||||
logger.debug(`Cleaning up ${name}.`);
|
||||
try {
|
||||
|
||||
31
lib/start-proxy-action.js
generated
31
lib/start-proxy-action.js
generated
@@ -96010,9 +96010,6 @@ function getErrorMessage(error2) {
|
||||
}
|
||||
async function checkDiskUsage(logger) {
|
||||
try {
|
||||
if (process.platform === "darwin" && (process.arch === "arm" || process.arch === "arm64") && !await checkSipEnablement(logger)) {
|
||||
return void 0;
|
||||
}
|
||||
const diskUsage = await fsPromises.statfs(
|
||||
getRequiredEnvParam("GITHUB_WORKSPACE")
|
||||
);
|
||||
@@ -96039,34 +96036,6 @@ async function checkDiskUsage(logger) {
|
||||
return void 0;
|
||||
}
|
||||
}
|
||||
async function checkSipEnablement(logger) {
|
||||
if (process.env["CODEQL_ACTION_IS_SIP_ENABLED" /* IS_SIP_ENABLED */] !== void 0 && ["true", "false"].includes(process.env["CODEQL_ACTION_IS_SIP_ENABLED" /* IS_SIP_ENABLED */])) {
|
||||
return process.env["CODEQL_ACTION_IS_SIP_ENABLED" /* IS_SIP_ENABLED */] === "true";
|
||||
}
|
||||
try {
|
||||
const sipStatusOutput = await exec.getExecOutput("csrutil status");
|
||||
if (sipStatusOutput.exitCode === 0) {
|
||||
if (sipStatusOutput.stdout.includes(
|
||||
"System Integrity Protection status: enabled."
|
||||
)) {
|
||||
core3.exportVariable("CODEQL_ACTION_IS_SIP_ENABLED" /* IS_SIP_ENABLED */, "true");
|
||||
return true;
|
||||
}
|
||||
if (sipStatusOutput.stdout.includes(
|
||||
"System Integrity Protection status: disabled."
|
||||
)) {
|
||||
core3.exportVariable("CODEQL_ACTION_IS_SIP_ENABLED" /* IS_SIP_ENABLED */, "false");
|
||||
return false;
|
||||
}
|
||||
}
|
||||
return void 0;
|
||||
} catch (e) {
|
||||
logger.warning(
|
||||
`Failed to determine if System Integrity Protection was enabled: ${e}`
|
||||
);
|
||||
return void 0;
|
||||
}
|
||||
}
|
||||
function isDefined(value) {
|
||||
return value !== void 0 && value !== null;
|
||||
}
|
||||
|
||||
31
lib/upload-sarif-action.js
generated
31
lib/upload-sarif-action.js
generated
@@ -88391,9 +88391,6 @@ function getErrorMessage(error2) {
|
||||
}
|
||||
async function checkDiskUsage(logger) {
|
||||
try {
|
||||
if (process.platform === "darwin" && (process.arch === "arm" || process.arch === "arm64") && !await checkSipEnablement(logger)) {
|
||||
return void 0;
|
||||
}
|
||||
const diskUsage = await fsPromises4.statfs(
|
||||
getRequiredEnvParam("GITHUB_WORKSPACE")
|
||||
);
|
||||
@@ -88445,34 +88442,6 @@ function satisfiesGHESVersion(ghesVersion, range, defaultIfInvalid) {
|
||||
function cloneObject(obj) {
|
||||
return JSON.parse(JSON.stringify(obj));
|
||||
}
|
||||
async function checkSipEnablement(logger) {
|
||||
if (process.env["CODEQL_ACTION_IS_SIP_ENABLED" /* IS_SIP_ENABLED */] !== void 0 && ["true", "false"].includes(process.env["CODEQL_ACTION_IS_SIP_ENABLED" /* IS_SIP_ENABLED */])) {
|
||||
return process.env["CODEQL_ACTION_IS_SIP_ENABLED" /* IS_SIP_ENABLED */] === "true";
|
||||
}
|
||||
try {
|
||||
const sipStatusOutput = await exec.getExecOutput("csrutil status");
|
||||
if (sipStatusOutput.exitCode === 0) {
|
||||
if (sipStatusOutput.stdout.includes(
|
||||
"System Integrity Protection status: enabled."
|
||||
)) {
|
||||
core3.exportVariable("CODEQL_ACTION_IS_SIP_ENABLED" /* IS_SIP_ENABLED */, "true");
|
||||
return true;
|
||||
}
|
||||
if (sipStatusOutput.stdout.includes(
|
||||
"System Integrity Protection status: disabled."
|
||||
)) {
|
||||
core3.exportVariable("CODEQL_ACTION_IS_SIP_ENABLED" /* IS_SIP_ENABLED */, "false");
|
||||
return false;
|
||||
}
|
||||
}
|
||||
return void 0;
|
||||
} catch (e) {
|
||||
logger.warning(
|
||||
`Failed to determine if System Integrity Protection was enabled: ${e}`
|
||||
);
|
||||
return void 0;
|
||||
}
|
||||
}
|
||||
async function cleanUpGlob(glob, name, logger) {
|
||||
logger.debug(`Cleaning up ${name}.`);
|
||||
try {
|
||||
|
||||
@@ -1099,15 +1099,6 @@ export async function checkDiskUsage(
|
||||
logger: Logger,
|
||||
): Promise<DiskUsage | undefined> {
|
||||
try {
|
||||
// We avoid running the `df` binary under the hood for macOS ARM runners with SIP disabled.
|
||||
if (
|
||||
process.platform === "darwin" &&
|
||||
(process.arch === "arm" || process.arch === "arm64") &&
|
||||
!(await checkSipEnablement(logger))
|
||||
) {
|
||||
return undefined;
|
||||
}
|
||||
|
||||
const diskUsage = await fsPromises.statfs(
|
||||
getRequiredEnvParam("GITHUB_WORKSPACE"),
|
||||
);
|
||||
|
||||
Reference in New Issue
Block a user