Skip to content

Commit f0a403c

Browse files
prezhapoiana
authored andcommitted
increase timeout for syscall.DisallowedSSHConnectionNonStandardPort
Signed-off-by: Predrag Rogic <prezha@users.noreply.github.com>
1 parent 3604216 commit f0a403c

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

events/syscall/disallowed_ssh_connection_non_standard_port.go

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,8 @@ func DisallowedSSHConnectionNonStandardPort(h events.Helper) error {
3434
}
3535

3636
// note: executing the following command might fail, but enough to trigger the rule, so we ignore any error
37-
if err := runCmd(context.Background(), 1*time.Second, ssh, "user@example.com", "-p", "443"); err != nil {
37+
// in some cases it takes more than one second to establish the connection
38+
if err := runCmd(context.Background(), 5*time.Second, ssh, "user@example.com", "-p", "443"); err != nil {
3839
h.Log().WithError(err).Debug("failed to run ssh command (this is expected)")
3940
}
4041

0 commit comments

Comments
 (0)