From 2a9a0a06f8c9cf687056d4d2634c942481c8c0dd Mon Sep 17 00:00:00 2001 From: Connor Peet Date: Mon, 22 Jan 2024 06:17:58 -1000 Subject: [PATCH] end: use a better hash for built-in cache key (#203033) For CodeQL --- build/azure-pipelines/common/computeBuiltInDepsCacheKey.js | 2 +- build/azure-pipelines/common/computeBuiltInDepsCacheKey.ts | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/build/azure-pipelines/common/computeBuiltInDepsCacheKey.js b/build/azure-pipelines/common/computeBuiltInDepsCacheKey.js index fa230bb6849..2d747f56cc7 100644 --- a/build/azure-pipelines/common/computeBuiltInDepsCacheKey.js +++ b/build/azure-pipelines/common/computeBuiltInDepsCacheKey.js @@ -8,7 +8,7 @@ const fs = require("fs"); const path = require("path"); const crypto = require("crypto"); const productjson = JSON.parse(fs.readFileSync(path.join(__dirname, '../../../product.json'), 'utf8')); -const shasum = crypto.createHash('sha1'); +const shasum = crypto.createHash('sha256'); for (const ext of productjson.builtInExtensions) { shasum.update(`${ext.name}@${ext.version}`); } diff --git a/build/azure-pipelines/common/computeBuiltInDepsCacheKey.ts b/build/azure-pipelines/common/computeBuiltInDepsCacheKey.ts index f0554361607..53d6c501ea9 100644 --- a/build/azure-pipelines/common/computeBuiltInDepsCacheKey.ts +++ b/build/azure-pipelines/common/computeBuiltInDepsCacheKey.ts @@ -8,7 +8,7 @@ import * as path from 'path'; import * as crypto from 'crypto'; const productjson = JSON.parse(fs.readFileSync(path.join(__dirname, '../../../product.json'), 'utf8')); -const shasum = crypto.createHash('sha1'); +const shasum = crypto.createHash('sha256'); for (const ext of productjson.builtInExtensions) { shasum.update(`${ext.name}@${ext.version}`);