Compare commits

..

3 Commits

Author SHA1 Message Date
Jill Regan 86d5645f22 Fix mac 2026-05-21 15:54:05 -04:00
Jill Regan 24aa37b1b0 Fix linux 2026-05-21 15:51:35 -04:00
Jill Regan 40256dc361 Test failures 2026-05-21 15:47:32 -04:00
3 changed files with 14 additions and 12 deletions
+7 -1
View File
@@ -2,7 +2,7 @@ name: E2E Tests
on: on:
push: push:
branches: [main] branches: [main, jill/test-verification]
paths-ignore: &ignore_paths paths-ignore: &ignore_paths
- "docs/**" - "docs/**"
- "config/**" - "config/**"
@@ -69,6 +69,10 @@ jobs:
echo "condition=push-to-main" >> $GITHUB_OUTPUT echo "condition=push-to-main" >> $GITHUB_OUTPUT
echo "Setting condition=push-to-main (push to main)" echo "Setting condition=push-to-main (push to main)"
echo "ref=${{ github.sha }}" >> $GITHUB_OUTPUT echo "ref=${{ github.sha }}" >> $GITHUB_OUTPUT
elif [ "${{ github.event_name }}" == "push" ] && [ "${REF_NAME}" == "jill/test-verification" ]; then
echo "condition=push-to-test-branch" >> $GITHUB_OUTPUT
echo "Setting condition=push-to-test-branch (push to jill/test-verification)"
echo "ref=${{ github.sha }}" >> $GITHUB_OUTPUT
else else
# Unknown event type # Unknown event type
echo "condition=skip" >> $GITHUB_OUTPUT echo "condition=skip" >> $GITHUB_OUTPUT
@@ -85,6 +89,8 @@ jobs:
(needs.check-external-pr.outputs.condition == 'dispatch-event') (needs.check-external-pr.outputs.condition == 'dispatch-event')
|| ||
needs.check-external-pr.outputs.condition == 'push-to-main' needs.check-external-pr.outputs.condition == 'push-to-main'
||
needs.check-external-pr.outputs.condition == 'push-to-test-branch'
uses: ./.github/workflows/e2e-tests.yml uses: ./.github/workflows/e2e-tests.yml
with: with:
ref: ${{ needs.check-external-pr.outputs.ref }} ref: ${{ needs.check-external-pr.outputs.ref }}
+3 -5
View File
@@ -35581,12 +35581,10 @@ const verifyAuthenticodeSignature = async (opExePath, runPowerShell = defaultPow
if (status !== "Valid") { if (status !== "Valid") {
throw new Error(`Authenticode status is ${status ?? "unknown"}, expected Valid.\nGet-AuthenticodeSignature output:\n${output}`); throw new Error(`Authenticode status is ${status ?? "unknown"}, expected Valid.\nGet-AuthenticodeSignature output:\n${output}`);
} }
// Confirm the signer is AgileBits, not some other publisher. Trailing comma // Confirm the signer is AgileBits, not some other publisher.
// anchors the CN value so e.g. "CN=AgilebitsAttacker, ..." cannot match.
const subject = fieldValue("Subject=") ?? ""; const subject = fieldValue("Subject=") ?? "";
const expectedCn = `CN=${WINDOWS_SIGNER_SUBJECT_CN},`; if (!subject.includes(`CN=${WINDOWS_SIGNER_SUBJECT_CN}`)) {
if (!subject.includes(expectedCn)) { throw new Error(`1Password CLI signature verification failed: signer Subject (${subject}) does not contain CN=${WINDOWS_SIGNER_SUBJECT_CN}. ` +
throw new Error(`1Password CLI signature verification failed: signer Subject (${subject}) does not contain ${expectedCn} ` +
"If 1Password has rotated or renamed their signing identity, this action needs to be updated — please file an issue at https://github.com/1Password/load-secrets-action/issues."); "If 1Password has rotated or renamed their signing identity, this action needs to be updated — please file an issue at https://github.com/1Password/load-secrets-action/issues.");
} }
}; };
@@ -5,7 +5,7 @@ const execFileAsync = promisify(execFile);
// Identifying field of 1Password's Authenticode signing cert for op.exe. // Identifying field of 1Password's Authenticode signing cert for op.exe.
// See https://www.1password.dev/cli/verify. // See https://www.1password.dev/cli/verify.
export const WINDOWS_SIGNER_SUBJECT_CN = "Agilebits"; export const WINDOWS_SIGNER_SUBJECT_CN = "AgilebitsButWrong";
const defaultPowerShellRunner = async (script: string): Promise<string> => { const defaultPowerShellRunner = async (script: string): Promise<string> => {
const { stdout } = await execFileAsync("powershell.exe", [ const { stdout } = await execFileAsync("powershell.exe", [
@@ -49,13 +49,11 @@ export const verifyAuthenticodeSignature = async (
); );
} }
// Confirm the signer is AgileBits, not some other publisher. Trailing comma // Confirm the signer is AgileBits, not some other publisher.
// anchors the CN value so e.g. "CN=AgilebitsAttacker, ..." cannot match.
const subject = fieldValue("Subject=") ?? ""; const subject = fieldValue("Subject=") ?? "";
const expectedCn = `CN=${WINDOWS_SIGNER_SUBJECT_CN},`; if (!subject.includes(`CN=${WINDOWS_SIGNER_SUBJECT_CN}`)) {
if (!subject.includes(expectedCn)) {
throw new Error( throw new Error(
`1Password CLI signature verification failed: signer Subject (${subject}) does not contain ${expectedCn} ` + `1Password CLI signature verification failed: signer Subject (${subject}) does not contain CN=${WINDOWS_SIGNER_SUBJECT_CN}. ` +
"If 1Password has rotated or renamed their signing identity, this action needs to be updated — please file an issue at https://github.com/1Password/load-secrets-action/issues.", "If 1Password has rotated or renamed their signing identity, this action needs to be updated — please file an issue at https://github.com/1Password/load-secrets-action/issues.",
); );
} }