Unable to apply predefined security attributes to new group projects
Summary
In newly created groups, predefined security attributes such as “Business impact - Missing critical” appear in the UI but cannot be applied to projects. Attempts to apply them return a GraphQL error: “Invalid attribute.”
Steps to Reproduce
- Log in as an administrator or root user.
- Create a new group and a project in it (or use one without existing security attributes).
- Go to Group → Security Inventory.
- Click Add attributes and select Business impact - Missing Critical.
- Save changes.
Result: A GraphQL error appears, typically “Invalid attribute.”
Workaround
- Create any custom security attribute category.
- Retry applying the predefined attribute.
Result: Predefined attributes such as “Business - Missing Critical” can now be applied successfully.
Error Details
Request:
{ "operationName": "UpdateProjectAttributesMutation", "variables": { "input": { "projectId": "gid://gitlab/Project/78", "addAttributeIds": [ "gid://gitlab/Security::Attribute/business_operational" ], "removeAttributeIds": [] } } }
Response:
{
"data": {
"securityAttributeProjectUpdate": {
"addedCount": null,
"removedCount": null,
"errors": ["Invalid attributes"]
}
}
}
Possible Fix
TBD
Edited by Dheeraj Joshi