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 +4 -4
- data/CHANGELOG.md +5 -0
- data/lib/ez_logs_agent/sensitive_patterns.rb +13 -2
- data/lib/ez_logs_agent/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 127f00c0f4b900c61621019d7ecc417addf5d9f7a81e9eea62a062dedff70662
|
|
4
|
+
data.tar.gz: 1ea5eb51af9d1c9b74ce05501fb1b29133d0c9b549d65ff4871f53d29009c0ef
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
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
|
-
|
|
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.
|