Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Create Test for sftp #54

Open
atomic111 opened this issue Feb 16, 2016 · 1 comment
Open

Create Test for sftp #54

atomic111 opened this issue Feb 16, 2016 · 1 comment

Comments

@atomic111
Copy link
Member

create the tests for this commit dev-sec/chef-ssh-hardening#111

@rndmh3ro
Copy link
Member

rndmh3ro commented Aug 5, 2016

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?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants