Class: Gitlab::SecretDetection::Core::Ruleset
- Inherits:
-
Object
- Object
- Gitlab::SecretDetection::Core::Ruleset
- Defined in:
- lib/gitlab/secret_detection/core/ruleset.rb
Constant Summary collapse
- RULESET_FILE_PATH =
file path where the secrets ruleset file is located
File.('gitleaks.toml', __dir__)
Instance Method Summary collapse
-
#initialize(path: RULESET_FILE_PATH) ⇒ Ruleset
constructor
A new instance of Ruleset.
- #rules(force_fetch: false) ⇒ Object
Constructor Details
#initialize(path: RULESET_FILE_PATH) ⇒ Ruleset
Returns a new instance of Ruleset.
13 14 15 |
# File 'lib/gitlab/secret_detection/core/ruleset.rb', line 13 def initialize(path: RULESET_FILE_PATH) @path = path end |
Instance Method Details
#rules(force_fetch: false) ⇒ Object
17 18 19 20 21 |
# File 'lib/gitlab/secret_detection/core/ruleset.rb', line 17 def rules(force_fetch: false) return @rule_data unless @rule_data.nil? || force_fetch @rule_data ||= parse_ruleset end |