Is there a way to hook rebuild permissions?
For Drupal 7, the submit handler for admin/reports/status/rebuild is node_configure_rebuild_confirm_submit, which calls node_access_rebuild.  Just note that node_access_rebuild can take a while (and why it support batch mode).