Replace security advisory credit fields

Created on 5 November 2024, 5 months ago

Problem/Motivation

Currently security advisories have text fields for Reported/Fixed/Coordinated by which accept HTML copied from a draft on security.drupal.org. For credit, users are parsed by the drupalorg_sa_save() function. This is great for copy/pasting, but will not be a good UI for granting credit in the first place. We will need a crediting UI as security.drupal.org is replaced.

HTML does allow crediting people without a Drupal.org account, or adding details other than just the username. ”of the Drupal Security Team” is commonly added.

While we have a good list of current security team members, we don’t have a great machine-readable record of who was on the team at any given time. That might be a reason to keep the text field version.

We encourage every reporter to create a Drupal.org account for credit. I believe there would be exceptions, especially for earlier reports. In the case of coordinated disclosure with another project, it might not make sense to pick a single person or require them to make a Drupal.org account. We should spot check existing advisories to see how often people credited isn’t a simple list of Drupal.org accounts

Proposed resolution

Assuming we do want the flexibility of the existing HTML fields, the goal is to make them easier to fill out. At minimum, a way to autocomplete usernames and have them fill out the HTML. Even better would be integration with the security issue to get potential names from who interacted with the issue.

If we don’t need that flexibility, we might migrate to more structured data. A field collection with a user reference, whether they helped report, fix, and/or coordinate, and a text note for “of the Drupal Security Team” or anything else we want to say. This would be a migration for existing advisories, so would require that followup to complete and remove the old fields.

Remaining tasks

  • Spot check existing advisories to see how often people credited isn’t a simple list of Drupal.org accounts.
  • Decide on which proposed resolution to take.

User interface changes

Replace HTML input with selecting people to credit. Pre-filled with people who worked on the issue in the future.

API changes

The jsonapi and rest APIs will have the field data changed if we drop the HTML field.

📌 Task
Status

Active

Version

3.0

Component

Security advisories

Created by

🇺🇸United States drumm NY, US

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

  • Issue created by @drumm
  • 🇺🇸United States greggles Denver, Colorado, USA

    Spot check existing advisories to see how often people credited isn’t a simple list of Drupal.org accounts.

    I believe it's extremely rare (maybe non existent) in the last 10 years for credit to be a link outside of Drupal.org

  • 🇺🇸United States cmlara

    From a technical standpoint:
    As long as the Drupal CNA accepts email reports (see: https://www.cve.org/PartnerInformation/ListofPartners/partner/drupal) the system will in theory need to support non D.O. users. If the email submission is shutdown it might need to trigger a review of all D.O. account policies (Users banned by the CWG for example may still need to be permitted to open Security Reports and explicit exemptions from a number of site wide terms of services may be needed for security reporters).

    I believe it's extremely rare (maybe non existent) in the last 10 years for credit to be a link outside of Drupal.org

    Flip side of that, how often does the Drupal Security team asked about how those working an issue want credit assigned?

    We might have a case of 'process induced bias' here. I have worked a few security issues and never been asked how I want my credit attributed. Not saying I would change how I've been credited, however equally I'm not saying I would keep it either, since the choice has not been offered I have never considered it.

    Tagging 📌 Create CVEs for contributed projects in 2024 Active as related since it is discussing using the content of the fields as authoritative data.

  • 🇺🇸United States drumm NY, US

    Email reports to security@drupal.org will be accepted indefinitely. There are no plans to change this.

    For reports received by email, we do ask them to create an issue with a Drupal.org account. However, if an issue is valid and important to fix, we don’t let the process hold up working toward a fix. We can make the issue, start working on it, and ask if they have a Drupal.org account for collaboration on the issue. We do make it clear that to be credited on the security advisory, we do need a Drupal.org account.

    Updating the organization you are credited with is doable, but does require admin access. We’re happy to update anything when asked.

  • 🇺🇸United States drumm NY, US

    The formatting does look very consistent, so we could convert this to more structured data. The exception I spotted was when we were doing combined advisories like https://www.drupal.org/sa-core-2018-001 , but that is not too common. The structured data would still need (person, reported|fixed|coordinated, ”of the Drupal security team”); the last value could be a string and add the extra context.

    That said, I think I’d like to keep the text field for now and add affordances for filling it out consistently. Converting to structured data would be more time-consuming buildout right now and a migration. That can be done later.

    • drumm committed c19e910e on 7.x-3.x
      Issue #3485756: Add by usernames for security advisory credit fields
      
  • 🇺🇸United States drumm NY, US

    Advisories on www.drupal.org now allow filling reported/fixed/coordinated with a list of usernames. The Update button does the translation to HTML so it won’t update the HTML unless you proactively want to update it

  • Automatically closed - issue fixed for 2 weeks with no activity.

Production build 0.71.5 2024