added secrets check in invalidate task