We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 5ff5384 commit e8403cfCopy full SHA for e8403cf
extensions/ql-vscode/src/variant-analysis/sarif-processing.ts
@@ -172,7 +172,14 @@ function getFilePath(
172
physicalLocation: sarif.PhysicalLocation,
173
): string | undefined {
174
const filePath = physicalLocation.artifactLocation?.uri;
175
- if (filePath === undefined || filePath === "" || filePath === "file:/") {
+ // We expect the location uri value to be a relative file path, with no scheme.
176
+ // We only need to support output from CodeQL here, so we can be quite strict,
177
+ // even though the SARIF spec supports many more types of URI.
178
+ if (
179
+ filePath === undefined ||
180
+ filePath === "" ||
181
+ filePath.startsWith("file:")
182
+ ) {
183
return undefined;
184
}
185
return filePath;
0 commit comments