So Joshua made peace with them and formalized it with a covenant to guarantee their lives. The leaders of the congregation swore to it.