Created
February 11, 2015 20:11
-
-
Save gabesullice/67e25008ad0b258ad46f to your computer and use it in GitHub Desktop.
Drupal Security Review Script
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/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'" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Requirements
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