Skip to content

Commit

Permalink
Add - separator obfuscation
Browse files Browse the repository at this point in the history
  • Loading branch information
lloeki committed Aug 10, 2023
1 parent 995e62e commit c9451b7
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 9 deletions.
18 changes: 9 additions & 9 deletions lib/datadog/tracing/contrib/utils/quantization/http.rb
Original file line number Diff line number Diff line change
Expand Up @@ -134,18 +134,18 @@ def obfuscate_query(query, options = {})
(?:"|%22)?
)
(?: # common keys
(?:old_?|new_?)?p(?:ass)?w(?:or)?d(?:1|2)? # pw, password variants
|pass(?:_?phrase)? # pass, passphrase variants
(?:old[-_]?|new_?)?p(?:ass)?w(?:or)?d(?:1|2)? # pw, password variants
|pass(?:[-_]?phrase)? # pass, passphrase variants
|secret
|(?: # key, key_id variants
api_?
|private_?
|public_?
|access_?
|secret_?
)key(?:_?id)?
api[-_]?
|private[-_]?
|public[-_]?
|access[-_]?
|secret[-_]?
)key(?:[-_]?id)?
|token
|consumer_?(?:id|key|secret)
|consumer[-_]?(?:id|key|secret)
|sign(?:ed|ature)?
|auth(?:entication|orization)?
)
Expand Down
10 changes: 10 additions & 0 deletions spec/datadog/tracing/contrib/utils/quantization/http_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -496,13 +496,23 @@
public_key_id
access_key_id
secret_key_id
api-key
api-key-id
private-key
private-key-id
public-key-id
access-key-id
secret-key-id
token
consumerid
consumerkey
consumersecret
consumer_id
consumer_key
consumer_secret
consumer-id
consumer-key
consumer-secret
sign
signed
signature
Expand Down

0 comments on commit c9451b7

Please sign in to comment.