mirror of
https://github.com/github/codeql-action.git
synced 2026-01-04 13:40:23 +08:00
Compare commits
5 Commits
daverlo/ru
...
hmakholm/p
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
dfaf5d0099 | ||
|
|
384f896665 | ||
|
|
8bd2b3516b | ||
|
|
bc14da99c5 | ||
|
|
c87ee1c65a |
@@ -1,3 +1,3 @@
|
||||
{
|
||||
"bundleVersion": "codeql-bundle-20210326"
|
||||
"bundleVersion": "codeql-bundle-20210419"
|
||||
}
|
||||
|
||||
5
lib/runner.js
generated
5
lib/runner.js
generated
@@ -92,9 +92,8 @@ program
|
||||
.option("--tools-dir <dir>", "Directory to use for CodeQL tools and other files to store between runs. Default is a subdirectory of the home directory.")
|
||||
.option("--checkout-path <path>", "Checkout path. Default is the current working directory.")
|
||||
.option("--debug", "Print more verbose output", false)
|
||||
// This prevents a message like: error: unknown option '--trace-process-level'
|
||||
// Remove this if commander.js starts supporting hidden options.
|
||||
.allowUnknownOption()
|
||||
.option("--trace-process-name <string>", "(Advanced, windows-only) Inject a windows tracer of this process into a process with the given process name.")
|
||||
.option("--trace-process-level <number>", "(Advanced, windows-only) Inject a windows tracer of this process into a parent process <number> levels up.")
|
||||
.action(async (cmd) => {
|
||||
const logger = logging_1.getRunnerLogger(cmd.debug);
|
||||
try {
|
||||
|
||||
File diff suppressed because one or more lines are too long
5
lib/upload-lib.js
generated
5
lib/upload-lib.js
generated
@@ -47,7 +47,6 @@ exports.combineSarifFiles = combineSarifFiles;
|
||||
// Populates the run.automationDetails.id field using the analysis_key and environment
|
||||
// and return an updated sarif file contents.
|
||||
function populateRunAutomationDetails(sarifContents, analysis_key, environment) {
|
||||
console.log("populateRunAutomationDetails");
|
||||
if (analysis_key === undefined) {
|
||||
return sarifContents;
|
||||
}
|
||||
@@ -59,8 +58,6 @@ function populateRunAutomationDetails(sarifContents, analysis_key, environment)
|
||||
automationID += `${entry[0]}:${entry[1]}/`;
|
||||
}
|
||||
}
|
||||
console.log("automationID");
|
||||
console.log(automationID);
|
||||
const sarif = JSON.parse(sarifContents);
|
||||
for (const run of sarif.runs || []) {
|
||||
if (run.automationDetails === undefined) {
|
||||
@@ -241,11 +238,9 @@ async function uploadFiles(sarifFiles, repositoryNwo, commitOid, ref, analysisKe
|
||||
for (const file of sarifFiles) {
|
||||
validateSarifFileSchema(file, logger);
|
||||
}
|
||||
console.log("upload files");
|
||||
let sarifPayload = combineSarifFiles(sarifFiles);
|
||||
sarifPayload = fingerprints.addFingerprints(sarifPayload, checkoutPath, logger);
|
||||
sarifPayload = populateRunAutomationDetails(sarifPayload, analysisKey, environment);
|
||||
console.log(sarifPayload);
|
||||
const zippedSarif = zlib_1.default.gzipSync(sarifPayload).toString("base64");
|
||||
const checkoutURI = file_url_1.default(checkoutPath);
|
||||
const toolNames = util.getToolNames(sarifPayload);
|
||||
|
||||
File diff suppressed because one or more lines are too long
@@ -1,3 +1,3 @@
|
||||
{
|
||||
"bundleVersion": "codeql-bundle-20210326"
|
||||
"bundleVersion": "codeql-bundle-20210419"
|
||||
}
|
||||
|
||||
@@ -141,9 +141,14 @@ program
|
||||
"Checkout path. Default is the current working directory."
|
||||
)
|
||||
.option("--debug", "Print more verbose output", false)
|
||||
// This prevents a message like: error: unknown option '--trace-process-level'
|
||||
// Remove this if commander.js starts supporting hidden options.
|
||||
.allowUnknownOption()
|
||||
.option(
|
||||
"--trace-process-name <string>",
|
||||
"(Advanced, windows-only) Inject a windows tracer of this process into a process with the given process name."
|
||||
)
|
||||
.option(
|
||||
"--trace-process-level <number>",
|
||||
"(Advanced, windows-only) Inject a windows tracer of this process into a parent process <number> levels up."
|
||||
)
|
||||
.action(async (cmd: InitArgs) => {
|
||||
const logger = getRunnerLogger(cmd.debug);
|
||||
try {
|
||||
|
||||
@@ -47,7 +47,6 @@ export function populateRunAutomationDetails(
|
||||
analysis_key: string | undefined,
|
||||
environment: string | undefined
|
||||
): string {
|
||||
console.log("populateRunAutomationDetails");
|
||||
if (analysis_key === undefined) {
|
||||
return sarifContents;
|
||||
}
|
||||
@@ -61,9 +60,6 @@ export function populateRunAutomationDetails(
|
||||
}
|
||||
}
|
||||
|
||||
console.log("automationID");
|
||||
console.log(automationID);
|
||||
|
||||
const sarif = JSON.parse(sarifContents);
|
||||
for (const run of sarif.runs || []) {
|
||||
if (run.automationDetails === undefined) {
|
||||
@@ -351,7 +347,6 @@ async function uploadFiles(
|
||||
validateSarifFileSchema(file, logger);
|
||||
}
|
||||
|
||||
console.log("upload files");
|
||||
let sarifPayload = combineSarifFiles(sarifFiles);
|
||||
sarifPayload = fingerprints.addFingerprints(
|
||||
sarifPayload,
|
||||
@@ -364,8 +359,6 @@ async function uploadFiles(
|
||||
environment
|
||||
);
|
||||
|
||||
console.log(sarifPayload);
|
||||
|
||||
const zippedSarif = zlib.gzipSync(sarifPayload).toString("base64");
|
||||
const checkoutURI = fileUrl(checkoutPath);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user