Skip to content

Instantly share code, notes, and snippets.

@gabesullice
Created February 11, 2015 20:11
Show Gist options
  • Save gabesullice/67e25008ad0b258ad46f to your computer and use it in GitHub Desktop.
Save gabesullice/67e25008ad0b258ad46f to your computer and use it in GitHub Desktop.
Drupal Security Review Script
#!/bin/bash
drush dl drupalgeddon -y; drush dl site_audit --dev -y; drush dl hacked --dev -y; drush en hacked -y; drush en security_review -y
mkdir secreview
drush aa --html --bootstrap --detail --skip=insights > ./secreview/report.html
drush hacked-list-projects --force-rebuild | tee ./secreview/hacked.txt
cat ./secreview/hacked.txt | grep '\s.hanged' | grep -v 'Status' | sed 's/\s\s\+/|/g' | awk -F '|' '{print $2}' | xargs -I{} sh -c "drush hacked-diff '{}' > './secreview/hacked.{}.patch'"
@gabesullice
Copy link
Author

Requirements

  • Drupal Installation
  • Drush
  • *nix environment

Usage

Place the script in your Drupal root ('next' to index.php)
Run ./secreview.sh

Output Files

  • secreview/report.html
  • secreview/hacked.txt
  • secreview/hacked.{module}.patch # This is a diff of each hacked module, if any

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment