Problem/Motivation

With #3265096: Move issues from www.drupal.org to git.drupalcode.org, we also will want to move security issues elsewhere. That will eventually lead to sunsetting security.drupal.org

https://security.drupal.org/riskcalc is something we’ll want to keep. Drupal.org already has the risk levels in code for rendering security advisories, so this will get us down to a single data structure documenting the risk levels.

Proposed resolution

Build a CTools content type for the UI so it can be embedded on a page via Panelizer.

Issue fork drupalorg-3432830

Command icon Show commands

Start within a Git clone of the project using the version control instructions.

Or, if you do not have SSH keys set up on git.drupalcode.org:

Comments

drumm created an issue. See original summary.

  • drumm committed e9449376 on 7.x-3.x
    Issue #3432830: Refactor security risk level information into a single...

  • drumm committed e9449376 on dcp-updates-mktplace-changes
    Issue #3432830: Refactor security risk level information into a single...

fjgarlin made their first commit to this issue’s fork.

fjgarlin’s picture

Status: Active » Needs review

Thanks to the refactoring made in #2, this was pretty simple to implement.

MR: https://git.drupalcode.org/project/drupalorg/-/merge_requests/248/diffs
Test URL: https://fjgarlin-drupal.dev.devdrupal.org/riskcal

Needs review.

drumm’s picture

I think we’ll actually want this in a CTools content type so the pane can be placed on a page with navigation/etc. I stubbed this out in the 3432830-risk-calculator branch. Since the text can go in another pane, the intro text can be omitted.

fjgarlin’s picture

For now, I added your suggestion but also left the separated page, in case we want to mimic https://security.drupal.org/riskcalc. As everything is encapsulated in a form, we can reuse it as we need.

Thanks for the starting point on the other branch. I added the logic to the existing MR.
I went to the panelizar configuration page (/admin/structure/types/manage/page/panelizer) and enabled "Security risk calculator" in "Allow other content".

The styling will depend on which page and section it goes in. I added it here as an example https://fjgarlin-drupal.dev.devdrupal.org/developers
But I needed to add something like this in Bluecheese:

.pane-security-risk-calculator {
  text-align: left;
  .pane-content {
    margin-left: auto;
    margin-right: auto;
    max-width: calc(960px + 8vw);
    padding: 2em 4vw;
  }
}

I haven't created the bluecheese issue because I want to know what the requirements for the styling are.

drumm’s picture

This is going on a documentation page, so no theming needed.

drumm’s picture

Status: Needs review » Fixed

This is all deployed now: https://www.drupal.org/riskcalc

fjgarlin’s picture

Do we want to have a redirect from https://security.drupal.org/riskcalc to https://www.drupal.org/riskcalc to avoid duplication?

drumm’s picture

Once a few security team members have used and approved of the new page, yes. Opened a followup for that: #3441843: Remove riskcalc, replaced with www.drupal.org

Status: Fixed » Closed (fixed)

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