Anforderungen  |   Konzepte  |   Entwurf  |   Entwicklung  |   Qualitätssicherung  |   Lebenszyklus  |   Steuerung
 
 
 
 


SSL audit-config-symlink.test.ts   Interaktion und
Portierbarkeitunbekannt

 
Spracherkennung für: .ts vermutete Sprache: Unknown {[0] [0] [0]} [Methode: Schwerpunktbildung, einfache Gewichte, sechs Dimensionen]

import fs from "node:fs/promises";
import path from "node:path";
import { afterAll, beforeAll, describe, expect, it } from "vitest";
import { collectFilesystemFindings } from "./audit.js";
import { AsyncTempCaseFactory } from "./test-temp-cases.js";

const isWindows = process.platform === "win32";

describe("security audit config symlink findings", () => {
  const tempCases = new AsyncTempCaseFactory("openclaw-security-audit-config-");

  beforeAll(async () => {
    await tempCases.setup();
  });

  afterAll(async () => {
    await tempCases.cleanup();
  });

  it("uses symlink target permissions for config checks", async () => {
    if (isWindows) {
      return;
    }

    const tmp = await tempCases.makeTmpDir("config-symlink");
    const stateDir = path.join(tmp, "state");
    await fs.mkdir(stateDir, { recursive: true, mode: 0o700 });

    const targetConfigPath = path.join(tmp, "managed-openclaw.json");
    await fs.writeFile(targetConfigPath, "{}\n", "utf-8");
    await fs.chmod(targetConfigPath, 0o444);

    const configPath = path.join(stateDir, "openclaw.json");
    await fs.symlink(targetConfigPath, configPath);

    const findings = await collectFilesystemFindings({
      stateDir,
      configPath,
    });

    expect(findings).toEqual(
      expect.arrayContaining([expect.objectContaining({ checkId: "fs.config.symlink" })]),
    );
    expect(findings.some((finding) => finding.checkId === "fs.config.perms_writable")).toBe(false);
    expect(findings.some((finding) => finding.checkId === "fs.config.perms_world_readable")).toBe(
      false,
    );
    expect(findings.some((finding) => finding.checkId === "fs.config.perms_group_readable")).toBe(
      false,
    );
  });
});

[Verzeichnis aufwärts0.4unsichere VerbindungÜbersetzung europäischer Sprachen durch Browser2026-04-27]

                                                                                                                                                                                                                                                                                                                                                                                                     


Neuigkeiten

     Aktuelles
     Motto des Tages

Software

     Produkte
     Quellcodebibliothek

Aktivitäten

     Artikel über Sicherheit
     Anleitung zur Aktivierung von SSL

Muße

     Gedichte
     Musik
     Bilder

Jenseits des Üblichen ....

Besucherstatistik

Besucherstatistik

Monitoring

Montastic status badge