Skip to content
MediumSupply chainBLWK-DEV-005

SSH forwards your agent to every server (‹path›) ​

What this means ​

‹path› sets ForwardAgent yes for all hosts. While you are connected, root — or an attacker — on any server you log in to can use your loaded keys to sign in to every other machine and Git host those keys open, without ever seeing the key itself.

How to fix it ​

Remove ForwardAgent from Host * (and the top of the file). To reach a machine through another, use ProxyJump (ssh -J bastion target), which needs no forwarding; if one host truly needs it, set ForwardAgent yes in that host's block only.

Check it yourself ​

Run a scan and look for BLWK-DEV-005 in the results:

sh
bulwark scan

Installed the standalone CLI package instead of the app? The command is bulwarkctl.

How Bulwark decides

Bulwark reads dev_tool_config and reports this check when:

text
kind == "ssh" and agent_forwarding_all == true

If a value can't be read, Bulwark reports the check as undetermined rather than passing it. View the rule source.

References ​

Released under the Apache License 2.0.