The interaction is unspecified, so a ruling is required
This is one of those cases that the rules don't account for. The text of Haste, of course, doesn't mention the Steel Defender, and the rules for the Steel Defender don't explicitly call out Haste. The DM will need to make a ruling, and there are a couple of defensible rulings I can think of:
- Each use of your bonus action allows the defender to use one action. Since you only get one bonus action, only one of the defender's actions can be used for anything other than dodging. If you order one of the actions allowed by Haste, the defender can take this action and then use its "regular" action to dodge. Otherwise, it must use its regular action to carry out your order and forfeit its hasted action.
- You use your bonus action to issue a single command, and the defender may then use as many actions as it is allowed as long as it is following the command you issue. For example, if you order it to dash, it could take the Dash action twice.
- As long as you use your bonus action to issue orders, the defender can take any allowed combination of actions. For example, it could disengage and then dash.
Personally, I would favor ruling 3, which effectively treats your bonus action as the cost to "activate" the defender on a given turn, after which it can act as normal. (This follows the principle of not looking for excuses to stop your players from doing cool things.) However, any of the above rulings seems to be consistent with the rules as written.
The defender can attack with its Haste action (probably)
There is some disagreement over whether named attacks in a monster's stat block (such as the Steel Defender's Force-Empowered Rend or a panther's Bite and Claw) count as an ordinary attack action or their own actions. However, the consensus seems to be that even if these are their own actions, they are also weapon attacks available to the creature that can be used with an ordinary attack action, which means they should be compatible with the additional action granted by Haste. (This makes sense, since these attacks are also usable as attacks of opportunity.) So, under rulings 2 and 3 above, Haste would allow the defender to make 2 attacks in one turn, by taking two attack actions, while ruling 1 would allow it to attack and dodge on the same turn.