mirror of
https://github.com/github/codeql-action.git
synced 2025-12-06 07:48:17 +08:00
Compare commits
3 Commits
f5c63fadd5
...
henrymerce
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
227561a021 | ||
|
|
d1442de855 | ||
|
|
456442f230 |
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
@@ -89881,9 +89881,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 checkDiskSpace(
|
||||
getRequiredEnvParam("GITHUB_WORKSPACE")
|
||||
);
|
||||
@@ -89934,34 +89931,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
@@ -79039,9 +79039,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 checkDiskSpace(
|
||||
getRequiredEnvParam("GITHUB_WORKSPACE")
|
||||
);
|
||||
@@ -79084,34 +79081,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
@@ -128157,9 +128157,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 checkDiskSpace(
|
||||
getRequiredEnvParam("GITHUB_WORKSPACE")
|
||||
);
|
||||
@@ -128196,34 +128193,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
@@ -87196,9 +87196,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 checkDiskSpace(
|
||||
getRequiredEnvParam("GITHUB_WORKSPACE")
|
||||
);
|
||||
@@ -87255,34 +87252,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
@@ -79051,9 +79051,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 checkDiskSpace(
|
||||
getRequiredEnvParam("GITHUB_WORKSPACE")
|
||||
);
|
||||
@@ -79096,34 +79093,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
@@ -85706,9 +85706,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 checkDiskSpace(
|
||||
getRequiredEnvParam("GITHUB_WORKSPACE")
|
||||
);
|
||||
@@ -85751,34 +85748,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
@@ -96145,9 +96145,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 checkDiskSpace(
|
||||
getRequiredEnvParam("GITHUB_WORKSPACE")
|
||||
);
|
||||
@@ -96173,34 +96170,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
@@ -88526,9 +88526,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 checkDiskSpace(
|
||||
getRequiredEnvParam("GITHUB_WORKSPACE")
|
||||
);
|
||||
@@ -88579,34 +88576,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 checkDiskSpace(
|
||||
getRequiredEnvParam("GITHUB_WORKSPACE"),
|
||||
);
|
||||
|
||||
Reference in New Issue
Block a user