mirror of
https://github.com/github/codeql-action.git
synced 2026-05-02 20:00:15 +00:00
Merge branch 'main' into henrymercer/dead-code-elimination
This commit is contained in:
Generated
+40
-23
@@ -27627,7 +27627,7 @@ var require_package = __commonJS({
|
||||
"package.json"(exports2, module2) {
|
||||
module2.exports = {
|
||||
name: "codeql",
|
||||
version: "4.31.4",
|
||||
version: "4.31.5",
|
||||
private: true,
|
||||
description: "CodeQL action",
|
||||
scripts: {
|
||||
@@ -27676,7 +27676,7 @@ var require_package = __commonJS({
|
||||
},
|
||||
devDependencies: {
|
||||
"@ava/typescript": "6.0.0",
|
||||
"@eslint/compat": "^1.4.1",
|
||||
"@eslint/compat": "^2.0.0",
|
||||
"@eslint/eslintrc": "^3.3.1",
|
||||
"@eslint/js": "^9.39.1",
|
||||
"@microsoft/eslint-formatter-sarif": "^3.1.0",
|
||||
@@ -27687,7 +27687,7 @@ var require_package = __commonJS({
|
||||
"@types/node": "^20.19.9",
|
||||
"@types/node-forge": "^1.3.14",
|
||||
"@types/semver": "^7.7.1",
|
||||
"@types/sinon": "^17.0.4",
|
||||
"@types/sinon": "^21.0.0",
|
||||
"@typescript-eslint/eslint-plugin": "^8.46.4",
|
||||
"@typescript-eslint/parser": "^8.41.0",
|
||||
ava: "^6.4.1",
|
||||
@@ -27697,7 +27697,7 @@ var require_package = __commonJS({
|
||||
"eslint-plugin-filenames": "^1.3.2",
|
||||
"eslint-plugin-github": "^5.1.8",
|
||||
"eslint-plugin-import": "2.29.1",
|
||||
"eslint-plugin-jsdoc": "^61.1.12",
|
||||
"eslint-plugin-jsdoc": "^61.2.1",
|
||||
"eslint-plugin-no-async-foreach": "^0.1.1",
|
||||
glob: "^11.1.0",
|
||||
nock: "^14.0.10",
|
||||
@@ -85852,7 +85852,7 @@ function formatDuration(durationMs) {
|
||||
}
|
||||
|
||||
// src/overlay-database-utils.ts
|
||||
var CODEQL_OVERLAY_MINIMUM_VERSION = "2.22.4";
|
||||
var CODEQL_OVERLAY_MINIMUM_VERSION = "2.23.5";
|
||||
var OVERLAY_BASE_DATABASE_MAX_UPLOAD_SIZE_MB = 7500;
|
||||
var OVERLAY_BASE_DATABASE_MAX_UPLOAD_SIZE_BYTES = OVERLAY_BASE_DATABASE_MAX_UPLOAD_SIZE_MB * 1e6;
|
||||
async function writeBaseDatabaseOidsFile(config, sourceRoot) {
|
||||
@@ -86106,6 +86106,11 @@ var featureConfig = {
|
||||
legacyApi: true,
|
||||
minimumVersion: void 0
|
||||
},
|
||||
["java_minimize_dependency_jars" /* JavaMinimizeDependencyJars */]: {
|
||||
defaultValue: false,
|
||||
envVar: "CODEQL_ACTION_JAVA_MINIMIZE_DEPENDENCY_JARS",
|
||||
minimumVersion: "2.23.0"
|
||||
},
|
||||
["overlay_analysis" /* OverlayAnalysis */]: {
|
||||
defaultValue: false,
|
||||
envVar: "CODEQL_ACTION_OVERLAY_ANALYSIS",
|
||||
@@ -86217,21 +86222,21 @@ var featureConfig = {
|
||||
minimumVersion: void 0,
|
||||
toolsFeature: "pythonDefaultIsToNotExtractStdlib" /* PythonDefaultIsToNotExtractStdlib */
|
||||
},
|
||||
["use_repository_properties" /* UseRepositoryProperties */]: {
|
||||
defaultValue: false,
|
||||
envVar: "CODEQL_ACTION_USE_REPOSITORY_PROPERTIES",
|
||||
minimumVersion: void 0
|
||||
},
|
||||
["qa_telemetry_enabled" /* QaTelemetryEnabled */]: {
|
||||
defaultValue: false,
|
||||
envVar: "CODEQL_ACTION_QA_TELEMETRY",
|
||||
legacyApi: true,
|
||||
minimumVersion: void 0
|
||||
},
|
||||
["java_minimize_dependency_jars" /* JavaMinimizeDependencyJars */]: {
|
||||
["upload_overlay_db_to_api" /* UploadOverlayDbToApi */]: {
|
||||
defaultValue: false,
|
||||
envVar: "CODEQL_ACTION_JAVA_MINIMIZE_DEPENDENCY_JARS",
|
||||
minimumVersion: "2.23.0"
|
||||
envVar: "CODEQL_ACTION_UPLOAD_OVERLAY_DB_TO_API",
|
||||
minimumVersion: void 0
|
||||
},
|
||||
["use_repository_properties" /* UseRepositoryProperties */]: {
|
||||
defaultValue: false,
|
||||
envVar: "CODEQL_ACTION_USE_REPOSITORY_PROPERTIES",
|
||||
minimumVersion: void 0
|
||||
},
|
||||
["validate_db_config" /* ValidateDbConfig */]: {
|
||||
defaultValue: false,
|
||||
@@ -86651,6 +86656,8 @@ async function cachePrefix(codeql, language) {
|
||||
}
|
||||
|
||||
// src/config-utils.ts
|
||||
var OVERLAY_MINIMUM_AVAILABLE_DISK_SPACE_MB = 2e4;
|
||||
var OVERLAY_MINIMUM_AVAILABLE_DISK_SPACE_BYTES = OVERLAY_MINIMUM_AVAILABLE_DISK_SPACE_MB * 1e6;
|
||||
async function getSupportedLanguageMap(codeql, logger) {
|
||||
const resolveSupportedLanguagesUsingCli = await codeql.supportsFeature(
|
||||
"builtinExtractorsSpecifyDefaultQueries" /* BuiltinExtractorsSpecifyDefaultQueries */
|
||||
@@ -86923,18 +86930,28 @@ async function getOverlayDatabaseMode(codeql, features, languages, sourceRoot, b
|
||||
languages,
|
||||
codeScanningConfig
|
||||
)) {
|
||||
if (isAnalyzingPullRequest()) {
|
||||
overlayDatabaseMode = "overlay" /* Overlay */;
|
||||
useOverlayDatabaseCaching = true;
|
||||
const diskUsage = await checkDiskUsage(logger);
|
||||
if (diskUsage === void 0 || diskUsage.numAvailableBytes < OVERLAY_MINIMUM_AVAILABLE_DISK_SPACE_BYTES) {
|
||||
const diskSpaceMb = diskUsage === void 0 ? 0 : Math.round(diskUsage.numAvailableBytes / 1e6);
|
||||
overlayDatabaseMode = "none" /* None */;
|
||||
useOverlayDatabaseCaching = false;
|
||||
logger.info(
|
||||
`Setting overlay database mode to ${overlayDatabaseMode} with caching because we are analyzing a pull request.`
|
||||
);
|
||||
} else if (await isAnalyzingDefaultBranch()) {
|
||||
overlayDatabaseMode = "overlay-base" /* OverlayBase */;
|
||||
useOverlayDatabaseCaching = true;
|
||||
logger.info(
|
||||
`Setting overlay database mode to ${overlayDatabaseMode} with caching because we are analyzing the default branch.`
|
||||
`Setting overlay database mode to ${overlayDatabaseMode} due to insufficient disk space (${diskSpaceMb} MB).`
|
||||
);
|
||||
} else {
|
||||
if (isAnalyzingPullRequest()) {
|
||||
overlayDatabaseMode = "overlay" /* Overlay */;
|
||||
useOverlayDatabaseCaching = true;
|
||||
logger.info(
|
||||
`Setting overlay database mode to ${overlayDatabaseMode} with caching because we are analyzing a pull request.`
|
||||
);
|
||||
} else if (await isAnalyzingDefaultBranch()) {
|
||||
overlayDatabaseMode = "overlay-base" /* OverlayBase */;
|
||||
useOverlayDatabaseCaching = true;
|
||||
logger.info(
|
||||
`Setting overlay database mode to ${overlayDatabaseMode} with caching because we are analyzing the default branch.`
|
||||
);
|
||||
}
|
||||
}
|
||||
}
|
||||
const nonOverlayAnalysis = {
|
||||
|
||||
Reference in New Issue
Block a user