mirror of
https://github.com/github/codeql-action.git
synced 2025-12-06 07:48:17 +08:00
Compare commits
12 Commits
fdbfb4d275
...
aibaars/ru
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
dfd54fee64 | ||
|
|
fc61332304 | ||
|
|
35218036de | ||
|
|
fbcce35bbf | ||
|
|
5cbac1c2c5 | ||
|
|
4f57ff0df1 | ||
|
|
e4a8b02bc5 | ||
|
|
ada32408de | ||
|
|
11ae525cfd | ||
|
|
8e97061217 | ||
|
|
9e009f1864 | ||
|
|
8a65a9e73d |
1
.github/workflows/__analyze-ref-input.yml
generated
vendored
1
.github/workflows/__analyze-ref-input.yml
generated
vendored
@@ -16,7 +16,6 @@ on:
|
||||
pull_request:
|
||||
types:
|
||||
- opened
|
||||
- synchronize
|
||||
- reopened
|
||||
- ready_for_review
|
||||
workflow_dispatch: {}
|
||||
|
||||
1
.github/workflows/__autobuild-action.yml
generated
vendored
1
.github/workflows/__autobuild-action.yml
generated
vendored
@@ -16,7 +16,6 @@ on:
|
||||
pull_request:
|
||||
types:
|
||||
- opened
|
||||
- synchronize
|
||||
- reopened
|
||||
- ready_for_review
|
||||
workflow_dispatch: {}
|
||||
|
||||
124
.github/workflows/__autobuild-macos-dotnet.yml
generated
vendored
124
.github/workflows/__autobuild-macos-dotnet.yml
generated
vendored
@@ -3,7 +3,7 @@
|
||||
# pip install ruamel.yaml && python3 sync.py
|
||||
# to regenerate this file.
|
||||
|
||||
name: 'PR Check - Autobuild '
|
||||
name: 'PR Check - Autobuild C# on macOS'
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
GO111MODULE: auto
|
||||
@@ -13,6 +13,7 @@ on:
|
||||
- main
|
||||
- releases/v1
|
||||
- releases/v2
|
||||
- aibaars/runner-autobuilders
|
||||
pull_request:
|
||||
types:
|
||||
- opened
|
||||
@@ -21,44 +22,87 @@ on:
|
||||
- ready_for_review
|
||||
workflow_dispatch: {}
|
||||
jobs:
|
||||
autobuild-macos-dotnet:
|
||||
strategy:
|
||||
matrix:
|
||||
include:
|
||||
- os: ubuntu-latest
|
||||
version: latest
|
||||
- os: macos-latest
|
||||
version: latest
|
||||
- os: windows-2019
|
||||
version: latest
|
||||
- os: windows-2022
|
||||
version: latest
|
||||
name: 'Autobuild '
|
||||
runner-analyze-csharp-autobuild-macos:
|
||||
name: Runner macos autobuild C# analyze
|
||||
runs-on: macos-latest
|
||||
timeout-minutes: 45
|
||||
runs-on: ${{ matrix.os }}
|
||||
|
||||
steps:
|
||||
- name: Check out repository
|
||||
uses: actions/checkout@v3
|
||||
- name: Prepare test
|
||||
id: prepare-test
|
||||
uses: ./.github/prepare-test
|
||||
with:
|
||||
version: ${{ matrix.version }}
|
||||
- uses: ./../action/init
|
||||
with:
|
||||
languages: csharp
|
||||
tools: ${{ steps.prepare-test.outputs.tools-url }}
|
||||
- uses: ./../action/autobuild
|
||||
- uses: ./../action/analyze
|
||||
env:
|
||||
TEST_MODE: true
|
||||
- name: Check database
|
||||
shell: bash
|
||||
run: |
|
||||
cd "$RUNNER_TEMP/codeql_databases"
|
||||
if [[ ! -d csharp ]]; then
|
||||
echo "Did not find a C# database"
|
||||
exit 1
|
||||
fi
|
||||
env:
|
||||
INTERNAL_CODEQL_ACTION_DEBUG_LOC: true
|
||||
- uses: actions/checkout@v3
|
||||
|
||||
- name: Move codeql-action
|
||||
shell: bash
|
||||
run: |
|
||||
mkdir ../action
|
||||
mv * .github ../action/
|
||||
mv ../action/tests/multi-language-repo/{*,.github} .
|
||||
mv ../action/.github/workflows .github
|
||||
|
||||
- name: Build runner
|
||||
run: |
|
||||
cd ../action/runner
|
||||
npm install
|
||||
npm run build-runner
|
||||
|
||||
- name: Run init
|
||||
run: |
|
||||
../action/runner/dist/codeql-runner-macos init --repository $GITHUB_REPOSITORY --languages csharp --github-url $GITHUB_SERVER_URL --github-auth ${{ github.token }}
|
||||
|
||||
- name: Load environment variable
|
||||
shell: bash
|
||||
run: |
|
||||
echo "Initial environment"
|
||||
cat codeql-runner/codeql-env.json | jq
|
||||
DYLD="$(cat codeql-runner/codeql-env.json | jq -r '.DYLD_INSERT_LIBRARIES')"
|
||||
echo "$DYLD"
|
||||
echo "DYLD_INSERT_LIBRARIES=$DYLD" >> "$GITHUB_ENV"
|
||||
LOG="$(cat codeql-runner/codeql-env.json | jq -r '.CODEQL_TRACER_LOG')"
|
||||
echo "$LOG"
|
||||
echo "CODEQL_TRACER_LOG=$LOG" >> "$GITHUB_ENV"
|
||||
SEMMLE_COPY_EXECUTABLES_ROOT="$(cat codeql-runner/codeql-env.json | jq -r '.SEMMLE_COPY_EXECUTABLES_ROOT')"
|
||||
echo "$SEMMLE_COPY_EXECUTABLES_ROOT"
|
||||
echo "SEMMLE_COPY_EXECUTABLES_ROOT=$SEMMLE_COPY_EXECUTABLES_ROOT" >> "$GITHUB_ENV"
|
||||
SEMMLE_PRELOAD_libtrace="$(cat codeql-runner/codeql-env.json | jq -r '.SEMMLE_PRELOAD_libtrace')"
|
||||
echo "$SEMMLE_PRELOAD_libtrace"
|
||||
echo "SEMMLE_PRELOAD_libtrace=$SEMMLE_PRELOAD_libtrace" >> "$GITHUB_ENV"
|
||||
CODEQL_DIST="$(cat codeql-runner/codeql-env.json | jq -r '.CODEQL_DIST')"
|
||||
echo "$CODEQL_DIST"
|
||||
echo "CODEQL_DIST=$CODEQL_DIST" >> "$GITHUB_ENV"
|
||||
CODEQL_PLATFORM="$(cat codeql-runner/codeql-env.json | jq -r '.CODEQL_PLATFORM')"
|
||||
echo "$CODEQL_PLATFORM"
|
||||
echo "CODEQL_PLATFORM=$CODEQL_PLATFORM" >> "$GITHUB_ENV"
|
||||
CODEQL_TOOL_PATH="$(cat codeql-runner/codeql-env.json | jq -r '.CODEQL_TOOL_PATH')"
|
||||
echo "$CODEQL_TOOL_PATH"
|
||||
echo "CODEQL_TOOL_PATH=$CODEQL_TOOL_PATH" >> "$GITHUB_ENV"
|
||||
echo "SEMMLE_DEBUG_TRACER=10000" >> "$GITHUB_ENV"
|
||||
CODEQL_SCRATCH_DIR="$(cat codeql-runner/codeql-env.json | jq -r '.CODEQL_SCRATCH_DIR')"
|
||||
echo "$CODEQL_SCRATCH_DIR"
|
||||
echo "CODEQL_SCRATCH_DIR=$CODEQL_SCRATCH_DIR" >> "$GITHUB_ENV"
|
||||
|
||||
echo "Removing CLR tracer variables"
|
||||
cat codeql-runner/codeql-env.json | jq 'del(.COR_ENABLE_PROFILING, .COR_PROFILER, .COR_PROFILER_PATH_64, .CORECLR_ENABLE_PROFILING, .CORECLR_PROFILER, .CORECLR_PROFILER_PATH_64)' > codeql-env.temp.json
|
||||
mv codeql-env.temp.json codeql-runner/codeql-env.json
|
||||
|
||||
echo "Final environment"
|
||||
cat codeql-runner/codeql-env.json | jq
|
||||
env
|
||||
|
||||
- name: Build code
|
||||
shell: bash
|
||||
run: |
|
||||
env
|
||||
# No CODEQL_RUNNER prefix.
|
||||
# No explicit sourcing of the tracing environment. We assume the autobuild command loads the tracing environment.
|
||||
../action/runner/dist/codeql-runner-macos autobuild
|
||||
- uses: actions/upload-artifact@v3
|
||||
if: always()
|
||||
with:
|
||||
name: debug-artifact-log
|
||||
path: |
|
||||
/Users/runner/work/codeql-action/codeql-action/codeql-runner/codeql_databases
|
||||
|
||||
- name: Run analyze
|
||||
run: |
|
||||
../action/runner/dist/codeql-runner-macos analyze --repository $GITHUB_REPOSITORY --commit $GITHUB_SHA --ref $GITHUB_REF --github-url $GITHUB_SERVER_URL --github-auth ${{ github.token }}
|
||||
env:
|
||||
TEST_MODE: true
|
||||
|
||||
1
.github/workflows/__debug-artifacts.yml
generated
vendored
1
.github/workflows/__debug-artifacts.yml
generated
vendored
@@ -16,7 +16,6 @@ on:
|
||||
pull_request:
|
||||
types:
|
||||
- opened
|
||||
- synchronize
|
||||
- reopened
|
||||
- ready_for_review
|
||||
workflow_dispatch: {}
|
||||
|
||||
1
.github/workflows/__extractor-ram-threads.yml
generated
vendored
1
.github/workflows/__extractor-ram-threads.yml
generated
vendored
@@ -16,7 +16,6 @@ on:
|
||||
pull_request:
|
||||
types:
|
||||
- opened
|
||||
- synchronize
|
||||
- reopened
|
||||
- ready_for_review
|
||||
workflow_dispatch: {}
|
||||
|
||||
1
.github/workflows/__go-custom-queries.yml
generated
vendored
1
.github/workflows/__go-custom-queries.yml
generated
vendored
@@ -16,7 +16,6 @@ on:
|
||||
pull_request:
|
||||
types:
|
||||
- opened
|
||||
- synchronize
|
||||
- reopened
|
||||
- ready_for_review
|
||||
workflow_dispatch: {}
|
||||
|
||||
1
.github/workflows/__go-custom-tracing-autobuild.yml
generated
vendored
1
.github/workflows/__go-custom-tracing-autobuild.yml
generated
vendored
@@ -16,7 +16,6 @@ on:
|
||||
pull_request:
|
||||
types:
|
||||
- opened
|
||||
- synchronize
|
||||
- reopened
|
||||
- ready_for_review
|
||||
workflow_dispatch: {}
|
||||
|
||||
1
.github/workflows/__go-custom-tracing.yml
generated
vendored
1
.github/workflows/__go-custom-tracing.yml
generated
vendored
@@ -16,7 +16,6 @@ on:
|
||||
pull_request:
|
||||
types:
|
||||
- opened
|
||||
- synchronize
|
||||
- reopened
|
||||
- ready_for_review
|
||||
workflow_dispatch: {}
|
||||
|
||||
1
.github/workflows/__javascript-source-root.yml
generated
vendored
1
.github/workflows/__javascript-source-root.yml
generated
vendored
@@ -16,7 +16,6 @@ on:
|
||||
pull_request:
|
||||
types:
|
||||
- opened
|
||||
- synchronize
|
||||
- reopened
|
||||
- ready_for_review
|
||||
workflow_dispatch: {}
|
||||
|
||||
1
.github/workflows/__ml-powered-queries.yml
generated
vendored
1
.github/workflows/__ml-powered-queries.yml
generated
vendored
@@ -16,7 +16,6 @@ on:
|
||||
pull_request:
|
||||
types:
|
||||
- opened
|
||||
- synchronize
|
||||
- reopened
|
||||
- ready_for_review
|
||||
workflow_dispatch: {}
|
||||
|
||||
1
.github/workflows/__multi-language-autodetect.yml
generated
vendored
1
.github/workflows/__multi-language-autodetect.yml
generated
vendored
@@ -16,7 +16,6 @@ on:
|
||||
pull_request:
|
||||
types:
|
||||
- opened
|
||||
- synchronize
|
||||
- reopened
|
||||
- ready_for_review
|
||||
workflow_dispatch: {}
|
||||
|
||||
1
.github/workflows/__packaging-config-inputs-js.yml
generated
vendored
1
.github/workflows/__packaging-config-inputs-js.yml
generated
vendored
@@ -16,7 +16,6 @@ on:
|
||||
pull_request:
|
||||
types:
|
||||
- opened
|
||||
- synchronize
|
||||
- reopened
|
||||
- ready_for_review
|
||||
workflow_dispatch: {}
|
||||
|
||||
1
.github/workflows/__packaging-config-js.yml
generated
vendored
1
.github/workflows/__packaging-config-js.yml
generated
vendored
@@ -16,7 +16,6 @@ on:
|
||||
pull_request:
|
||||
types:
|
||||
- opened
|
||||
- synchronize
|
||||
- reopened
|
||||
- ready_for_review
|
||||
workflow_dispatch: {}
|
||||
|
||||
1
.github/workflows/__packaging-inputs-js.yml
generated
vendored
1
.github/workflows/__packaging-inputs-js.yml
generated
vendored
@@ -16,7 +16,6 @@ on:
|
||||
pull_request:
|
||||
types:
|
||||
- opened
|
||||
- synchronize
|
||||
- reopened
|
||||
- ready_for_review
|
||||
workflow_dispatch: {}
|
||||
|
||||
1
.github/workflows/__remote-config.yml
generated
vendored
1
.github/workflows/__remote-config.yml
generated
vendored
@@ -16,7 +16,6 @@ on:
|
||||
pull_request:
|
||||
types:
|
||||
- opened
|
||||
- synchronize
|
||||
- reopened
|
||||
- ready_for_review
|
||||
workflow_dispatch: {}
|
||||
|
||||
1
.github/workflows/__rubocop-multi-language.yml
generated
vendored
1
.github/workflows/__rubocop-multi-language.yml
generated
vendored
@@ -16,7 +16,6 @@ on:
|
||||
pull_request:
|
||||
types:
|
||||
- opened
|
||||
- synchronize
|
||||
- reopened
|
||||
- ready_for_review
|
||||
workflow_dispatch: {}
|
||||
|
||||
1
.github/workflows/__split-workflow.yml
generated
vendored
1
.github/workflows/__split-workflow.yml
generated
vendored
@@ -16,7 +16,6 @@ on:
|
||||
pull_request:
|
||||
types:
|
||||
- opened
|
||||
- synchronize
|
||||
- reopened
|
||||
- ready_for_review
|
||||
workflow_dispatch: {}
|
||||
|
||||
1
.github/workflows/__test-autobuild-working-dir.yml
generated
vendored
1
.github/workflows/__test-autobuild-working-dir.yml
generated
vendored
@@ -16,7 +16,6 @@ on:
|
||||
pull_request:
|
||||
types:
|
||||
- opened
|
||||
- synchronize
|
||||
- reopened
|
||||
- ready_for_review
|
||||
workflow_dispatch: {}
|
||||
|
||||
1
.github/workflows/__test-local-codeql.yml
generated
vendored
1
.github/workflows/__test-local-codeql.yml
generated
vendored
@@ -16,7 +16,6 @@ on:
|
||||
pull_request:
|
||||
types:
|
||||
- opened
|
||||
- synchronize
|
||||
- reopened
|
||||
- ready_for_review
|
||||
workflow_dispatch: {}
|
||||
|
||||
1
.github/workflows/__test-proxy.yml
generated
vendored
1
.github/workflows/__test-proxy.yml
generated
vendored
@@ -16,7 +16,6 @@ on:
|
||||
pull_request:
|
||||
types:
|
||||
- opened
|
||||
- synchronize
|
||||
- reopened
|
||||
- ready_for_review
|
||||
workflow_dispatch: {}
|
||||
|
||||
1
.github/workflows/__test-ruby.yml
generated
vendored
1
.github/workflows/__test-ruby.yml
generated
vendored
@@ -16,7 +16,6 @@ on:
|
||||
pull_request:
|
||||
types:
|
||||
- opened
|
||||
- synchronize
|
||||
- reopened
|
||||
- ready_for_review
|
||||
workflow_dispatch: {}
|
||||
|
||||
1
.github/workflows/__unset-environment.yml
generated
vendored
1
.github/workflows/__unset-environment.yml
generated
vendored
@@ -16,7 +16,6 @@ on:
|
||||
pull_request:
|
||||
types:
|
||||
- opened
|
||||
- synchronize
|
||||
- reopened
|
||||
- ready_for_review
|
||||
workflow_dispatch: {}
|
||||
|
||||
1
.github/workflows/__upload-ref-sha-input.yml
generated
vendored
1
.github/workflows/__upload-ref-sha-input.yml
generated
vendored
@@ -16,7 +16,6 @@ on:
|
||||
pull_request:
|
||||
types:
|
||||
- opened
|
||||
- synchronize
|
||||
- reopened
|
||||
- ready_for_review
|
||||
workflow_dispatch: {}
|
||||
|
||||
1
.github/workflows/__with-checkout-path.yml
generated
vendored
1
.github/workflows/__with-checkout-path.yml
generated
vendored
@@ -16,7 +16,6 @@ on:
|
||||
pull_request:
|
||||
types:
|
||||
- opened
|
||||
- synchronize
|
||||
- reopened
|
||||
- ready_for_review
|
||||
workflow_dispatch: {}
|
||||
|
||||
@@ -7,7 +7,7 @@ on:
|
||||
- src/defaults.json
|
||||
# Run checks on reopened draft PRs to support triggering PR checks on draft PRs that were opened
|
||||
# by other workflows.
|
||||
types: [opened, synchronize, reopened, ready_for_review]
|
||||
types: [opened, reopened, ready_for_review]
|
||||
|
||||
jobs:
|
||||
check-expected-release-files:
|
||||
|
||||
2
.github/workflows/check-for-conflicts.yml
vendored
2
.github/workflows/check-for-conflicts.yml
vendored
@@ -7,7 +7,7 @@ on:
|
||||
branches: [main, releases/v1, releases/v2]
|
||||
# Run checks on reopened draft PRs to support triggering PR checks on draft PRs that were opened
|
||||
# by other workflows.
|
||||
types: [opened, synchronize, reopened, ready_for_review]
|
||||
types: [opened, reopened, ready_for_review]
|
||||
|
||||
jobs:
|
||||
check-for-conflicts:
|
||||
|
||||
2
.github/workflows/codeql.yml
vendored
2
.github/workflows/codeql.yml
vendored
@@ -7,7 +7,7 @@ on:
|
||||
branches: [main, releases/v1, releases/v2]
|
||||
# Run checks on reopened draft PRs to support triggering PR checks on draft PRs that were opened
|
||||
# by other workflows.
|
||||
types: [opened, synchronize, reopened, ready_for_review]
|
||||
types: [opened, reopened, ready_for_review]
|
||||
|
||||
jobs:
|
||||
# Identify the CodeQL tool versions to use in the analysis job.
|
||||
|
||||
1
.github/workflows/expected-queries-runs.yml
vendored
1
.github/workflows/expected-queries-runs.yml
vendored
@@ -11,7 +11,6 @@ on:
|
||||
pull_request:
|
||||
types:
|
||||
- opened
|
||||
- synchronize
|
||||
- reopened
|
||||
- ready_for_review
|
||||
workflow_dispatch: {}
|
||||
|
||||
2
.github/workflows/pr-checks.yml
vendored
2
.github/workflows/pr-checks.yml
vendored
@@ -6,7 +6,7 @@ on:
|
||||
pull_request:
|
||||
# Run checks on reopened draft PRs to support triggering PR checks on draft PRs that were opened
|
||||
# by other workflows.
|
||||
types: [opened, synchronize, reopened, ready_for_review]
|
||||
types: [opened, reopened, ready_for_review]
|
||||
workflow_dispatch:
|
||||
|
||||
jobs:
|
||||
|
||||
2
.github/workflows/python-deps.yml
vendored
2
.github/workflows/python-deps.yml
vendored
@@ -6,7 +6,7 @@ on:
|
||||
pull_request:
|
||||
# Run checks on reopened draft PRs to support triggering PR checks on draft PRs that were opened
|
||||
# by other workflows.
|
||||
types: [opened, synchronize, reopened, ready_for_review]
|
||||
types: [opened, reopened, ready_for_review]
|
||||
|
||||
jobs:
|
||||
test-setup-python-scripts:
|
||||
|
||||
2
.github/workflows/update-dependencies.yml
vendored
2
.github/workflows/update-dependencies.yml
vendored
@@ -1,7 +1,7 @@
|
||||
name: Update dependencies
|
||||
on:
|
||||
pull_request_target:
|
||||
types: [opened, synchronize, reopened, ready_for_review, labeled]
|
||||
types: [opened, reopened, ready_for_review, labeled]
|
||||
|
||||
jobs:
|
||||
update:
|
||||
|
||||
10
lib/codeql.js
generated
10
lib/codeql.js
generated
@@ -510,13 +510,7 @@ async function getCodeQLForCmd(cmd, checkVersion) {
|
||||
"-Dhttp.keepAlive=false",
|
||||
"-Dmaven.wagon.http.pool=false",
|
||||
].join(" ");
|
||||
const runnerExe = process.env["CODEQL_RUNNER"];
|
||||
if (runnerExe) {
|
||||
await runTool(runnerExe, [autobuildCmd]);
|
||||
}
|
||||
else {
|
||||
await runTool(autobuildCmd);
|
||||
}
|
||||
await runTool(autobuildCmd);
|
||||
},
|
||||
async extractScannedLanguage(databasePath, language, featureFlags) {
|
||||
// Get extractor location
|
||||
@@ -808,4 +802,4 @@ async function runTool(cmd, args = []) {
|
||||
throw new CommandInvocationError(cmd, args, exitCode, error);
|
||||
return output;
|
||||
}
|
||||
//# sourceMappingURL=codeql.js.map
|
||||
//# sourceMappingURL=codeql.js.map
|
||||
|
||||
File diff suppressed because one or more lines are too long
@@ -780,12 +780,7 @@ async function getCodeQLForCmd(
|
||||
"-Dmaven.wagon.http.pool=false",
|
||||
].join(" ");
|
||||
|
||||
const runnerExe = process.env["CODEQL_RUNNER"];
|
||||
if (runnerExe) {
|
||||
await runTool(runnerExe, [autobuildCmd]);
|
||||
} else {
|
||||
await runTool(autobuildCmd);
|
||||
}
|
||||
await runTool(autobuildCmd);
|
||||
},
|
||||
async extractScannedLanguage(
|
||||
databasePath: string,
|
||||
|
||||
Reference in New Issue
Block a user