Skip to content

Commit 282d18c

Browse files
authored
Fix/Suppress CodeQL items (#652)
* Fix/Suppress CodeQL items * Fix linting issue
1 parent 2123898 commit 282d18c

File tree

3 files changed

+5
-3
lines changed

3 files changed

+5
-3
lines changed

samples-js/functions/backupSiteContent.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ df.app.orchestration("backupSiteContent", function* (context) {
2020
const tasks = [];
2121
for (const file of files) {
2222
const input = {
23-
backupPath: path.relative(rootDirAbs, file).replace("\\", "/"),
23+
backupPath: path.relative(rootDirAbs, file).replace(/\\/g, "/"),
2424
filePath: file,
2525
};
2626
tasks.push(context.df.callActivity(copyFileToBlobActivityName, input));

samples-ts/functions/backupSiteContent.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ const backupSiteContentOrchestration: OrchestrationHandler = function* (
2929
const tasks: Task[] = [];
3030
for (const file of files) {
3131
const input = {
32-
backupPath: path.relative(rootDirAbs, file).replace("\\", "/"),
32+
backupPath: path.relative(rootDirAbs, file).replace(/\\/g, "/"),
3333
filePath: file,
3434
};
3535
tasks.push(context.df.callActivity(copyFileToBlobActivityName, input));

src/util/GuidManager.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,9 @@ export class GuidManager {
1818
Utils.throwIfEmpty(namespaceValue, "namespaceValue");
1919
Utils.throwIfEmpty(name, "name");
2020

21-
const hash = crypto.createHash("sha1");
21+
/* More info: The information being hashed in this method is not sensitive, the goal is to generate a deterministic Guid.
22+
We cannot update to SHA2-based algorithms without breaking customers' inflight orchestrations */
23+
const hash = crypto.createHash("sha1"); // CodeQL [SM04514] SHA1 is not used for cryptographic purposes here
2224
hash.update(name);
2325
const bytes: number[] = Array.prototype.slice.call(hash.digest(), 0, 16);
2426

0 commit comments

Comments
 (0)