gitlab-secret_detection 0.6.1 → 0.7.1

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: cc8541d1251962126cc8a11d661098fbe0713e610f849b554a50ab5cfe546a99
4
- data.tar.gz: fc3eea2fbdbc233d0c8198a6cbf43c56d07d762777389f830422be26e90b714a
3
+ metadata.gz: 80258cb775e48f5eb82e756ae321928e7b705bc992729cfb354a65a7e2666027
4
+ data.tar.gz: bd8bcae492885fc6101c495196ee213b6690435f50cf75dd5942e1d0ad528be7
5
5
  SHA512:
6
- metadata.gz: e7c0872064c6c85526ed8fb1d75a5d4ce11bbdf53498db161be7cd6fb54bf4f25e37b798ddd5e38c73762519f9b0d87d63e322706af7349181c832277c435421
7
- data.tar.gz: 60b1d7ea4993b00cc2435bff4f0fae542d66c6ec2d1f58fafc47ce2850db0bb55c3a49b8b5e5fb9fa88fe277f941021792efc2892bd816109992438de6bfb888
6
+ metadata.gz: e0ad041ec8c3a4b3e783719f1bfa043f04dff1c0dc851d85dbacf57061ecbfe36c2383a17169367bf71703558c6ca15b6c80811128af01b889daed8ba5c1eb88
7
+ data.tar.gz: f3bb1f64115c4ace9850810faf59b923243c07c412227ce6dfe451e764841134ee8095fb631c598424aa8b00437dfa19653687518d80154df2c711d173b3051a
@@ -10,19 +10,20 @@ module Gitlab
10
10
  # file path where the secrets ruleset file is located
11
11
  RULESET_FILE_PATH = File.expand_path('gitleaks.toml', __dir__)
12
12
 
13
- def initialize(path: RULESET_FILE_PATH)
13
+ def initialize(path: RULESET_FILE_PATH, logger: Logger.new($stdout))
14
14
  @path = path
15
+ @logger = logger
15
16
  end
16
17
 
17
18
  def rules(force_fetch: false)
18
19
  return @rule_data unless @rule_data.nil? || force_fetch
19
20
 
20
- @rule_data ||= parse_ruleset
21
+ @rule_data = parse_ruleset
21
22
  end
22
23
 
23
24
  private
24
25
 
25
- attr_reader :path
26
+ attr_reader :path, :logger
26
27
 
27
28
  # parses given ruleset file and returns the parsed rules
28
29
  def parse_ruleset
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: gitlab-secret_detection
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.6.1
4
+ version: 0.7.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - group::secret detection
@@ -10,7 +10,7 @@ authors:
10
10
  autorequire:
11
11
  bindir: bin
12
12
  cert_chain: []
13
- date: 2024-10-08 00:00:00.000000000 Z
13
+ date: 2024-10-09 00:00:00.000000000 Z
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
16
16
  name: grpc