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

sshd_config syntax guard is missing on PermitTunnel #845

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

rvodden
Copy link

@rvodden rvodden commented Feb 4, 2025

if a value for ssh_permit_tunnel is passed to the devsec.hardening.ssh_hardening role, then at present that value is passed on without validation.

This is because the value of ssh_permit_tunnel is not guarded in opensshd.conf.j2:

PermitTunnel {{ ssh_permit_tunnel }}

this stands in contrast to other boolean values which have appropriate guards to ensure valid syntax:
e,g,

AllowAgentForwarding {{ 'yes' if (ssh_allow_agent_forwarding|bool) else 'no' }}

This PR resolves this issue and ensures that PermitTunnel will render correctly

@rvodden rvodden force-pushed the fix/tunnel_syntaz_error branch from 4317dff to 4682030 Compare February 4, 2025 13:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant