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

5.2.13 fails if sshd_config is a symbolic link #162

Open
justdan96 opened this issue Jan 29, 2024 · 0 comments
Open

5.2.13 fails if sshd_config is a symbolic link #162

justdan96 opened this issue Jan 29, 2024 · 0 comments
Labels

Comments

@justdan96
Copy link

Description

I am running the benchmark against a Flatcar Linux container. On this distribution the /etc/ssh/sshd_config file is a symbolic link to /usr/share/ssh/sshd_config. This causes the 5.2.14 section to break, and a Failure to be logged.

Reproduction steps

  1. Spin up Flatcar Linux instance
  2. Run scan using command docker run -it --rm -v "$(pwd):/share" -v "$HOME/.ssh:/root/.ssh" chef/inspec exec . -t ssh://user@server -i /root/.ssh/user_key --input=cis_level=1 --chef-license accept -l debug --reporter html2:benchmark.html

Current Behavior

Section 5.2.13 is failed.

Expected Behavior

The file is read, even if is is a symbolic link, and evaluated based on contents.

OS / Environment

Flatcar

Inspec Version

chef/inspec:latest

Baseline Version

master

Additional information

Resource ./controls/5_2_ssh_server_configuration.rb:286
Test: Failed | Can't read file: /etc/ssh/sshd_config
8.1495e-05 seconds```
@justdan96 justdan96 added the bug label Jan 29, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant