mirror of
https://github.com/1Password/load-secrets-action.git
synced 2026-06-21 14:23:48 +00:00
Add check for macos signature
This commit is contained in:
@@ -12,6 +12,7 @@ import {
|
||||
type SupportedPlatform,
|
||||
} from "./cli-installer";
|
||||
import { type Installer } from "./installer";
|
||||
import { verifyMacOsPackageSignature } from "./signature";
|
||||
|
||||
const execFileAsync = promisify(execFile);
|
||||
|
||||
@@ -34,6 +35,9 @@ export class MacOsInstaller extends CliInstaller implements Installer {
|
||||
const pkgWithExtension = `${pkgPath}.pkg`;
|
||||
fs.renameSync(pkgPath, pkgWithExtension);
|
||||
|
||||
core.info("Verifying 1Password CLI signature");
|
||||
await verifyMacOsPackageSignature(pkgWithExtension);
|
||||
|
||||
const expandDir = "temp-pkg";
|
||||
await execFileAsync("pkgutil", ["--expand", pkgWithExtension, expandDir]);
|
||||
const payloadPath = path.join(expandDir, "op.pkg", "Payload");
|
||||
|
||||
Reference in New Issue
Block a user