Drush command does not display checks anymore

Created on 15 July 2024, 6 months ago
Updated 18 September 2024, 4 months ago

Problem/Motivation

With 2.0.2, we had something like this:

 ------------------------------------------------------------------ --------- 
  Message                                                            Status   
 ------------------------------------------------------------------ --------- 
  Only safe extensions are allowed for uploaded files and images.    success  
  Dangerous tags were not found in any submitted content (fields).   success  
  Untrusted roles do not have administrative or trusted Drupal       success  
  permissions.                                                                
  Error reporting set to log only.                                   success  
  PHP files in the Drupal files directory cannot be executed.        success  
  Drupal installation files and directories (except required) are    success  
  not writable by the server.                                                 
  Cron has ran within the last 3 days.                               success  
  Private files directory is outside the web server root.            success  
  No sensitive temporary files were found.                           success  
  Untrusted users are not allowed to input dangerous HTML tags.      success  
  Trusted hosts are set.                                             success  
  No users, with matching username and password, found.              success  
  Vendor directory is outside webroot.                               success  
  Views are access controlled.                                       success  
 ------------------------------------------------------------------ --------- 

With 3.0.2, we now have this:

 --------- -------- 
  Message   Status  
 --------- -------- 

Steps to reproduce

drush security:review --results --store

Proposed resolution

$results seems to never be filled when $last_run is false.
It looks like $this->securityReviewService->runChecks() used to return results and now it does not.
Also Check::lastResult() now returns an array and not a CheckResult object so SecurityReviewCommands::formatResults() will need to be rewritten.

πŸ› Bug report
Status

Needs review

Version

3.0

Component

Code

Created by

πŸ‡«πŸ‡·France prudloff Lille

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

Merge Requests

Comments & Activities

Production build 0.71.5 2024