ci(cli): check keepiq ssh-agent on macOS - #1142
Merged
Merged
Conversation
A macos-latest job runs the CLI's Go tests (the real-sshd integration test and the eval test must pass, not skip), then the README's recipe in a real shell against a fake Keepiq and a throwaway sshd started as the runner user: eval, ssh-add -l, ssh and git clone over SSH, -x lock, -X unlock, refusal of ssh-add <file>/-d/-D, and kill. It then loads the README's launchd plist and checks the agent it starts, unlock, login and KeepAlive restart. Refs #1042
This was referenced Oct 4, 2026
rubenvdlinde
added a commit
that referenced
this pull request
Oct 4, 2026
Under systemd the agent's stdout is the journal, not a terminal, so it took the eval path (#1022): it started a background copy and its main process exited 0. systemd then stopped the unit and killed the copy with the cgroup, so the README's service never kept running. Found by the macOS CI lane (#1142). --foreground keeps the agent in the process systemd started; the README unit uses it. The detach decision is now shouldDetach(), pinned by a test.
Contributor
Quality Report — ConductionNL/keepiq @
|
| Check | PHP | Vue | Security | License | Tests |
|---|---|---|---|---|---|
| lint | ✅ | ||||
| phpcs | ✅ | ||||
| phpmd | ✅ | ||||
| psalm | ✅ | ||||
| phpstan | ✅ | ||||
| phpmetrics | ✅ | ||||
| eslint | ✅ | ||||
| stylelint | ✅ | ||||
| build | ✅ | ||||
| check-manifest | ✅ | ||||
| test-l10n | ✅ | ||||
| format | ✅ | ||||
| check-l10n-js | ✅ | ||||
| check-schema-l10n | ✅ | ||||
| composer | ✅ | ✅ 114/114 | |||
| npm | ✅ | ✅ 660/660 | |||
| app:check-code | ⏭️ | ||||
| info.xml | ✅ | ||||
| REUSE | ✅ | ||||
| lockfile sync | ✅ | ||||
| PHPUnit | ❌ | ||||
| Newman | ❌ | ||||
| Playwright | ⏭️ deferred: E2E runs locally and on the promotion path only. This pull request targets development, so the suite is asked once per promotion into beta and main rather than once per push per open pull request. Run it locally with npx playwright test, or from the Actions tab on a branch with no open pull request into development. |
||||
| Hydra gates | ✅ |
Quality workflow — 2026-10-04 14:34 UTC
Download the full PDF report from the workflow artifacts.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #1042
Nobody on the team has a Mac, so this checks
keepiq ssh-agenton amacos-latestrunner instead (Ruben's call, 4 October). The job needs no secrets and no Nextcloud server.What the job runs
New workflow
.github/workflows/cli-macos.yml, on pull requests that touchcli/,sdk/go/,sdk/testdata/or the workflow itself, and on demand.go vetandgo test ./...forcli/. The step fails ifTestRealSSHThroughTheAgent(realsshagainst a throwawaysshd),TestEvalReturnsAndTheAgentKeepsServing(the fix(cli): page the secret list and let eval start the SSH agent (#786 live checks) #1022 hang) orTestVaultUnlockerReadsOnlyCiphertextdid not pass, so a skip cannot read as green.cli/scripts/ssh-agent-e2e.shstarts a fake Keepiq (cli/internal/fakevault, test only, not in the release build) and ansshdrun as the runner user on a high port with its own host key andauthorized_keys. The vault key exists only in the fake vault, so a login can only come from the agent. It then checks:eval "$(keepiq ssh-agent)"returns, exportsSSH_AUTH_SOCKandSSH_AGENT_PID, and the socket sits at the README's macOS default$TMPDIR/keepiq-<uid>/agent.sock, mode 0600 in a 0700 folderssh-add -llists the vault key and skips the login secretsshandgit cloneover SSH log in with itssh-add -xlocks: no keys, login refused withPermission denied; a wrong password does not unlockssh-add -Xwith the master password unlocks, and the login works againssh-add <file>,ssh-add -dandssh-add -Dare refusedkill $SSH_AGENT_PIDstops the agent and removes the socketcli/README.md, runsplutil -lint, checks itsProgramArguments, fills in the binary path and home, and loads it with the README's ownlaunchctl load. It then checks the agent starts locked, unlocks withssh-add -X, serves a login, and comes back locked after a kill (KeepAlive). If the runner refuses to load a LaunchAgent, the step records what launchctl said and warns.Verified
golang:1.25as a non-root user (the macOS case): all seven checks.actionlint1.7.7 with shellcheck 0.11.0: no findings.shellcheckon the script: clean.gofmt: clean.$TMPDIR/keepiq-501/agent.sock. The README'slaunchctl loadworked: the agent started locked, unlocked withssh-add -X, served a login, and came back locked after a kill (KeepAlive).Not covered on a runner
The launchd check loads the plist into a running session. Whether the agent starts at a real login (a reboot and a fresh login) cannot be tested on a runner.
Inherited findings: none in the files this PR adds.