Mattis can’t be SecDef, according to this.
“The law requires that retired military officers be out of uniform for seven years before they’re eligible to be defense secretary.”
Mattis retired in 2013. Ineligible.
He can get a waiver from Congress and likely will: