Page MenuHomePhabricator

Stop writing "std:maniphest:security_topic" in "maniphest_customfieldstorage" DB table
Open, LowPublic

Description

Splitting from T385850#10555033. Likely in misc/src/policy/WMFLockTaskController.php. I believe it's never read again.

Details

Related Changes in GitLab:
TitleReferenceAuthorSource BranchDest Branch
Draft: Stop setting std:maniphest:security_topicrepos/phabricator/extensions!51aklapperT388590secTopicwmf/stable
Customize query in GitLab

Event Timeline

Aklapper triaged this task as Low priority.

misc/src/policy/WMFLockTaskController.php only handles the custom "Protect as Security issue" menu item in the task sidebar.

The actual issue is that we have a Custom (dropdown) Field called "Security" in every task, and its value is written for every new task into our DB.

SELECT * FROM phabricator_search.search_editengineconfiguration WHERE properties LIKE "%security_topic%" AND (properties NOT LIKE "%security_topic\":\"hidden%" AND properties NOT LIKE "%security_topic\":\"default%"); shows that three Forms exposed this field:

All of those set the value of the Security dropdown to "Access Request", and all three lock that value so it cannot be edited by a user.
Two of those forms set the task subtype "Administrative Request", one of those forms sets the default task subtype "Task".

In all three Forms, under "Lock / Hide Fields", I changed "Security" from "Locked" to "Hidden".

For example, we do not store the "Author Affiliation" custom dropdown field (exists for Security tasks) in the DB when it keeps its default value "N/A".
Wondering how can we do the same for that Security field dropdown, as an initial step to get rid of that in the long term.
Looking at https://phabricator.wikimedia.org/config/edit/maniphest.custom-field-definitions/ , it says that

  • in our Database we set "default": "default" for "security_topic"
  • in our Local Config we set "default": "default" for "security_topic" and "risk.rating"

The latter likely comes from https://gitlab.wikimedia.org/repos/phabricator/deployment/-/blob/wmf/stable/scap/templates/phabricator/conf/local/local.json.j2 which also defines "default": "default" for "risk.rating".
That difference is yet again T398460: Phab Scap template vs actual value out of sync for numerous values (plus a bit of T239355 as its predecessor to create more entropy).

https://we.phorge.it/book/phorge/article/custom_fields/ only says "default: Default field value." That might welcome upstream clarification when it comes to database writing behavior.
I should probably test this behavior locally first.