Security announcements are drafted on Security.Drupal.org with http://cgit.drupalcode.org/securitydrupalorg/tree/features/sdo_content_t.... This should stay on Security.Drupal.org as a well-protected place to draft announcements.

Drupal.org could do some more-interesting things, such as entity references to release nodes.

When done, return to #2461169: Migrate Security announcements mailing list which is postponed on this.

Remaining work

  • Default the author to Drupal Security team.
  • Add a Contact & more info block.
  • Make something to make copying over SA drafts from security.drupal.org easy.
    • Will probably work around - version options are prefilled only for saved SAs. If project is pre-filled, we want version options.
  • Copy over SAs made this year to verify we have a good place for everything. (Full migration requires splitting up different HTML formats into fields, some people have bits of code lying around, but there won’t be a full migration of all SAs right away.)
    • Multiple vulnerability releases will need an overall risk calc.
  • Add list module integration.
  • Add the new Views.
  • Section navigation
  • Human-readable URLs
  • Coordinated by field display is out of order

Comments

yesct’s picture

Issue tags: +d.o content strategy
yesct’s picture

Issue summary: View changes

drumm credited mlhess.

drumm’s picture

drumm’s picture

I committed the refactoring changes to the dev branch. On devwww, I made a 2461167-sa branch, committed what was there so far, and merged in dev. The diff is quite a bit smaller now.

Reusing the version field from issues won't work well. The field base config keeps track of single/multivalued fields, so this forces issues to have multiple values for versions: https://sa-drupal.dev.devdrupal.org/admin/structure/features/drupalorg_s.... While that's something we might want to do, #66484: Allow issues to be filed against multiple versions/branches., that comes with a bunch of other work. Something like #1347438: Reverting Features Drops Search API DB tables is probably where all the issues went on that dev site.

The versions field value population is somewhat abstracted out, using this little module https://www.drupal.org/project/dereference_list.

  • drumm committed b71c81f on 7.x-3.x authored by mlhess
    Issue #2461167 by mlhess, drumm: Refactor issue credit to be more...
tvn’s picture

I looked around on sa-drupal dev site, a few things:
1. It looks like node titles are generated automatically, the one I saw was:
"Drupal core - Security risk: 12/25 ( Moderately Critical) AC:Basic/A:User/CI:Some/II:None/E:Proof/TD:All - XSS - SA-contrib-201"
This should be much shorter, can we only take 'Moderately Critical' part of the security risk field value?
2. It would be nice if Project: [title] would link to the project page
3. Published date is not currently displayed in any way
4. Content type could use a description on /node/add

It would be nice if the issue summary could be updated with more details about the planned content type. E.g. where and how it would be used and displayed (are there issues about creating views to display listings of SAs?), user permissions (I assume only 'security team' role and admins will be able to create it?), will SA be displayed in any way on related projects, what are the planned url patterns for these, etc. etc.

The view of SAs should be a logical part of the Security section, so would be nice to discuss building those while keeping the overall Security section in mind. Where there any email notifications planned for the new content type? By making it a group content inside of Security section, we get those for free (users can follow Security section and get notifications of all new nodes created in it).

tvn’s picture

Status: Active » Needs work

  • drumm committed b71c81f on 2461167-sa authored by mlhess
    Issue #2461167 by mlhess, drumm: Refactor issue credit to be more...
  • drumm committed 1abadc9 on 2461167-sa
    Issue #2461167: Keep comments hidden & set SA title
    
  • drumm committed 26a0260 on 2461167-sa
    Issue #2461167 by mlhess: Fix notice
    
  • drumm committed 710ce99 on 2461167-sa
    Issue #2461167: Add formatter for risk level
    
  • drumm committed 91a91ec on 2461167-sa
    Issue #2461167: Only look for files if they can exist
    
  • drumm committed ed1b367 on 2461167-sa
    Issue #2461167: Refactor security risk calculation to a function
    
drumm’s picture

I made a few improvements over the last couple weeks:

  • The title is now automated, except the section like “Multiple vulnerabilities”. I think we need a field added for that unless I’m missing something.
  • Crediting now recognizes aliased URLs like https://www.drupal.org/u/coltrane.
  • Comments now stay hidden.

  • drumm committed 34eeb60 on 7.x-3.x
    Issue #2461167: Only look for files if they can exist
    

  • drumm committed 54d8c26 on 2461167-sa
    Issue #2461167: Add extra field for SA date
    
  • drumm committed 9367a4b on 2461167-sa
    Issue #2461167: Add vulnerability type to title
    

  • drumm committed 34eeb60 on 2461167-sa
    Issue #2461167: Only look for files if they can exist
    
  • drumm committed a71d294 on 2461167-sa
    Issue #2461167 by drumm, mlhess: Export SA feature
    
  • drumm committed dc91686 on 2461167-sa
    Issue #2461167: Use project behavior handler instead of hard-coded node...
drumm’s picture

I think I fixed up everything from #7, and pushed an export of the feature.

To do:

  • Version field should use dereference_list to get version numbers from the project, or add help text for correct formatting.
  • Make sure PSAs can work.
  • Make sure the trimmed version on the home page looks nice.
  • Make Views for SA pages.
  • Add lists integration.

  • drumm committed dc91686 on 7.x-3.x, dev
    Issue #2461167: Use project behavior handler instead of hard-coded node...
mlhess’s picture

Version field should use dereference_list to get version numbers from the project, or add help text for correct formatting.

Is now done and on the branch, but I forgot the issue number in the commit

  • drumm committed 61c6dc7 on 2461167-sa
    Issue #2461167: Fix DB errors when crediting non-matching accounts
    

  • drumm committed 1bbfb92 on 2461167-sa
    Issue #2461167: Whitespace
    
  • drumm committed 5cbdc91 on 2461167-sa
    Issue #2461167: Add notes about PSAs
    
  • drumm committed a0fa684 on 2461167-sa
    Issue #2461167: Export nodechanges field
    

  • drumm committed 83da32f on 2461167-sa
    Issue #2461167: Add remaining comment fields
    

  • drumm committed e26446a on 2461167-sa
    Issue #2461167: Formatting for PSAs
    
  • drumm committed f138b08 on 2461167-sa
    Issue #2461167: Do not email creditees about SAs
    

  • drumm committed 7bfef19 on 2461167-sa
    Issue #2461167: Include SA description if promoted to home page
    
drumm’s picture

PSAs are now done by selecting the “securitydrupalorg” project. This autogenerates a title without the project name or security risk, matching recent PSAs. If promoted to the home page, up to the first 150 characters of the description are included, in line with the usual promoted blog posts.

Remaining work:

  • Make Views for SA pages.
  • Add lists integration.
drumm’s picture

I started on the PSA View at https://sa2-drupal.dev.devdrupal.org/admin/structure/views/view/drupalor.... The “Content: Has taxonomy term” filter is causing an INNER JOIN {taxonomy_index} instead of LEFT JOIN, so the test PSA on the site isn’t found. Hopefully a different filter works better.

kattekrab’s picture

Hey @drumm - any updates or progress on this one?

Or - more specifically - anything any of us can do to help?

drumm’s picture

I think this round of work is actually good to launch. Then we can:

  • Copy over SAs made this year to verify we have a good place for everything. (Full migration requires splitting up different HTML formats into fields, some people have bits of code lying around, but there won’t be a full migration of all SAs right away.)
  • Add/change anything we discover.
  • Add list module integration.
  • Add the new Views. Due to how taxonomy Views filters work, it doesn’t seem to be doable to make a View of both old and new SAs. mlhess said making the old Views "archive views" and cross-linking them is good.

I think I might do the initial launch on a Saturday since I fully expect it to degrade site performance for 10 minutes.

  • drumm committed 1abadc9 on 7.x-3.x, dev
    Issue #2461167: Keep comments hidden & set SA title
    
  • drumm committed 1bbfb92 on 7.x-3.x, dev
    Issue #2461167: Whitespace
    
  • drumm committed 26a0260 on 7.x-3.x, dev
    Issue #2461167 by mlhess: Fix notice
    
  • drumm committed 54d8c26 on 7.x-3.x, dev
    Issue #2461167: Add extra field for SA date
    
  • drumm committed 5cbdc91 on 7.x-3.x, dev
    Issue #2461167: Add notes about PSAs
    
  • drumm committed 61c6dc7 on 7.x-3.x, dev
    Issue #2461167: Fix DB errors when crediting non-matching accounts
    
  • drumm committed 710ce99 on 7.x-3.x, dev
    Issue #2461167: Add formatter for risk level
    
  • drumm committed 7bfef19 on 7.x-3.x, dev
    Issue #2461167: Include SA description if promoted to home page
    
  • drumm committed 83da32f on 7.x-3.x, dev
    Issue #2461167: Add remaining comment fields
    
  • drumm committed 91a91ec on 7.x-3.x, dev
    Issue #2461167: Only look for files if they can exist
    
  • drumm committed 9367a4b on 7.x-3.x, dev
    Issue #2461167: Add vulnerability type to title
    
  • drumm committed a0fa684 on 7.x-3.x, dev
    Issue #2461167: Export nodechanges field
    
  • drumm committed a71d294 on 7.x-3.x, dev
    Issue #2461167 by drumm, mlhess: Export SA feature
    
  • drumm committed e26446a on 7.x-3.x, dev
    Issue #2461167: Formatting for PSAs
    
  • drumm committed ed1b367 on 7.x-3.x, dev
    Issue #2461167: Refactor security risk calculation to a function
    
  • drumm committed f138b08 on 7.x-3.x, dev
    Issue #2461167: Do not email creditees about SAs
    
drumm’s picture

Finally did the initial deployment. In addition to #25, we also need to set the permissions on staging and export that Feature.

  • drumm committed 466c9f1 on 7.x-3.x, dev
    Issue #2461167: Export SA permissions
    
drumm’s picture

Security team members can now create and edit SA content

drumm’s picture

Issue summary: View changes

Moving #25 into the issue summary along with the additional work I found.

drumm’s picture

Issue summary: View changes

  • drumm committed 71d01d8 on 7.x-3.x
    Issue #2461167 by drumm, mlhess: Lists integration for SA content type
    
  • drumm committed e95f639 on 7.x-3.x
    Issue #2461167 by mlhess: Move SA Views into features and include new...
  • drumm committed ed173bd on 7.x-3.x
    Issue #2461167: Default SA author to Drupal Security Team
    
drumm’s picture

Issue summary: View changes

Deployed a few fixes today:

  • Default the author to Drupal Security team.
  • Add list module integration.
  • Add the new Views, and teaser field configuration.
  • Section navigation

  • drumm committed bd686f9 on 7.x-3.x, dev
    Issue #2461167: Teaser field configuration
    
drumm’s picture

Issue summary: View changes

I added the Contact & more info block.

  • drumm committed 904944c on 7.x-3.x, dev
    Issue #2461167: Add advisory ID token
    
drumm’s picture

Issue summary: View changes

The new content type is now in use: https://www.drupal.org/sa-contrib-2017-077

Updating the issue summary with some followups:

  • Human-readable URLs is done with the last commit, which also gives us a token for the SA ID, like “SA-CONTRIB-2017-077”. Some old SAs have a “DRUPAL-” prefix which I left off.
  • I moved the “Contact and more information” block from the bottom to the side.
  • The “Coordinated by” field is out of order. Some other styling changes are likely needed to make the page more readable.

The email did not go out, but that was due to mis-moderation. It will go out with tomorrow’s SAs.

drumm’s picture

Issue summary: View changes

The Coordinated by field is now the last field to be displayed.

  • drumm committed 25349fd on 7.x-3.x
    Issue #2461167: Reorder coordinated by field
    

  • drumm committed 442bbed on 7.x-3.x, dev
    Issue #2461167 by drumm, mlhess: Include security advisories in issue...
john morahan’s picture

I think the new content type is missing from the dashboard block view (http://cgit.drupalcode.org/drupalorg/tree/features/drupalorg_security_ad...)

  • drumm committed b327b43 on 7.x-3.x, dev
    Issue #2461167: Add SA content type to “All security advisories and...
drumm’s picture

Issue summary: View changes

John Morahan - thanks, that has been corrected now.

The new content type is being used with success. It is probably time to open followup issues for the remaining tasks and close this issue.

drumm’s picture

Status: Needs work » Fixed

Filed followup issues for the remaining to dos:
#2969694: Streamline SA publishing
#2969695: Migrate old security advisories to SA content type

Mission accomplished.

kattekrab’s picture

Thanks @drumm - nice work here.

Status: Fixed » Closed (fixed)

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