Fix DetMir light DLP readiness and collector guard
CI / Rust checks (push) Canceled after 0s
CI / Docs and registry checks (push) Canceled after 0s
CI / Smoke checks (push) Canceled after 0s
Coverage / Coverage baseline (push) Canceled after 0s
Dependency hygiene / Unused dependency check (push) Canceled after 0s
Dependency hygiene / Dependency duplicate report (push) Canceled after 0s
Dependency hygiene / Dependency security policy (push) Canceled after 0s
Dependency hygiene / Cargo udeps nightly advisory (push) Canceled after 0s
Operational maturity / Offline operational maturity (push) Canceled after 0s
Operational maturity / Live operational contract (push) Canceled after 0s
Security / Cargo audit (push) Canceled after 0s
Security / Cargo deny (push) Canceled after 0s
Security / Secret pattern check (push) Canceled after 0s
Security / Dependency review (push) Canceled after 0s

This commit is contained in:
igor04091968
2026-07-09 23:38:57 +03:00
parent 597b462d39
commit cd25edc4f3
3 changed files with 440 additions and 19 deletions
+15 -2
View File
@@ -183,6 +183,16 @@ function writeText(file, data) {
fs.writeFileSync(file, data, "utf8");
}
function copyFileCompat(source, target) {
mkdirp(path.dirname(target));
try {
fs.copyFileSync(source, target);
} catch (error) {
if (!["EPERM", "ENOSYS", "EXDEV"].includes(error?.code)) throw error;
fs.writeFileSync(target, fs.readFileSync(source));
}
}
function runCommand({ id, category, command, args = [], cwd = root, timeoutSeconds, env = {}, optional = false }) {
const started = Date.now();
const cmdline = [command, ...args].join(" ");
@@ -335,7 +345,10 @@ async function trackedFiles() {
}
const result = await spawnSyncText("git", ["ls-files", "-z"], root, 60);
if (result.status !== 0) return [];
return result.stdout.split("\0").filter(Boolean);
return result.stdout
.split("\0")
.filter(Boolean)
.filter((file) => fs.existsSync(path.join(root, file)));
}
function walk(dir) {
@@ -1347,7 +1360,7 @@ async function executeValidation(args) {
mkdirp(latestDir);
for (const [name, file] of Object.entries(outputs)) {
const latestName = path.basename(file);
fs.copyFileSync(file, path.join(latestDir, latestName));
copyFileCompat(file, path.join(latestDir, latestName));
report.outputs[`latest_${name}`] = normalizeRelative(path.join(latestDir, latestName));
}
writeJson(outputs.validation_report_json, report);