"stiffly" is fine. I would actually say "standing to attention", but Google hits seem fairly evenly split between "to" and "at", and I'm wondering if this is a BrE/AmE thing.
New words, one handy idiom, and a 2-minute quiz — delivered to your inbox to keep your streak alive.