Skip to content

Update project security settings

PUT
/api/v4/projects/{id}/security_settings

Updates project security settings for a specified project. You must have the Maintainer or Owner role for the project.

id
required
One of:
string

The ID or URL-encoded path of the project

Media type application/json
object
secret_push_protection_enabled

Enable/disable secret push protection

boolean
nullable
pre_receive_secret_detection_enabled

Enable/disable secret push protection

boolean
nullable
fast_dependency_paths_enabled

Enable fast mode for dependency path graph builds. When enabled, records one path per dependency instead of all possible paths, reducing memory and processing time for large dependency graphs. Requires the dependency_paths feature flag to be enabled.

boolean
nullable
Example generated
{
"secret_push_protection_enabled": true,
"pre_receive_secret_detection_enabled": true,
"fast_dependency_paths_enabled": true
}

OK

Bad Request

Not Found