Skip to content

armgit / rea

Public Imported from GitHub
0

Reverse engineer anything with agents, from app behavior down to native binaries.

fix(process): reconcile native lifetime and selective Linux UID facts

morluto4af71a45f9c7
diff --git a/src/process/LinuxProcessStatus.test.ts b/src/process/LinuxProcessStatus.test.ts
new file mode 100644
index 000000000..46f768844
--- /dev/null
+++ b/src/process/LinuxProcessStatus.test.ts
@@ -0,0 +1,21 @@
+import { expect, it } from "vitest";
+
+import { parseLinuxProcessEffectiveUid } from "./LinuxProcessStatus.js";
+
+it("parses the effective UID from the single native status Uid row", () => {
+ expect(
+ parseLinuxProcessEffectiveUid(
+ "Name:\tworker\nUid:\t1000\t1001\t1002\t1003\nGid:\t20\t20\t20\t20\n",
+ ),
+ ).toBe(1001);
+});
+
+it.each([
+ "Name:\tworker\n",
+ "Uid:\t1000\t1001\t1002\n",
+ "Uid:\t1000\t1001\t1002\t1003\nUid:\t1000\t1001\t1002\t1003\n",
+ "Uid:\t1000\t-1\t1002\t1003\n",
+ "Uid:\t1000\t9007199254740992\t1002\t1003\n",
+])("does not infer an effective UID from malformed status: %s", (status) => {
+ expect(parseLinuxProcessEffectiveUid(status)).toBeUndefined();
+});
diff --git a/src/process/LinuxProcessStatus.ts b/src/process/LinuxProcessStatus.ts
new file mode 100644
index 000000000..60d8f2809
--- /dev/null
+++ b/src/process/LinuxProcessStatus.ts
@@ -0,0 +1,19 @@
+/** Effective UID parsed from one Linux `/proc/<pid>/status` record. */
+export const parseLinuxProcessEffectiveUid = (
+ value: string,
+): number | undefined => {
+ let effectiveUid: number | undefined;
+ for (const line of value.split("\n")) {
+ if (!line.startsWith("Uid:")) continue;
+ if (effectiveUid !== undefined) return undefined;
+ const match = /^Uid:\s+([0-9]+)\s+([0-9]+)\s+([0-9]+)\s+([0-9]+)\s*$/u.exec(
+ line,
+ );
+ if (match === null) return undefined;
+ const values = match.slice(1).map(Number);
+ if (values.some((uid) => !Number.isSafeInteger(uid) || uid < 0))
+ return undefined;
+ effectiveUid = values[1];
+ }
+ return effectiveUid;
+};
diff --git a/src/process/ProcessOwnership.identity.test.ts b/src/process/ProcessOwnership.identity.test.ts
index 1d518fda2..5b5c69f98 100644
--- a/src/process/ProcessOwnership.identity.test.ts
+++ b/src/process/ProcessOwnership.identity.test.ts
@@ -32,7 +32,11 @@ describe("Linux process start identities", () => {
state: "S",
command: process.execPath,
} satisfies ProcessTableEntry;
- const identities = await host.processIdentities?.([observedProcess]);
+ const identities = await host.processIdentities?.(
+ [observedProcess],
+ undefined,
+ new Set([observedProcess.pid]),
+ );
expect(identities?.get(observedProcess.pid)).toMatchObject({
state: "readable",
identity: expect.stringMatching(/^linux-starttime:\d+$/u),
@@ -43,8 +47,9 @@ describe("Linux process start identities", () => {
processGroupId: expect.any(Number),
},
});
- expect(identities?.get(observedProcess.pid)).not.toHaveProperty(
+ expect(identities?.get(observedProcess.pid)).toHaveProperty(
"effectiveUid",
+ process.geteuid!(),
);
const baseline = await host.captureBaseline?.();
expect(baseline).toContainEqual({
@@ -110,9 +115,11 @@ it("validates and cleans an exact-token owner without a capture baseline", async
expect(signalGroup).toHaveBeenCalledWith(process.processGroupId, "SIGKILL");
});
-it.skipIf(typeof process.getuid !== "function")(
- "uses a same-generation native UID instead of the process-table UID for unreadable tokens",
- async () => {
+it
+ .skipIf(typeof process.getuid !== "function")
+ .each(["EINVAL", "EACCES: permission denied"])(
+ "uses a same-generation native UID instead of the process-table UID for unreadable tokens: %s",
+ async (diagnostic) => {
const callerUid = process.getuid!();
const foreignUid = callerUid === 0 ? 1 : 0;
const verify = async (rowUid: number, effectiveUid: number) => {
@@ -132,7 +139,7 @@ it.skipIf(typeof process.getuid !== "function")(
runTokens: () =>
Promise.resolve(
new Map([
- [906, { state: "unavailable", reason: "EINVAL" } as const],
+ [906, { state: "unavailable", reason: diagnostic } as const],
]),
),
processIdentities: (entries) =>
@@ -161,7 +168,7 @@ it.skipIf(typeof process.getuid !== "function")(
});
await expect(verify(callerUid, foreignUid)).resolves.toMatchObject({
cleaned: true,
- unverified: [{ pid: 906, diagnostic: "EINVAL" }],
+ unverified: [{ pid: 906, diagnostic }],
});
},
);
diff --git a/src/process/ProcessOwnership.procIdentity.test.ts b/src/process/ProcessOwnership.procIdentity.test.ts
index 6b2eaa3eb..fff53db72 100644
--- a/src/process/ProcessOwnership.procIdentity.test.ts
+++ b/src/process/ProcessOwnership.procIdentity.test.ts
@@ -9,8 +9,14 @@ vi.mock("node:fs/promises", async (importOriginal) => {
return { ...original, readFile: filesystem.readFile };
});
-import { createSystemProcessOwnershipHost } from "./ProcessOwnershipObservation.js";
-import type { ProcessTableEntry } from "./ProcessOwnership.js";
+import {
+ createSystemProcessOwnershipHost,
+ readProcessOwnershipFacts,
+} from "./ProcessOwnershipObservation.js";
+import type {
+ ProcessOwnershipHost,
+ ProcessTableEntry,
+} from "./ProcessOwnership.js";
const entry: ProcessTableEntry = {
pid: 42,
@@ -23,6 +29,144 @@ const entry: ProcessTableEntry = {
const filesystemError = (code: string): NodeJS.ErrnoException =>
Object.assign(new Error(code), { code });
+const procStat = (
+ startTime: number,
+ parentPid = 1,
+ processGroupId = 42,
+ pid = 42,
+) => {
+ const fields = ["S", String(parentPid), String(processGroupId), "42"];
+ while (fields.length < 19) fields.push("0");
+ fields.push(String(startTime));
+ return `${String(pid)} (fixture) ${fields.join(" ")}`;
+};
+
+it("binds Linux effective UID to the same native process generation", async () => {
+ const host = createSystemProcessOwnershipHost("linux", {});
+ filesystem.readFile
+ .mockResolvedValueOnce(procStat(100, 10, 42))
+ .mockResolvedValueOnce("Name:\tfixture\nUid:\t1000\t1001\t1002\t1003\n")
+ .mockResolvedValueOnce(procStat(100, 11, 43));
+
+ await expect(
+ host.processIdentities?.([entry], undefined, new Set([entry.pid])),
+ ).resolves.toEqual(
+ new Map([
+ [
+ 42,
+ {
+ state: "readable",
+ identity: "linux-starttime:100",
+ effectiveUid: 1001,
+ lifecycle: { state: "observed", lifecycle: "non-zombie" },
+ relation: {
+ state: "observed",
+ parentPid: 11,
+ processGroupId: 43,
+ },
+ },
+ ],
+ ]),
+ );
+ expect(filesystem.readFile.mock.calls.map(([path]) => path)).toEqual([
+ "/proc/42/stat",
+ "/proc/42/status",
+ "/proc/42/stat",
+ ]);
+});
+
+it("keeps native identity when status UID is unavailable", async () => {
+ const host = createSystemProcessOwnershipHost("linux", {});
+ filesystem.readFile
+ .mockResolvedValueOnce(procStat(100))
+ .mockRejectedValueOnce(filesystemError("EACCES"));
+
+ await expect(
+ host.processIdentities?.([entry], undefined, new Set([entry.pid])),
+ ).resolves.toEqual(
+ new Map([
+ [
+ 42,
+ {
+ state: "readable",
+ identity: "linux-starttime:100",
+ lifecycle: { state: "observed", lifecycle: "non-zombie" },
+ relation: {
+ state: "observed",
+ parentPid: 1,
+ processGroupId: 42,
+ },
+ },
+ ],
+ ]),
+ );
+ expect(filesystem.readFile).toHaveBeenCalledTimes(2);
+});
+
+it("does not attach a UID when the process generation changes around status", async () => {
+ const host = createSystemProcessOwnershipHost("linux", {});
+ filesystem.readFile
+ .mockResolvedValueOnce(procStat(100))
+ .mockResolvedValueOnce("Uid:\t1000\t1001\t1002\t1003\n")
+ .mockResolvedValueOnce(procStat(101));
+
+ await expect(
+ host.processIdentities?.([entry], undefined, new Set([entry.pid])),
+ ).resolves.toEqual(
+ new Map([
+ [
+ 42,
+ {
+ state: "unavailable",
+ reason: "process_identity_changed_during_uid_observation",
+ },
+ ],
+ ]),
+ );
+});
+
+it("reads Linux effective UID only for token-unavailable rows", async () => {
+ const rows = [entry, { ...entry, pid: 43, processGroupId: 43 }];
+ const statReads = new Map<number, number>();
+ const uidStatusPids: number[] = [];
+ filesystem.readFile.mockImplementation(async (path) => {
+ const match = /^\/proc\/(\d+)\/(stat|status)$/u.exec(String(path));
+ if (match === null) throw new Error(`unexpected path: ${String(path)}`);
+ const pid = Number(match[1]);
+ if (match[2] === "status") {
+ uidStatusPids.push(pid);
+ return "Uid:\t1000\t1001\t1002\t1003\n";
+ }
+ const reads = (statReads.get(pid) ?? 0) + 1;
+ statReads.set(pid, reads);
+ return procStat(100, 1, pid, pid);
+ });
+ const systemHost = createSystemProcessOwnershipHost("linux", {});
+ const host: ProcessOwnershipHost = {
+ ...systemHost,
+ runTokens: async () =>
+ new Map([
+ [entry.pid, { state: "unavailable", reason: "EACCES" }],
+ [43, { state: "readable", runId: undefined }],
+ ]),
+ };
+
+ const facts = await readProcessOwnershipFacts(rows, host);
+
+ expect(uidStatusPids).toEqual([entry.pid]);
+ expect(facts.map(({ identityAfter }) => identityAfter)).toMatchObject([
+ { state: "readable", effectiveUid: 1001 },
+ { state: "readable" },
+ ]);
+ expect(facts[1]?.identityAfter).not.toHaveProperty("effectiveUid");
+ expect(statReads).toEqual(
+ new Map([
+ [entry.pid, 3],
+ [43, 2],
+ ]),
+ );
+});
+
it("reports absence only when /proc lookup and signal-zero both report ESRCH", async () => {
const host = createSystemProcessOwnershipHost("linux", {});
const signalProbe = vi.spyOn(process, "kill").mockImplementation(() => {
diff --git a/src/process/ProcessOwnership.sweepExit.test.ts b/src/process/ProcessOwnership.sweepExit.test.ts
new file mode 100644
index 000000000..fb0b9b2f8
--- /dev/null
+++ b/src/process/ProcessOwnership.sweepExit.test.ts
@@ -0,0 +1,74 @@
+import { expect, it, vi } from "vitest";
+import {
+ verifyNoTokenOwnedProcesses,
+ type ProcessIdentityObservation,
+ type ProcessOwnershipHost,
+ type ProcessTableEntry,
+} from "./ProcessOwnership.js";
+import { ProcessOwnershipEvidenceOwner } from "./ProcessOwnershipEvidence.js";
+
+it.each(["absent", "zombie", "live", "unavailable"] as const)(
+ "settles a baseline candidate against its final native lifetime: %s",
+ async (lifetime) => {
+ const row: ProcessTableEntry = {
+ pid: 910,
+ parentPid: 1,
+ processGroupId: 910,
+ state: "S",
+ command: "baseline-neighbor",
+ };
+ let tokenRead = false;
+ const identity = (): ProcessIdentityObservation => {
+ if (lifetime === "absent")
+ return { state: "absent", reason: "not-in-snapshot" };
+ if (lifetime === "unavailable")
+ return { state: "unavailable", reason: "native identity denied" };
+ return {
+ state: "readable",
+ identity: "new-generation",
+ lifecycle: {
+ state: "observed",
+ lifecycle:
+ tokenRead && lifetime === "zombie" ? "zombie" : "non-zombie",
+ },
+ relation: { state: "observed", parentPid: 1, processGroupId: 910 },
+ };
+ };
+ const signalGroup = vi.fn();
+ const host: ProcessOwnershipHost = {
+ platform: "darwin",
+ listProcesses: async () => [row],
+ processIdentities: async (members) =>
+ new Map(members.map(({ pid }) => [pid, identity()])),
+ runTokens: async (members) => {
+ tokenRead = true;
+ return new Map(
+ members.map(({ pid }) => [
+ pid,
+ { state: "unavailable" as const, reason: "EACCES" },
+ ]),
+ );
+ },
+ environment: async () => ({}),
+ signalGroup,
+ };
+ const result = await verifyNoTokenOwnedProcesses(
+ "run",
+ host,
+ [{ pid: row.pid, identity: "baseline-generation" }],
+ {
+ leaderPid: 100,
+ processGroupId: 100,
+ evidenceOwner: new ProcessOwnershipEvidenceOwner(),
+ },
+ );
+ if (lifetime === "absent" || lifetime === "zombie")
+ expect(result).toEqual({ cleaned: true, signaled: false });
+ else
+ expect(result).toMatchObject({
+ cleaned: false,
+ failures: [{ pid: row.pid }],
+ });
+ expect(signalGroup).not.toHaveBeenCalled();
+ },
+);
diff --git a/src/process/ProcessOwnership.ts b/src/process/ProcessOwnership.ts
index 3cc3d6ee2..307b20220 100644
--- a/src/process/ProcessOwnership.ts
+++ b/src/process/ProcessOwnership.ts
@@ -179,6 +179,8 @@ export interface ProcessOwnershipHost {
processIdentities?(
processes: readonly ProcessTableEntry[],
signal?: AbortSignal,
+ /** Linux UID enrichment is selective; omitted means UID remains unknown. */
+ effectiveUidPids?: ReadonlySet<number>,
): Promise<ReadonlyMap<number, ProcessIdentityObservation>>;
/** Snapshot identities before launch, honoring startup cancellation. */
captureBaseline?(signal?: AbortSignal): Promise<ProcessOwnershipBaseline>;
@@ -965,6 +967,14 @@ const sanitizedTokenReadFailure = (diagnostic: string | undefined): string => {
return "other_unavailable";
};
+const processIdentityHasExited = (
+ identity: ProcessIdentityObservation,
+): boolean =>
+ identity.state === "absent" ||
+ (identity.state === "readable" &&
+ identity.lifecycle?.state === "observed" &&
+ identity.lifecycle.lifecycle === "zombie");
+
const processOwnershipFailures = async (
members: readonly ProcessTableEntry[],
runId: string,
@@ -975,13 +985,7 @@ const processOwnershipFailures = async (
const facts = await readProcessOwnershipFacts(members, host);
const failures: ProcessOwnershipValidationFailure[] = [];
for (const fact of facts) {
- if (fact.identityAfter.state === "absent") continue;
- if (
- fact.identityAfter.state === "readable" &&
- fact.identityAfter.lifecycle?.state === "observed" &&
- fact.identityAfter.lifecycle.lifecycle === "zombie"
- )
- continue;
+ if (processIdentityHasExited(fact.identityAfter)) continue;
const relation =
fact.identityAfter.state === "readable" &&
fact.identityAfter.relation?.state === "observed"
@@ -1289,14 +1293,17 @@ const scanWithOwnershipEvidence = async (
observationRows,
host,
);
- const baselineIdentityFailures: ProcessOwnershipValidationFailure[] = [];
+ const baselineIdentityFailures = new Map<
+ number,
+ ProcessOwnershipValidationFailure
+ >();
const candidates = observationRows.filter((process) => {
if (retainedPids.has(process.pid)) return true;
if (!baseline.has(process.pid)) return true;
const before = baseline.get(process.pid);
const now = firstIdentities.get(process.pid);
if (before === null || now?.state !== "readable") {
- baselineIdentityFailures.push({
+ baselineIdentityFailures.set(process.pid, {
pid: process.pid,
reason: "process-identity-unavailable",
diagnostic: "process identity was unavailable during token validation",
@@ -1320,21 +1327,18 @@ const scanWithOwnershipEvidence = async (
},
);
let facts = initialFacts;
- for (
- let attempt = 0;
- attempt < TOKEN_READ_RETRY_ATTEMPTS &&
- facts.some(({ token }) => token.state === "unavailable");
- attempt += 1
- ) {
+ for (let attempt = 0; attempt < TOKEN_READ_RETRY_ATTEMPTS; attempt += 1) {
+ const retryRows = facts
+ .filter(
+ ({ token, identityAfter }) =>
+ token.state === "unavailable" &&
+ !processIdentityHasExited(identityAfter),
+ )
+ .map(({ process }) => process);
+ if (retryRows.length === 0) break;
await new Promise<void>((resolve) =>
setTimeout(resolve, TOKEN_READ_RETRY_DELAY_MS),
);
- const pendingPids = new Set(
- facts
- .filter(({ token }) => token.state === "unavailable")
- .map(({ process }) => process.pid),
- );
- const retryRows = candidates.filter(({ pid }) => pendingPids.has(pid));
const retries = await readProcessOwnershipFacts(retryRows, host);
const retryByPid = new Map(retries.map((fact) => [fact.process.pid, fact]));
facts = facts.map((fact) => retryByPid.get(fact.process.pid) ?? fact);
@@ -1356,24 +1360,26 @@ const scanWithOwnershipEvidence = async (
const retainedByPid = new Map(
retained.map((candidate) => [candidate.pid, candidate]),
);
- const failures: ProcessOwnershipValidationFailure[] = [
- ...baselineIdentityFailures,
- ];
+ const failures: ProcessOwnershipValidationFailure[] = [];
const unverified: OwnershipSweepUnverifiedProcess[] = [];
const owned: ProcessTableEntry[] = [];
const identities = new Map<number, string | null>();
for (const fact of facts) {
+ // The table row and baseline predate the final native observation. An
+ // exited candidate needs no ownership proof or signal, even when its
+ // token became unreadable while exiting. Unknown native state stays a
+ // cleanup failure; table omission alone is never proof of exit.
+ if (processIdentityHasExited(fact.identityAfter)) continue;
+ const baselineFailure = baselineIdentityFailures.get(fact.process.pid);
+ if (baselineFailure !== undefined) failures.push(baselineFailure);
if (fact.state === "replaced")
failures.push({
pid: fact.process.pid,
reason: "process-identity-unavailable",
diagnostic: "process identity changed during token validation",
});
- else if (
- fact.state === "unavailable" &&
- fact.identityAfter.state !== "absent"
- )
+ else if (fact.state === "unavailable")
failures.push({
pid: fact.process.pid,
reason: "process-identity-unavailable",
@@ -1392,7 +1398,6 @@ const scanWithOwnershipEvidence = async (
reason: "run-token-mismatch",
});
if (fact.token.state !== "unavailable") continue;
- if (fact.identityAfter.state === "absent") continue;
const relationBefore =
fact.identityBefore.state === "readable"
? fact.identityBefore.relation
diff --git a/src/process/ProcessOwnershipObservation.ts b/src/process/ProcessOwnershipObservation.ts
index 592833855..01439da94 100644
--- a/src/process/ProcessOwnershipObservation.ts
+++ b/src/process/ProcessOwnershipObservation.ts
@@ -1,5 +1,6 @@
import { readFile } from "node:fs/promises";
import { parseLinuxProcessStat } from "./LinuxProcessStat.js";
+import { parseLinuxProcessEffectiveUid } from "./LinuxProcessStatus.js";
import { AnalysisCapabilityUnavailableError } from "../domain/analysisErrorCore.js";
import { launcherIdentityFailure } from "./ProcessOwnershipIdentity.js";
@@ -498,6 +499,7 @@ const readIdentityFacts = async (
host: ProcessOwnershipHost,
phase: "before" | "after",
signal?: AbortSignal,
+ effectiveUidPids?: ReadonlySet<number>,
): Promise<ReadonlyMap<number, ProcessIdentityObservation>> => {
signal?.throwIfAborted();
if (host.processIdentities === undefined)
@@ -511,10 +513,11 @@ const readIdentityFacts = async (
]),
);
try {
- const observations =
- signal === undefined
- ? await host.processIdentities(processes)
- : await host.processIdentities(processes, signal);
+ const observations = await host.processIdentities(
+ processes,
+ signal,
+ effectiveUidPids,
+ );
signal?.throwIfAborted();
return new Map<number, ProcessIdentityObservation>(
processes.map(({ pid }) => [pid, identityFact(observations, pid, phase)]),
@@ -583,11 +586,17 @@ export const readProcessOwnershipFacts = async (
}
signal?.throwIfAborted();
+ const effectiveUidPids = new Set(
+ processes
+ .filter(({ pid }) => tokens.get(pid)?.state !== "readable")
+ .map(({ pid }) => pid),
+ );
const identityAfter = await readIdentityFacts(
processes,
host,
"after",
signal,
+ effectiveUidPids,
);
signal?.throwIfAborted();
const facts = processes.map((process): ProcessOwnershipFact => {
@@ -699,7 +708,7 @@ export const createSystemProcessOwnershipHost = (
};
const processIdentities: NonNullable<
ProcessOwnershipHost["processIdentities"]
- > = async (processes, signal) => {
+ > = async (processes, signal, effectiveUidPids) => {
if (processes.length === 0) return new Map();
if (platform === "linux")
return new Map<number, ProcessIdentityObservation>(
@@ -716,27 +725,78 @@ export const createSystemProcessOwnershipHost = (
...(signal === undefined ? {} : { signal }),
});
const parsed = parseLinuxProcessStat(stat);
- return [
- pid,
- parsed === undefined || parsed.pid !== pid
- ? ({
- state: "unavailable",
- reason: "malformed_proc_stat",
- } as const)
- : ({
- state: "readable",
- identity: `linux-starttime:${parsed.startTime}`,
- lifecycle: {
- state: "observed",
- lifecycle: parsed.lifecycle,
- },
- relation: {
- state: "observed",
- parentPid: parsed.parentPid,
- processGroupId: parsed.processGroupId,
- },
- } as const),
- ] as const;
+ if (parsed === undefined || parsed.pid !== pid)
+ return [
+ pid,
+ {
+ state: "unavailable",
+ reason: "malformed_proc_stat",
+ } as const,
+ ] as const;
+
+ const readableIdentity = (
+ facts: typeof parsed,
+ effectiveUid?: number,
+ ) => ({
+ state: "readable" as const,
+ identity: `linux-starttime:${facts.startTime}`,
+ ...(effectiveUid === undefined ? {} : { effectiveUid }),
+ lifecycle: {
+ state: "observed" as const,
+ lifecycle: facts.lifecycle,
+ },
+ relation: {
+ state: "observed" as const,
+ parentPid: facts.parentPid,
+ processGroupId: facts.processGroupId,
+ },
+ });
+
+ if (!effectiveUidPids?.has(pid))
+ return [pid, readableIdentity(parsed)] as const;
+
+ let status: string;
+ try {
+ status = await readFile(`/proc/${String(pid)}/status`, {
+ encoding: "utf8",
+ ...(signal === undefined ? {} : { signal }),
+ });
+ } catch (cause: unknown) {
+ if (isExpectedAbort(cause, signal)) throw cause;
+ return [pid, readableIdentity(parsed)] as const;
+ }
+ signal?.throwIfAborted();
+ const effectiveUid = parseLinuxProcessEffectiveUid(status);
+ if (effectiveUid === undefined)
+ return [pid, readableIdentity(parsed)] as const;
+
+ let afterStatus: string;
+ try {
+ afterStatus = await readFile(`/proc/${String(pid)}/stat`, {
+ encoding: "utf8",
+ ...(signal === undefined ? {} : { signal }),
+ });
+ } catch (cause: unknown) {
+ if (isExpectedAbort(cause, signal)) throw cause;
+ return [pid, readableIdentity(parsed)] as const;
+ }
+ signal?.throwIfAborted();
+ const verified = parseLinuxProcessStat(afterStatus);
+ if (
+ verified !== undefined &&
+ verified.pid === pid &&
+ verified.startTime !== parsed.startTime
+ )
+ return [
+ pid,
+ {
+ state: "unavailable",
+ reason: "process_identity_changed_during_uid_observation",
+ } as const,
+ ] as const;
+ if (verified === undefined || verified.pid !== pid)
+ return [pid, readableIdentity(parsed)] as const;
+ return [pid, readableIdentity(verified, effectiveUid)] as const;
} catch (cause: unknown) {
if (isExpectedAbort(cause, signal)) throw cause;
if (