You are here

function securitytxt_help in Security.txt 7

Same name and namespace in other branches
  1. 8 securitytxt.module \securitytxt_help()

Implements hook_help().

See also

https://api.drupal.org/api/drupal/modules%21system%21system.api.php/func...

File

./securitytxt.module, line 15
Module which implements the security.txt standard for drupal.

Code

function securitytxt_help($path, $arg) {
  switch ($path) {
    case 'admin/help#securitytxt':
      $output = '';
      $output .= '<h3>' . t('About') . '</h3>';
      $output .= '<p>' . t('The Security.txt module provides an implementation of the new <a href="@site">Security.txt standard</a> which is currently a <a href="@rfc">draft RFC</a>. The purpose is to allow people to easily get in touch to report security issues.', array(
        '@site' => 'https://securitytxt.org',
        '@rfc' => 'https://tools.ietf.org/html/draft-foudil-securitytxt-02',
      )) . '</p>';
      $output .= '<h3>' . t('Uses') . '</h3>';
      $output .= '<dl>';
      $output .= '<dt>' . t('Configuring and signing security.txt') . '</dt>';
      $output .= '<dd>' . t('The Security.txt module provides pages for <a href="@configure">configuring</a> and <a href="@sign">signing</a> a security.txt file. A user must have the <a href="@permission">\'Administer security.txt\' permission</a> to access these administration pages.', array(
        '@configure' => url('admin/config/system/securitytxt'),
        '@sign' => url('admin/config/system/securitytxt/sign'),
        '@permission' => url('admin/people/permissions', array(
          'fragment' => 'module-securitytxt',
        )),
      )) . '</dd>';
      $output .= '<dt>' . t('Viewing security.txt and security.txt.sig') . '</dt>';
      $output .= '<dd>' . t('The Security.txt module, when correctly configured, provides the /.well-known/security.txt and /.well-known/security.txt.sig paths to users with the <a href="@permission">\'View security.txt\' permission</a>. <strong>You will almost certinaly want to grant this permission to both the Anonymous and Authenticated user roles.</strong>', array(
        '@permission' => url('admin/people/permissions', array(
          'fragment' => 'module-securitytxt',
        )),
      )) . '</dd>';
      $output .= '</dl>';
      return $output;
    case 'admin/config/system/securitytxt':
      return '<p>' . t('A security.txt file provides a standard way for people to find out how to report security issues with your site. The new <a href="@site">Security.txt standard</a> is currently a <a href="@rfc">draft RFC</a>.', array(
        '@site' => 'https://securitytxt.org',
        '@rfc' => 'https://tools.ietf.org/html/draft-foudil-securitytxt-02',
      )) . '</p>';
    case 'admin/config/system/securitytxt/sign':
      return '<p>' . t('In order to ensure the authenticity of your security.txt file, you should provide a signature.') . '</p>';
  }
}