Velcro is a good idea.
I've wedged the lock in the top of the rack with a toestrap holding it for now, thanks for the toe strap suggestion above^
It would be cool to have a lock holster on the side of the rack so I can utilise the top of the rack at some point.
appols for a****n link - but i really like velcro one-wrap - hook on one side, loop on the other.
i bought a big roll and have used it for loads of stuff and keep some wrapped around my bike racks for strapping random stuff on.
https://www.amazon.co.uk/VELCRO%C2%AE-Brand-ONE-WRAP%C2%AE-double-Strapping/dp/B0777LN5VP?th=1