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

BUG: SV-238329 malformed describe.one #20

Open
pbarrette opened this issue Feb 10, 2023 · 0 comments
Open

BUG: SV-238329 malformed describe.one #20

pbarrette opened this issue Feb 10, 2023 · 0 comments

Comments

@pbarrette
Copy link

The control tries to check for lock either via the /etc/shadow file or using the passwd -S root command.

The InSpec code suggests describe.one but ends after then shadow file check, then parses the passwd -S command as though they were separate checks.

A correction might read:

  describe.one do
    describe shadow.where(user: 'root') do
      its('passwords.uniq.first') { should eq '!*' }
    end
    describe command('passwd -S root').stdout.strip do
      it { should match(/^root\s+L\s+.*$/) }
    end
  end
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

1 participant