checker: enforce prober-as-observation, move all analysis to rules layer
This commit is contained in:
parent
1e6254c289
commit
f77895dcab
12 changed files with 174 additions and 171 deletions
|
|
@ -50,9 +50,9 @@ func (r *hostKeyStrengthRule) Evaluate(ctx context.Context, obs sdk.ObservationG
|
|||
// Also flag endpoints that reached KEXINIT but failed to
|
||||
// produce any host key: the handshake didn't complete.
|
||||
if len(ep.KEX) > 0 {
|
||||
issues = append(issues, analyseHandshakeHostKey(ep.Address, true, ep.HostKeys)...)
|
||||
issues = append(issues, analyseHandshakeHostKey(ep.Addr(), true, ep.HostKeys)...)
|
||||
}
|
||||
issues = append(issues, analyseHostKeyStrength(ep.Address, ep.HostKeys)...)
|
||||
issues = append(issues, analyseHostKeyStrength(ep.Addr(), ep.HostKeys)...)
|
||||
}
|
||||
if !anyKey && len(issues) == 0 {
|
||||
return []sdk.CheckState{notTestedState("ssh.host_key_strength.skipped", "No host key observed on any reachable endpoint.")}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue