Skip to content

5.2.13 fails if sshd_config is a symbolic link #162

@justdan96

Description

@justdan96

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```

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions