ssh-baseline icon indicating copy to clipboard operation
ssh-baseline copied to clipboard

Create Test for sftp

Open atomic111 opened this issue 9 years ago • 1 comments
trafficstars

create the tests for this commit https://github.com/hardening-io/chef-ssh-hardening/pull/111

atomic111 avatar Feb 16 '16 20:02 atomic111

I tried to add a test for sftp here: https://github.com/rndmh3ro/tests-ssh-hardening/blob/sftp/controls/sshd_spec.rb#L458-L465

But so far my attempts in using the sshd resource failed. These do not work:

  describe sshd_config do
    its('Subsystem sftp') { should eq nil }
end
  describe sshd_config do
    its('Subsystem sftp') { should_not exist }
end
  describe sshd_config do
    its('Subsystem') { should_not include('sftp') }
end

Is it possible with the sshd resource or should I just use the file module with content?

rndmh3ro avatar Aug 05 '16 16:08 rndmh3ro