mirror of
https://github.com/github/codeql-action.git
synced 2026-10-03 17:41:28 +00:00
Use a counter instead of Math.random for diagnostic filename suffix
This commit is contained in:
3
lib/init-action-post.js
generated
3
lib/init-action-post.js
generated
@@ -165769,6 +165769,7 @@ function formatDuration(durationMs) {
|
||||
// src/diagnostics.ts
|
||||
var unwrittenDiagnostics = [];
|
||||
var unwrittenDefaultLanguageDiagnostics = [];
|
||||
var diagnosticCounter = 0;
|
||||
function makeDiagnostic(id, name, data = void 0) {
|
||||
return {
|
||||
...data,
|
||||
@@ -165811,7 +165812,7 @@ function writeDiagnostic(config, language, diagnostic) {
|
||||
);
|
||||
try {
|
||||
(0, import_fs.mkdirSync)(diagnosticsPath, { recursive: true });
|
||||
const uniqueSuffix = Math.floor(Math.random() * 4294967296).toString(16).padStart(8, "0");
|
||||
const uniqueSuffix = (diagnosticCounter++).toString();
|
||||
const sanitizedTimestamp = diagnostic.timestamp.replace(
|
||||
/[^a-zA-Z0-9.-]/g,
|
||||
""
|
||||
|
||||
Reference in New Issue
Block a user