-
Notifications
You must be signed in to change notification settings - Fork 3.6k
Open
Labels
Area: AppleOS: macOSbug reportinvestigateCollect additional information, like space on disk, other tool incompatibilities etc.Collect additional information, like space on disk, other tool incompatibilities etc.
Description
Description
In a local arm64 machine, the following flow works with no issue:
# Create a new temporary keychain to be used by my binary
security create-keychain -p <password> <new keychain>
# Add the new keychain to the search list
security list-keychains -d user -s <new keychain> <existing keychains>
# Set the new keychain as the default one (so SecItemCopyMatching searchs on it)
security default-keychain -s <new keychain>
# Explicitly unlock the new keychain, just to be sure.
security unlock-keychain -p <password> <new keychain>
# Disable timeouts on the keychain to avoid potential issues.
security set-keychain-settings <new keychain>
...
<Call a binary invoking SecItemCopyMatching()>
However, this same flow doesn't work when using the image, resulting on the error:
The user name or passphrase you entered is not correct.
Platforms affected
- Azure DevOps
- GitHub Actions - Standard Runners
- GitHub Actions - Larger Runners
Runner images affected
- Ubuntu 22.04
- Ubuntu 24.04
- Ubuntu Slim
- macOS 14
- macOS 14 Arm64
- macOS 15
- macOS 15 Arm64
- macOS 26 Arm64
- Windows Server 2019
- Windows Server 2022
- Windows Server 2025
Image version and build link
20251216.0055.1
Is it regression?
N/A, as there wasn't a macos-13-arm image to compare with.
Expected behavior
The binary should be able to access the keychain and search for the item.
Actual behavior
The call to SecItemCopyMatching always results in the described error message:
The user name or passphrase you entered is not correct.
Despite the fact the keychain has just been created and unlocked.
Repro steps
- Create and unlock a new keychain using the described steps.
- Run a binary invoking
SecItemCopyMatching
Interestingly, the issue doesn't happen on the equivalent Intel image. Maybe because Intel is run through Rosetta?
Metadata
Metadata
Assignees
Labels
Area: AppleOS: macOSbug reportinvestigateCollect additional information, like space on disk, other tool incompatibilities etc.Collect additional information, like space on disk, other tool incompatibilities etc.