Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 17 additions & 0 deletions 17 lib/analyze-action-post.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

39 changes: 37 additions & 2 deletions 39 lib/analyze-action.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

17 changes: 17 additions & 0 deletions 17 lib/autobuild-action.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

17 changes: 17 additions & 0 deletions 17 lib/init-action-post.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

39 changes: 37 additions & 2 deletions 39 lib/init-action.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

17 changes: 17 additions & 0 deletions 17 lib/resolve-environment-action.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

17 changes: 17 additions & 0 deletions 17 lib/setup-codeql-action.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

17 changes: 17 additions & 0 deletions 17 lib/upload-lib.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

17 changes: 17 additions & 0 deletions 17 lib/upload-sarif-action.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

26 changes: 26 additions & 0 deletions 26 src/codeql.ts
Original file line number Diff line number Diff line change
Expand Up @@ -206,6 +206,7 @@ export interface CodeQL {
* Run 'codeql resolve queries --format=startingpacks'.
*/
resolveQueriesStartingPacks(queries: string[]): Promise<string[]>;
resolveDatabase(databasePath: string): Promise<ResolveDatabaseOutput>;
/**
* Run 'codeql github merge-results'.
*/
Expand All @@ -230,6 +231,10 @@ export interface VersionInfo {
overlayVersion?: number;
}

export interface ResolveDatabaseOutput {
overlayBaseSpecifier?: string;
}

export interface ResolveLanguagesOutput {
[language: string]: [string];
}
Expand Down Expand Up @@ -493,6 +498,7 @@ export function createStubCodeQL(partialCodeql: Partial<CodeQL>): CodeQL {
partialCodeql,
"resolveQueriesStartingPacks",
),
resolveDatabase: resolveFunction(partialCodeql, "resolveDatabase"),
mergeResults: resolveFunction(partialCodeql, "mergeResults"),
};
}
Expand Down Expand Up @@ -1003,6 +1009,26 @@ async function getCodeQLForCmd(
);
}
},
async resolveDatabase(
databasePath: string,
): Promise<ResolveDatabaseOutput> {
const codeqlArgs = [
"resolve",
"database",
databasePath,
"--format=json",
...getExtraOptionsFromEnv(["resolve", "database"]),
];
const output = await runCli(cmd, codeqlArgs, { noStreamStdout: true });

try {
return JSON.parse(output) as ResolveDatabaseOutput;
} catch (e) {
throw new Error(
`Unexpected output from codeql resolve database --format=json: ${e}`,
);
}
},
async mergeResults(
sarifFiles: string[],
outputFile: string,
Expand Down
Loading
Loading
Morty Proxy This is a proxified and sanitized view of the page, visit original site.