Class: Contrast::Components::Assess::Interface
- Includes:
- ComponentBase, Interface
- Defined in:
- lib/contrast/components/assess.rb
Overview
A wrapper build around the Common Agent Configuration project to allow for access of the values contained in its parent_configuration_spec.yaml. Specifically, this allows for querying the state of the Assess product.
Instance Method Summary collapse
- #enabled? ⇒ Boolean
- #forcibly_disabled? ⇒ Boolean
- #require_scan? ⇒ Boolean
- #rule_disabled?(name) ⇒ Boolean
- #rules ⇒ Object
- #scan_response? ⇒ Boolean
- #tags ⇒ Object
- #tainted_columns ⇒ Object
- #track_frozen_sources? ⇒ Boolean
Methods included from Interface
Methods included from ComponentBase
Instance Method Details
#enabled? ⇒ Boolean
17 18 19 20 21 22 23 |
# File 'lib/contrast/components/assess.rb', line 17 def enabled? # config overrides if forcibly set return false if forcibly_disabled? return true if forcibly_enabled? SETTINGS.assess_enabled? end |
#forcibly_disabled? ⇒ Boolean
29 30 31 32 |
# File 'lib/contrast/components/assess.rb', line 29 def forcibly_disabled? @_forcibly_disabled = false?(CONFIG.root.assess.enable) if @_forcibly_disabled.nil? @_forcibly_disabled end |
#require_scan? ⇒ Boolean
48 49 50 51 |
# File 'lib/contrast/components/assess.rb', line 48 def require_scan? @_require_scan = !false?(CONFIG.root.agent.ruby.require_scan) if @_require_scan.nil? @_require_scan end |
#rule_disabled?(name) ⇒ Boolean
34 35 36 |
# File 'lib/contrast/components/assess.rb', line 34 def rule_disabled? name disabled_rules.include?(name) end |
#rules ⇒ Object
57 58 59 |
# File 'lib/contrast/components/assess.rb', line 57 def rules SETTINGS.assess_rules end |
#scan_response? ⇒ Boolean
38 39 40 41 |
# File 'lib/contrast/components/assess.rb', line 38 def scan_response? @_scan_response = !false?(CONFIG.root.assess.enable_scan_response) if @_scan_response.nil? @_scan_response end |
#tags ⇒ Object
53 54 55 |
# File 'lib/contrast/components/assess.rb', line 53 def CONFIG.root.assess&. end |
#tainted_columns ⇒ Object
25 26 27 |
# File 'lib/contrast/components/assess.rb', line 25 def tainted_columns SETTINGS.tainted_columns end |
#track_frozen_sources? ⇒ Boolean
43 44 45 46 |
# File 'lib/contrast/components/assess.rb', line 43 def track_frozen_sources? @_track_frozen_sources = !false?(CONFIG.root.agent.ruby.track_frozen_sources) if @_track_frozen_sources.nil? @_track_frozen_sources end |