Remove bundled copy of actions extractor
This commit is contained in:
parent
83923549f6
commit
c29cab9aac
7 changed files with 1 additions and 139 deletions
|
|
@ -1,44 +0,0 @@
|
||||||
name: "actions"
|
|
||||||
aliases: []
|
|
||||||
display_name: "GitHub Actions"
|
|
||||||
version: 0.0.1
|
|
||||||
column_kind: "utf16"
|
|
||||||
unicode_newlines: true
|
|
||||||
build_modes:
|
|
||||||
- none
|
|
||||||
file_coverage_languages: []
|
|
||||||
github_api_languages: []
|
|
||||||
scc_languages: []
|
|
||||||
file_types:
|
|
||||||
- name: workflow
|
|
||||||
display_name: GitHub Actions workflow files
|
|
||||||
extensions:
|
|
||||||
- .yml
|
|
||||||
- .yaml
|
|
||||||
forwarded_extractor_name: javascript
|
|
||||||
options:
|
|
||||||
trap:
|
|
||||||
title: TRAP options
|
|
||||||
description: Options about how the extractor handles TRAP files
|
|
||||||
type: object
|
|
||||||
visibility: 3
|
|
||||||
properties:
|
|
||||||
cache:
|
|
||||||
title: TRAP cache options
|
|
||||||
description: Options about how the extractor handles its TRAP cache
|
|
||||||
type: object
|
|
||||||
properties:
|
|
||||||
dir:
|
|
||||||
title: TRAP cache directory
|
|
||||||
description: The directory of the TRAP cache to use
|
|
||||||
type: string
|
|
||||||
bound:
|
|
||||||
title: TRAP cache bound
|
|
||||||
description: A soft limit (in MB) on the size of the TRAP cache
|
|
||||||
type: string
|
|
||||||
pattern: "[0-9]+"
|
|
||||||
write:
|
|
||||||
title: TRAP cache writeable
|
|
||||||
description: Whether to write to the TRAP cache as well as reading it
|
|
||||||
type: string
|
|
||||||
pattern: "(true|TRUE|false|FALSE)"
|
|
||||||
|
|
@ -1,40 +0,0 @@
|
||||||
if (($null -ne $env:LGTM_INDEX_INCLUDE) -or ($null -ne $env:LGTM_INDEX_EXCLUDE) -or ($null -ne $env:LGTM_INDEX_FILTERS)) {
|
|
||||||
Write-Output 'Path filters set. Passing them through to the JavaScript extractor.'
|
|
||||||
} else {
|
|
||||||
Write-Output 'No path filters set. Using the default filters.'
|
|
||||||
$DefaultPathFilters = @(
|
|
||||||
'exclude:**/*',
|
|
||||||
'include:.github/workflows/**/*.yml',
|
|
||||||
'include:.github/workflows/**/*.yaml',
|
|
||||||
'include:**/action.yml',
|
|
||||||
'include:**/action.yaml'
|
|
||||||
)
|
|
||||||
|
|
||||||
$env:LGTM_INDEX_FILTERS = $DefaultPathFilters -join "`n"
|
|
||||||
}
|
|
||||||
|
|
||||||
# Find the JavaScript extractor directory via `codeql resolve extractor`.
|
|
||||||
$CodeQL = Join-Path $env:CODEQL_DIST 'codeql.exe'
|
|
||||||
$env:CODEQL_EXTRACTOR_JAVASCRIPT_ROOT = &$CodeQL resolve extractor --language javascript
|
|
||||||
if ($LASTEXITCODE -ne 0) {
|
|
||||||
throw 'Failed to resolve JavaScript extractor.'
|
|
||||||
}
|
|
||||||
|
|
||||||
Write-Output "Found JavaScript extractor at '${env:CODEQL_EXTRACTOR_JAVASCRIPT_ROOT}'."
|
|
||||||
|
|
||||||
# Run the JavaScript autobuilder.
|
|
||||||
$JavaScriptAutoBuild = Join-Path $env:CODEQL_EXTRACTOR_JAVASCRIPT_ROOT 'tools\autobuild.cmd'
|
|
||||||
Write-Output "Running JavaScript autobuilder at '${JavaScriptAutoBuild}'."
|
|
||||||
|
|
||||||
# Copy the values of the Actions extractor environment variables to the JavaScript extractor environment variables.
|
|
||||||
$env:CODEQL_EXTRACTOR_JAVASCRIPT_DIAGNOSTIC_DIR = $env:CODEQL_EXTRACTOR_ACTIONS_DIAGNOSTIC_DIR
|
|
||||||
$env:CODEQL_EXTRACTOR_JAVASCRIPT_LOG_DIR = $env:CODEQL_EXTRACTOR_ACTIONS_LOG_DIR
|
|
||||||
$env:CODEQL_EXTRACTOR_JAVASCRIPT_SCRATCH_DIR = $env:CODEQL_EXTRACTOR_ACTIONS_SCRATCH_DIR
|
|
||||||
$env:CODEQL_EXTRACTOR_JAVASCRIPT_SOURCE_ARCHIVE_DIR = $env:CODEQL_EXTRACTOR_ACTIONS_SOURCE_ARCHIVE_DIR
|
|
||||||
$env:CODEQL_EXTRACTOR_JAVASCRIPT_TRAP_DIR = $env:CODEQL_EXTRACTOR_ACTIONS_TRAP_DIR
|
|
||||||
$env:CODEQL_EXTRACTOR_JAVASCRIPT_WIP_DATABASE = $env:CODEQL_EXTRACTOR_ACTIONS_WIP_DATABASE
|
|
||||||
|
|
||||||
&$JavaScriptAutoBuild
|
|
||||||
if ($LASTEXITCODE -ne 0) {
|
|
||||||
throw "JavaScript autobuilder failed."
|
|
||||||
}
|
|
||||||
|
|
@ -1,3 +0,0 @@
|
||||||
@echo off
|
|
||||||
rem All of the work is done in the PowerShell script
|
|
||||||
powershell.exe %~dp0autobuild-impl.ps1
|
|
||||||
|
|
@ -1,39 +0,0 @@
|
||||||
#!/bin/sh
|
|
||||||
|
|
||||||
set -eu
|
|
||||||
|
|
||||||
DEFAULT_PATH_FILTERS=$(cat << END
|
|
||||||
exclude:**/*
|
|
||||||
include:.github/workflows/**/*.yml
|
|
||||||
include:.github/workflows/**/*.yaml
|
|
||||||
include:**/action.yml
|
|
||||||
include:**/action.yaml
|
|
||||||
END
|
|
||||||
)
|
|
||||||
|
|
||||||
if [ -n "${LGTM_INDEX_INCLUDE:-}" ] || [ -n "${LGTM_INDEX_EXCLUDE:-}" ] || [ -n "${LGTM_INDEX_FILTERS:-}" ] ; then
|
|
||||||
echo "Path filters set. Passing them through to the JavaScript extractor."
|
|
||||||
else
|
|
||||||
echo "No path filters set. Using the default filters."
|
|
||||||
LGTM_INDEX_FILTERS="${DEFAULT_PATH_FILTERS}"
|
|
||||||
export LGTM_INDEX_FILTERS
|
|
||||||
fi
|
|
||||||
|
|
||||||
# Find the JavaScript extractor directory via `codeql resolve extractor`.
|
|
||||||
CODEQL_EXTRACTOR_JAVASCRIPT_ROOT="$($CODEQL_DIST/codeql resolve extractor --language javascript)"
|
|
||||||
export CODEQL_EXTRACTOR_JAVASCRIPT_ROOT
|
|
||||||
|
|
||||||
echo "Found JavaScript extractor at '${CODEQL_EXTRACTOR_JAVASCRIPT_ROOT}'."
|
|
||||||
|
|
||||||
# Run the JavaScript autobuilder
|
|
||||||
JAVASCRIPT_AUTO_BUILD="${CODEQL_EXTRACTOR_JAVASCRIPT_ROOT}/tools/autobuild.sh"
|
|
||||||
echo "Running JavaScript autobuilder at '${JAVASCRIPT_AUTO_BUILD}'."
|
|
||||||
|
|
||||||
# Copy the values of the Actions extractor environment variables to the JavaScript extractor environment variables.
|
|
||||||
env CODEQL_EXTRACTOR_JAVASCRIPT_DIAGNOSTIC_DIR="${CODEQL_EXTRACTOR_ACTIONS_DIAGNOSTIC_DIR}" \
|
|
||||||
CODEQL_EXTRACTOR_JAVASCRIPT_LOG_DIR="${CODEQL_EXTRACTOR_ACTIONS_LOG_DIR}" \
|
|
||||||
CODEQL_EXTRACTOR_JAVASCRIPT_SCRATCH_DIR="${CODEQL_EXTRACTOR_ACTIONS_SCRATCH_DIR}" \
|
|
||||||
CODEQL_EXTRACTOR_JAVASCRIPT_SOURCE_ARCHIVE_DIR="${CODEQL_EXTRACTOR_ACTIONS_SOURCE_ARCHIVE_DIR}" \
|
|
||||||
CODEQL_EXTRACTOR_JAVASCRIPT_TRAP_DIR="${CODEQL_EXTRACTOR_ACTIONS_TRAP_DIR}" \
|
|
||||||
CODEQL_EXTRACTOR_JAVASCRIPT_WIP_DATABASE="${CODEQL_EXTRACTOR_ACTIONS_WIP_DATABASE}" \
|
|
||||||
${JAVASCRIPT_AUTO_BUILD}
|
|
||||||
6
lib/codeql.js
generated
6
lib/codeql.js
generated
|
|
@ -54,7 +54,6 @@ const doc_url_1 = require("./doc-url");
|
||||||
const environment_1 = require("./environment");
|
const environment_1 = require("./environment");
|
||||||
const feature_flags_1 = require("./feature-flags");
|
const feature_flags_1 = require("./feature-flags");
|
||||||
const git_utils_1 = require("./git-utils");
|
const git_utils_1 = require("./git-utils");
|
||||||
const languages_1 = require("./languages");
|
|
||||||
const setupCodeql = __importStar(require("./setup-codeql"));
|
const setupCodeql = __importStar(require("./setup-codeql"));
|
||||||
const tools_features_1 = require("./tools-features");
|
const tools_features_1 = require("./tools-features");
|
||||||
const tracer_config_1 = require("./tracer-config");
|
const tracer_config_1 = require("./tracer-config");
|
||||||
|
|
@ -257,11 +256,6 @@ async function getCodeQLForCmd(cmd, checkVersion) {
|
||||||
extraArgs.push(...(await getTrapCachingExtractorConfigArgs(config)));
|
extraArgs.push(...(await getTrapCachingExtractorConfigArgs(config)));
|
||||||
extraArgs.push(`--trace-process-name=${processName}`);
|
extraArgs.push(`--trace-process-name=${processName}`);
|
||||||
}
|
}
|
||||||
if (config.languages.indexOf(languages_1.Language.actions) >= 0) {
|
|
||||||
extraArgs.push("--search-path");
|
|
||||||
const extractorPath = path.resolve(__dirname, "../actions-extractor");
|
|
||||||
extraArgs.push(extractorPath);
|
|
||||||
}
|
|
||||||
const codeScanningConfigFile = await generateCodeScanningConfig(config, logger);
|
const codeScanningConfigFile = await generateCodeScanningConfig(config, logger);
|
||||||
const externalRepositoryToken = (0, actions_util_1.getOptionalInput)("external-repository-token");
|
const externalRepositoryToken = (0, actions_util_1.getOptionalInput)("external-repository-token");
|
||||||
extraArgs.push(`--codescanning-config=${codeScanningConfigFile}`);
|
extraArgs.push(`--codescanning-config=${codeScanningConfigFile}`);
|
||||||
|
|
|
||||||
File diff suppressed because one or more lines are too long
|
|
@ -557,12 +557,6 @@ export async function getCodeQLForCmd(
|
||||||
extraArgs.push(`--trace-process-name=${processName}`);
|
extraArgs.push(`--trace-process-name=${processName}`);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (config.languages.indexOf(Language.actions) >= 0) {
|
|
||||||
extraArgs.push("--search-path");
|
|
||||||
const extractorPath = path.resolve(__dirname, "../actions-extractor");
|
|
||||||
extraArgs.push(extractorPath);
|
|
||||||
}
|
|
||||||
|
|
||||||
const codeScanningConfigFile = await generateCodeScanningConfig(
|
const codeScanningConfigFile = await generateCodeScanningConfig(
|
||||||
config,
|
config,
|
||||||
logger,
|
logger,
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue