To the best of my recollection she was asked in the context of Gaza and the Oct 7th attack during the debate, not attacks from Iran. The ‘Israel must defend itself’ argument comes up constantly in the context of the massive death toll in Gaza.
I know the situation is complex and foreign states like Iran fund and supply Palestinian resistance, but it seems like a an easy way to deflect criticism by changing the focus from Palestinians to hostike nations like Iran.