fix(actions): ssh channel pins known_hosts beside key (no HOME dependency)

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
root
2026-06-04 22:00:52 +10:00
parent 169e3b6d5c
commit cea2442c4f
2 changed files with 6 additions and 2 deletions

View File

@@ -15,7 +15,7 @@ describe('ssh channel', () => {
const { cmd, args } = calls[0];
expect(cmd).toBe('ssh');
expect(args).toEqual(['-i', '/k', '-o', 'BatchMode=yes', '-o', 'StrictHostKeyChecking=accept-new',
'voidact@192.168.1.230', 'restart-caddy-ct100']);
'-o', 'UserKnownHostsFile=/known_hosts', 'voidact@192.168.1.230', 'restart-caddy-ct100']);
});
it('rejects an action id with shell metacharacters', async () => {
await expect(restartService({ ip: '1.2.3.4', actionId: 'x; rm -rf /' }, { spawnImpl: () => {} }))