Skip to content

Commit

Permalink
added secret length to every secret attributes
Browse files Browse the repository at this point in the history
  • Loading branch information
dryoni committed Aug 8, 2020
1 parent a0c1d30 commit 91226b4
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions detect_secrets/core/potential_secret.py
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,7 @@ def __init__(

def set_secret(self, secret):
self.secret_hash = self.hash_secret(secret)
self.secret_len = len(secret)

# Note: Originally, we never wanted to keep the secret value in memory,
# after finding it in the codebase. However, to support verifiable
Expand Down Expand Up @@ -86,6 +87,7 @@ def json(self):
'filename': self.filename,
'line_number': self.lineno,
'hashed_secret': self.secret_hash,
'secret_len': self.secret_len,
'is_verified': self.is_verified,
}

Expand Down

0 comments on commit 91226b4

Please sign in to comment.