debt - silence CodeQL warnings (#203031)

This commit is contained in:
Benjamin Pasero 2024-01-22 16:57:01 +01:00 committed by GitHub
parent 9555d9dfff
commit ecb6dd684e
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 4 additions and 4 deletions

View file

@ -410,6 +410,6 @@ export class BackupMainService implements IBackupMainService {
key = folderUri.toString().toLowerCase();
}
return createHash('md5').update(key).digest('hex');
return createHash('md5').update(key).digest('hex'); // CodeQL [SM04514] Using MD5 to convert a file path to a fixed length
}
}

View file

@ -29,7 +29,7 @@ export function getWorkspaceIdentifier(configPath: URI): IWorkspaceIdentifier {
configPathStr = configPathStr.toLowerCase(); // sanitize for platform file system
}
return createHash('md5').update(configPathStr).digest('hex');
return createHash('md5').update(configPathStr).digest('hex'); // CodeQL [SM04514] Using MD5 to convert a file path to a fixed length
}
return {
@ -50,7 +50,7 @@ export function getSingleFolderWorkspaceIdentifier(folderUri: URI, folderStat?:
// Remote: produce a hash from the entire URI
if (folderUri.scheme !== Schemas.file) {
return createHash('md5').update(folderUri.toString()).digest('hex');
return createHash('md5').update(folderUri.toString()).digest('hex'); // CodeQL [SM04514] Using MD5 to convert a file path to a fixed length
}
// Local: we use the ctime as extra salt to the
@ -77,7 +77,7 @@ export function getSingleFolderWorkspaceIdentifier(folderUri: URI, folderStat?:
}
}
return createHash('md5').update(folderUri.fsPath).update(ctime ? String(ctime) : '').digest('hex');
return createHash('md5').update(folderUri.fsPath).update(ctime ? String(ctime) : '').digest('hex'); // CodeQL [SM04514] Using MD5 to convert a file path to a fixed length
}
const folderId = getFolderId();