feat(android): integrate static APK analysis with headless JADX (#738)

* feat(android): integrate static APK analysis with headless JADX

* test(android): include APK tools in explicit effects audit
This commit is contained in:
N0zoM1z0
2026-10-06 12:46:48 +00:00
committed by GitHub
parent d0f3480a3c
commit 904d03e987
59 changed files with 3342 additions and 52 deletions
+32
View File
@@ -0,0 +1,32 @@
/** Process signal boundary injectable without emitting signals into a test runner. */
export interface CommandCancellationHost {
on(signal: "SIGINT" | "SIGTERM", listener: () => void): unknown;
off(signal: "SIGINT" | "SIGTERM", listener: () => void): unknown;
exitCode?: number | string | null | undefined;
}
/** Translate one-shot CLI interrupts into awaited cleanup and conventional exit codes. */
export const withCommandCancellation = async <Value>(
operation: (signal: AbortSignal) => Promise<Value>,
host: CommandCancellationHost = process,
): Promise<Value> => {
const controller = new AbortController();
let exitCode: number | undefined;
const interrupt = () => {
exitCode ??= 130;
controller.abort();
};
const terminate = () => {
exitCode ??= 143;
controller.abort();
};
host.on("SIGINT", interrupt);
host.on("SIGTERM", terminate);
try {
return await operation(controller.signal);
} finally {
host.off("SIGINT", interrupt);
host.off("SIGTERM", terminate);
if (exitCode !== undefined) host.exitCode = exitCode;
}
};