The library doesn't seem to support enabling or disabling Secret Scanning. This is doable through the REST API by sending a PATCH request and setting the status in the object secret_scanning to enabled or disabled. https://docs.github.com/en/rest/reference/repos#update-a-repository
Is this planned to be added to the library?