enlightn.php 5.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137
  1. <?php
  2. return [
  3. /*
  4. |--------------------------------------------------------------------------
  5. | Enlightn Analyzer Classes
  6. |--------------------------------------------------------------------------
  7. |
  8. | The following array lists the "analyzer" classes that will be registered
  9. | with Enlightn. These analyzers run an analysis on the application via
  10. | various methods such as static analysis. Feel free to customize it.
  11. |
  12. */
  13. 'analyzers' => ['*'],
  14. // If you wish to skip running some analyzers, list the classes in the array below.
  15. 'exclude_analyzers' => [],
  16. /*
  17. |--------------------------------------------------------------------------
  18. | Enlightn Analyzer Paths
  19. |--------------------------------------------------------------------------
  20. |
  21. | The following array lists the "analyzer" paths that will be searched
  22. | recursively to find analyzer classes. This option will only be used
  23. | if the analyzers option above is set to the asterisk wildcard. The
  24. | key is the base namespace to resolve the class name.
  25. |
  26. */
  27. 'analyzer_paths' => [
  28. 'Enlightn\\Enlightn\\Analyzers' => base_path('vendor/enlightn/enlightn/src/Analyzers'),
  29. 'Enlightn\\EnlightnPro\\Analyzers' => base_path('vendor/enlightn/enlightnpro/src/Analyzers'),
  30. ],
  31. /*
  32. |--------------------------------------------------------------------------
  33. | Enlightn Base Path
  34. |--------------------------------------------------------------------------
  35. |
  36. | The following array lists the directories that will be scanned for
  37. | application specific code. By default, we are scanning your app
  38. | folder, migrations folder and the seeders folder.
  39. |
  40. */
  41. 'base_path' => [
  42. app_path(),
  43. database_path('migrations'),
  44. database_path('seeders'),
  45. ],
  46. /*
  47. |--------------------------------------------------------------------------
  48. | Environment Specific Analyzers
  49. |--------------------------------------------------------------------------
  50. |
  51. | There are some analyzers that are meant to be run for specific environments.
  52. | The options below specify whether we should skip environment specific
  53. | analyzers if the environment does not match.
  54. |
  55. */
  56. 'skip_env_specific' => env('ENLIGHTN_SKIP_ENVIRONMENT_SPECIFIC', false),
  57. /*
  58. |--------------------------------------------------------------------------
  59. | Guest URL
  60. |--------------------------------------------------------------------------
  61. |
  62. | Specify any guest url or path (preferably your app's login url) here. This
  63. | would be used by Enlightn to inspect your application HTTP headers.
  64. | Example: '/login'.
  65. |
  66. */
  67. 'guest_url' => null,
  68. /*
  69. |--------------------------------------------------------------------------
  70. | Exclusions From Reporting
  71. |--------------------------------------------------------------------------
  72. |
  73. | Specify the analyzer classes that you wish to exclude from reporting. This
  74. | means that if any of these analyzers fail, they will not be counted
  75. | towards the exit status of the Enlightn command. This is useful
  76. | if you wish to run the command in your CI/CD pipeline.
  77. | Example: [\Enlightn\Enlightn\Analyzers\Security\XSSAnalyzer::class].
  78. |
  79. */
  80. 'dont_report' => [],
  81. /*
  82. |--------------------------------------------------------------------------
  83. | Analyzer Configurations
  84. |--------------------------------------------------------------------------
  85. |
  86. | The following configuration options pertain to individual analyzers.
  87. | These are recommended options but feel free to customize them based
  88. | on your application needs.
  89. |
  90. */
  91. 'license_whitelist' => [
  92. 'Apache-2.0', 'Apache2', 'BSD-2-Clause', 'BSD-3-Clause', 'LGPL-2.1-only', 'LGPL-2.1',
  93. 'LGPL-2.1-or-later', 'LGPL-3.0', 'LGPL-3.0-only', 'LGPL-3.0-or-later', 'MIT', 'ISC',
  94. 'CC0-1.0', 'Unlicense',
  95. ],
  96. // Set to true to restrict the max number of files displayed in the enlightn
  97. // command for each check. Set to false to display all files.
  98. 'compact_lines' => true,
  99. // List your commercial packages (licensed by you) below, so that they are not
  100. // flagged by the License Analyzer.
  101. 'commercial_packages' => [
  102. 'enlightn/enlightnpro',
  103. ],
  104. 'allowed_permissions' => [
  105. base_path() => '775',
  106. app_path() => '775',
  107. resource_path() => '775',
  108. storage_path() => '775',
  109. public_path() => '775',
  110. config_path() => '775',
  111. database_path() => '775',
  112. base_path('routes') => '775',
  113. app()->bootstrapPath() => '775',
  114. app()->bootstrapPath('cache') => '775',
  115. app()->bootstrapPath('app.php') => '664',
  116. base_path('artisan') => '775',
  117. public_path('index.php') => '664',
  118. public_path('server.php') => '664',
  119. ],
  120. 'writable_directories' => [
  121. storage_path(),
  122. app()->bootstrapPath('cache'),
  123. ],
  124. ];