API.txt

  1. cis7 sites/all/modules/ulmus/context/API.txt
  2. cis7 sites/all/modules/ulmus/ctools/API.txt
  3. cis7 sites/all/modules/ulmus/pathauto/API.txt
  4. cis7 sites/all/modules/ulmus/media/API.txt
  5. cis7 sites/all/modules/ulmus/features/API.txt
  6. cis7 sites/all/modules/elmsln_contrib/nodereference_highlight/API.txt
  7. cis7 sites/all/modules/elmsln_contrib/outline_designer/API.txt
  8. cis7 sites/all/modules/ulmus/security_review/API.txt
  9. cis7 sites/all/modules/ulmus/aes/API.txt
  10. cle7 sites/all/modules/ulmus/pathauto/API.txt
  11. cle7 sites/all/modules/ulmus/context/API.txt
  12. cle7 sites/all/modules/ulmus/aes/API.txt
  13. cle7 sites/all/modules/ulmus/media/API.txt
  14. cle7 sites/all/modules/ulmus/security_review/API.txt
  15. cle7 sites/all/modules/ulmus/ctools/API.txt
  16. cle7 sites/all/modules/ulmus/features/API.txt
  17. cle7 sites/all/modules/elmsln_contrib/outline_designer/API.txt
  18. cle7 sites/all/modules/local_contrib/votingapi/API.txt
  19. cle7 sites/all/modules/elmsln_contrib/nodereference_highlight/API.txt
  20. ecd7 sites/all/modules/elmsln_contrib/outline_designer/API.txt
  21. ecd7 sites/all/modules/ulmus/pathauto/API.txt
  22. ecd7 sites/all/modules/ulmus/aes/API.txt
  23. ecd7 sites/all/modules/elmsln_contrib/nodereference_highlight/API.txt
  24. ecd7 sites/all/modules/ulmus/context/API.txt
  25. ecd7 sites/all/modules/ulmus/features/API.txt
  26. ecd7 sites/all/modules/ulmus/security_review/API.txt
  27. ecd7 sites/all/modules/ulmus/ctools/API.txt
  28. ecd7 sites/all/modules/ulmus/media/API.txt
  29. elmsmedia7 sites/all/modules/ulmus/aes/API.txt
  30. elmsmedia7 sites/all/modules/ulmus/security_review/API.txt
  31. elmsmedia7 sites/all/modules/elmsln_contrib/nodereference_highlight/API.txt
  32. elmsmedia7 sites/all/modules/ulmus/ctools/API.txt
  33. elmsmedia7 sites/all/modules/elmsln_contrib/outline_designer/API.txt
  34. elmsmedia7 sites/all/modules/ulmus/pathauto/API.txt
  35. elmsmedia7 sites/all/modules/ulmus/context/API.txt
  36. elmsmedia7 sites/all/modules/ulmus/media/API.txt
  37. elmsmedia7 sites/all/modules/ulmus/features/API.txt
  38. harmony7 sites/all/modules/ulmus/aes/API.txt
  39. harmony7 sites/all/modules/ulmus/context/API.txt
  40. harmony7 sites/all/modules/ulmus/ctools/API.txt
  41. harmony7 sites/all/modules/ulmus/security_review/API.txt
  42. harmony7 sites/all/modules/ulmus/features/API.txt
  43. harmony7 sites/all/modules/elmsln_contrib/outline_designer/API.txt
  44. harmony7 sites/all/modules/elmsln_contrib/nodereference_highlight/API.txt
  45. harmony7 sites/all/modules/ulmus/media/API.txt
  46. harmony7 sites/all/modules/ulmus/pathauto/API.txt
  47. icor7 sites/all/modules/ulmus/context/API.txt
  48. icor7 sites/all/modules/ulmus/media/API.txt
  49. icor7 sites/all/modules/ulmus/pathauto/API.txt
  50. icor7 sites/all/modules/elmsln_contrib/nodereference_highlight/API.txt
  51. icor7 sites/all/modules/elmsln_contrib/outline_designer/API.txt
  52. icor7 sites/all/modules/ulmus/features/API.txt
  53. icor7 sites/all/modules/ulmus/ctools/API.txt
  54. icor7 sites/all/modules/ulmus/security_review/API.txt
  55. icor7 sites/all/modules/ulmus/aes/API.txt
  56. meedjum_blog7 sites/all/modules/ulmus/context/API.txt
  57. meedjum_blog7 sites/all/modules/ulmus/ctools/API.txt
  58. meedjum_blog7 sites/all/modules/elmsln_contrib/nodereference_highlight/API.txt
  59. meedjum_blog7 sites/all/modules/ulmus/pathauto/API.txt
  60. meedjum_blog7 sites/all/modules/ulmus/features/API.txt
  61. meedjum_blog7 sites/all/modules/elmsln_contrib/outline_designer/API.txt
  62. meedjum_blog7 sites/all/modules/ulmus/aes/API.txt
  63. meedjum_blog7 sites/all/modules/ulmus/security_review/API.txt
  64. meedjum_blog7 sites/all/modules/ulmus/media/API.txt
  65. mooc7 sites/all/modules/elmsln_contrib/nodereference_highlight/API.txt
  66. mooc7 sites/all/modules/ulmus/context/API.txt
  67. mooc7 sites/all/modules/ulmus/ctools/API.txt
  68. mooc7 sites/all/modules/elmsln_contrib/outline_designer/API.txt
  69. mooc7 sites/all/modules/ulmus/pathauto/API.txt
  70. mooc7 sites/all/modules/ulmus/media/API.txt
  71. mooc7 sites/all/modules/ulmus/security_review/API.txt
  72. mooc7 sites/all/modules/ulmus/features/API.txt
  73. mooc7 sites/all/modules/ulmus/aes/API.txt
## Security Review API

* hook_security_checks() and check returns
* Check help
* Standalone use of the checklist
* Drush

### hook_security_checks()

Checks returned from an implementation of hook_security_checks() look like the
following.

array(
  $namespace => array(
    $check_name => array(
     'title' => 'Simple title of this check',
     'callback' => 'function to invoke for check, see section on check returns',
     'success' => 'One-line description of a successful check',
     'failure' => 'One-line description of a failed check listing what the risk is',
    )
  )
)

The top level index is often the module name. Each check name (not title) should
attempt to be unique.

### Check return values

A check can return a boolean or NULL. A return value of TRUE means the check
passed and the 'success' description will be used. FALSE means failure. A return
value of NULL is used in case the check can not run for any reason, an example
being if a dependency is nesecessary to run the check and that depenency is not
met.

### Check help

Implement $callback . '_help' to provide help for a check.

Help functions should return an array like so:

array(
  'title' => '',
  'descriptions' => array('Check descriptions', 'Link off to something'),
  'findings' => array(
    'descriptions' => array('Descriptions of findings'),
    'items' => array('Specific findings'),
  )
)

Consult security_review.help.inc for details.

## Standalone use of the checklist

The Security Review module need not be installed to use the checklist, though
no logging, UI, or check result storage will be available.

To run the checklist include the following code in your own module.

  include_once('security_review.inc');
  $checklist = security_review_get_checklist();
  $checklist_results = security_review_run($checklist);

Note that the some checks may take long to complete, so it is advised that you
plan accordingly or unset those checks.

## Drush

Run the checklist via Drush with the following command

drush security-review

Consult the Drush help on the security-review command for more information.

You can also run the drush command without installing the module so long as the
the security_review.drush.inc and security_review.inc files can be found by
drush. For instance you could place these files in your ~/.drush/ directory.

File

sites/all/modules/ulmus/security_review/API.txt
View source
  1. ## Security Review API
  2. * hook_security_checks() and check returns
  3. * Check help
  4. * Standalone use of the checklist
  5. * Drush
  6. ### hook_security_checks()
  7. Checks returned from an implementation of hook_security_checks() look like the
  8. following.
  9. array(
  10. $namespace => array(
  11. $check_name => array(
  12. 'title' => 'Simple title of this check',
  13. 'callback' => 'function to invoke for check, see section on check returns',
  14. 'success' => 'One-line description of a successful check',
  15. 'failure' => 'One-line description of a failed check listing what the risk is',
  16. )
  17. )
  18. )
  19. The top level index is often the module name. Each check name (not title) should
  20. attempt to be unique.
  21. ### Check return values
  22. A check can return a boolean or NULL. A return value of TRUE means the check
  23. passed and the 'success' description will be used. FALSE means failure. A return
  24. value of NULL is used in case the check can not run for any reason, an example
  25. being if a dependency is nesecessary to run the check and that depenency is not
  26. met.
  27. ### Check help
  28. Implement $callback . '_help' to provide help for a check.
  29. Help functions should return an array like so:
  30. array(
  31. 'title' => '',
  32. 'descriptions' => array('Check descriptions', 'Link off to something'),
  33. 'findings' => array(
  34. 'descriptions' => array('Descriptions of findings'),
  35. 'items' => array('Specific findings'),
  36. )
  37. )
  38. Consult security_review.help.inc for details.
  39. ## Standalone use of the checklist
  40. The Security Review module need not be installed to use the checklist, though
  41. no logging, UI, or check result storage will be available.
  42. To run the checklist include the following code in your own module.
  43. include_once('security_review.inc');
  44. $checklist = security_review_get_checklist();
  45. $checklist_results = security_review_run($checklist);
  46. Note that the some checks may take long to complete, so it is advised that you
  47. plan accordingly or unset those checks.
  48. ## Drush
  49. Run the checklist via Drush with the following command
  50. drush security-review
  51. Consult the Drush help on the security-review command for more information.
  52. You can also run the drush command without installing the module so long as the
  53. the security_review.drush.inc and security_review.inc files can be found by
  54. drush. For instance you could place these files in your ~/.drush/ directory.