You are here

function security_review_drush_command in Security Review 7

Same name and namespace in other branches
  1. 8 security_review.drush.inc \security_review_drush_command()
  2. 6 security_review.drush.inc \security_review_drush_command()

Implementation of hook_drush_command().

File

./security_review.drush.inc, line 13
Drush commands for Security Review module.

Code

function security_review_drush_command() {
  $items = array();
  $items['security-review'] = array(
    'callback' => 'security_review_drush',
    'aliases' => array(
      'secrev',
    ),
    'description' => "Run the Security Review checklist",
    'options' => array(
      'store' => 'Write results to the database',
      'log' => 'Log results of each check to watchdog, defaults to off',
      'lastrun' => 'Do not run the checklist, just print last results',
      'check' => 'Comma-separated list of specified checks to run. See README.txt for list of options',
      'skip' => 'Invert behavior of --check. Run all checks except specified checks',
      'short' => "Short result messages instead of full description (e.g. 'Text formats').",
      'results' => 'Show the incorrect settings for failed checks.',
    ),
    'examples' => array(
      'secrev' => 'Run the checklist and output the results',
      'secrev --store' => 'Run the checklist, store, and output the results',
      'secrev --lastrun' => 'Output the stored results from the last run of the checklist',
    ),
    'outputformat' => array(
      'default' => 'table',
      'pipe-format' => 'csv',
      'fields-default' => array(
        'message',
        'status',
      ),
      'field-labels' => array(
        'message' => 'Message',
        'status' => 'Status',
        'findings' => 'Findings',
      ),
      'output-data-type' => 'format-table',
    ),
  );
  $items['password-check-setup'] = array(
    'callback' => 'security_review_drush_hash_setup',
    'aliases' => array(
      'passset',
    ),
    'description' => "Create and load a rainbow table for password checking",
  );
  return $items;
}