ez_logs_agent 0.2.6 → 0.2.7

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: fc81bfb79b166bf77602962e079eb952e354afb5387670fc420720bcf4d84b87
4
- data.tar.gz: cf1046d8364ecf9457c41ba528aa52958da1e599bac9594b6fd83b9674e24945
3
+ metadata.gz: 127f00c0f4b900c61621019d7ecc417addf5d9f7a81e9eea62a062dedff70662
4
+ data.tar.gz: 1ea5eb51af9d1c9b74ce05501fb1b29133d0c9b549d65ff4871f53d29009c0ef
5
5
  SHA512:
6
- metadata.gz: 63a45fcad8cb31a31f5b3d6e63abcb497ee4567181dde74a057c215737a5716100c071beb60e1cfdd6a4645fa87ea15c09b76a0cdc038a13ab8c45a1adebd9ca
7
- data.tar.gz: a8acce72fd755c07997384e712bf5f7dcc450de69061db006b381690b100eb21c1e5b3dd5b587bd53292ac673e63c2e76b8d84248d11ea232042465ab558cd24
6
+ metadata.gz: 98668691cbe0fa82fdb48361e002fcc8453bc62a360d215d240b0a7328a8d8e27d32a4d0bf9da589e4fc958b48dd89b95d55951a4f71a14a062c1ac09e05acd1
7
+ data.tar.gz: 69f0e8e4f225a8791c5a21265014cf8a0c802f30116bca1d8285356958168edac93702972e6e19663522da1370eed8c71737efc7e1bcbe4764eab5acffa2503b
data/CHANGELOG.md CHANGED
@@ -2,6 +2,11 @@
2
2
 
3
3
  All notable changes to this project will be documented in this file.
4
4
 
5
+ ## [0.2.7] — 2026-11-19
6
+
7
+ ### Changed
8
+ - **More secret names are hidden.** `pin`, `otp`, `totp`, `iban`, `mfa` and `passphrase` are matched as whole words (so `pin_code` and `mdmUnlockPin`, never `shipping`), the same list as the Next.js agent. camelCase and dashed names match like their snake_case form: `apiKey`, `api-key`, `creditCard`, `cardNumber` are hidden (they were not).
9
+
5
10
  ## [0.2.6] — 2026-11-18
6
11
 
7
12
  ### Added
@@ -37,6 +37,11 @@ module EzLogsAgent
37
37
  credit_card card_number cvv cvc
38
38
  ].freeze
39
39
 
40
+ # Short secret names matched only as a WHOLE word of the key (split on non-letters and
41
+ # camelCase), so `pin` matches `pin`, `pinCode`, `mdm_unlock_pin` but never `shipping`.
42
+ # Same list as the Next.js agent's SENSITIVE_WORD_PATTERNS.
43
+ WORD_PATTERNS = %w[pin otp totp iban mfa passphrase].freeze
44
+
40
45
  module_function
41
46
 
42
47
  # @param key [String, Symbol, nil]
@@ -46,10 +51,16 @@ module EzLogsAgent
46
51
  return false if key.nil?
47
52
 
48
53
  key_lower = key.to_s.downcase
49
- return true if PATTERNS.any? { |pattern| key_lower.include?(pattern) }
54
+ words = key.to_s.gsub(/([a-z0-9])([A-Z])/, '\1_\2').downcase.split(/[^a-z0-9]+/)
55
+ return true if WORD_PATTERNS.intersect?(words)
56
+
57
+ # Substring patterns, on the key as written and on its words joined with "_" (so `apiKey`
58
+ # and `api-key` match `api_key` too): only ever more matches than the key alone.
59
+ joined = words.join("_")
60
+ return true if PATTERNS.any? { |pattern| key_lower.include?(pattern) || joined.include?(pattern) }
50
61
 
51
62
  user_patterns = user_patterns_cache
52
- user_patterns.any? { |pattern| key_lower.include?(pattern) }
63
+ user_patterns.any? { |pattern| key_lower.include?(pattern) || joined.include?(pattern) }
53
64
  rescue StandardError
54
65
  # Defensive: if configuration access raises, treat as sensitive.
55
66
  # Better to over-mask than to leak.
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module EzLogsAgent
4
- VERSION = "0.2.6"
4
+ VERSION = "0.2.7"
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: ez_logs_agent
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.6
4
+ version: 0.2.7
5
5
  platform: ruby
6
6
  authors:
7
7
  - dezsirazvan