Class: Rails::Guarddog::Checkers::BaseChecker
- Inherits:
-
Object
- Object
- Rails::Guarddog::Checkers::BaseChecker
- Defined in:
- lib/rails/guarddog/checkers/base_checker.rb
Direct Known Subclasses
AiInjectionChecker, CsrfChecker, DependencyChecker, DosChecker, GraphqlChecker, IdorChecker, MassAssignmentChecker, OpenRedirectChecker, RateLimitChecker, SecretsChecker, SqlInjectionChecker, XssChecker
Instance Attribute Summary collapse
-
#findings ⇒ Object
Returns the value of attribute findings.
Instance Method Summary collapse
-
#initialize(configuration = nil) ⇒ BaseChecker
constructor
A new instance of BaseChecker.
- #run ⇒ Object
Constructor Details
#initialize(configuration = nil) ⇒ BaseChecker
Returns a new instance of BaseChecker.
7 8 9 10 11 12 13 14 15 16 17 |
# File 'lib/rails/guarddog/checkers/base_checker.rb', line 7 def initialize(configuration = nil) if configuration.is_a?(Configuration) @configuration = configuration @root = configuration.root else # Backwards-compatibility: a plain root string was passed @root = configuration || Rails.root.to_s @configuration = nil end @findings = [] end |
Instance Attribute Details
#findings ⇒ Object
Returns the value of attribute findings.
5 6 7 |
# File 'lib/rails/guarddog/checkers/base_checker.rb', line 5 def findings @findings end |
Instance Method Details
#run ⇒ Object
19 20 21 |
# File 'lib/rails/guarddog/checkers/base_checker.rb', line 19 def run raise NotImplementedError, "Subclasses must implement run" end |