Understand the complexities of enforcing security configurations.
Security configurations can be enforced, meaning repository owners cannot change the enablement status of features that are enabled or disabled by the configuration.
Some situations can break the enforcement of security configurations. For example, the enablement of code scanning will not apply to a repository if:
If a user in your organization or enterprise attempts to change the enablement status of a feature in an enforced configuration using the REST API, the API call will appear to succeed, but no enablement statuses will change.