dev-sec / ssh-baseline

DevSec SSH Baseline - InSpec Profile
https://dev-sec.io/baselines/ssh/
Apache License 2.0
283 stars 78 forks source link

custom path for hostkeys #163

Closed micheelengronne closed 4 years ago

micheelengronne commented 4 years ago

Do the attributes work in libraries ? Are they called the way I did ?

chbiel commented 4 years ago

Good morning, we experience the following problem with this version:

×  sshd-14: Server: Specify SSH HostKeys
   ×  SSHD Configuration HostKey
   undefined local variable or method `sshd_custom_path' for ssh_crypto:#<Class:0x0000000006e25058>

can you help out?

chris-rock commented 4 years ago

@chbiel Yeah, I see. This is a bug. Can you file a new ticket. The variable needs to be fetched properly. Until then I recommend to use the latest version before that release.

chbiel commented 4 years ago

thanks, I will create it. maybe a dumb question but is there an easy way provided by inspect to use a specific tag?

currently we run

inspec exec https://github.com/dev-sec/ssh-baseline.git --attrs /tmp/spec/global/attributes/ssh-baseline.yaml \
  --no-distinct-exit \
  --no-interactive \
  --no-color

is there something like inspec exec https://github.com/dev-sec/ssh-baseline.git#2.5.3 I am not aware of? Thanks in advance

chris-rock commented 4 years ago

Yes you can. Back then when I built the feature in InSpec, I made it so that you can copy paste the github url:

inspec exec https://github.com/dev-sec/ssh-baseline/tree/2.5.1