Skip to content

Commit

Permalink
Merge pull request #287 from vin01/master
Browse files Browse the repository at this point in the history
Detect putty & sshcom private keys
  • Loading branch information
asottile authored May 18, 2018
2 parents a66a330 + 45d3850 commit 7a8a6e4
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 0 deletions.
2 changes: 2 additions & 0 deletions pre_commit_hooks/detect_private_key.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,8 @@
b'BEGIN EC PRIVATE KEY',
b'BEGIN OPENSSH PRIVATE KEY',
b'BEGIN PRIVATE KEY',
b'PuTTY-User-Key-File-2',
b'BEGIN SSH2 ENCRYPTED PRIVATE KEY',
]


Expand Down
2 changes: 2 additions & 0 deletions tests/detect_private_key_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@
(b'-----BEGIN DSA PRIVATE KEY-----', 1),
(b'-----BEGIN EC PRIVATE KEY-----', 1),
(b'-----BEGIN OPENSSH PRIVATE KEY-----', 1),
(b'PuTTY-User-Key-File-2: ssh-rsa', 1),
(b'---- BEGIN SSH2 ENCRYPTED PRIVATE KEY ----', 1),
(b'ssh-rsa DATA', 0),
(b'ssh-dsa DATA', 0),
# Some arbitrary binary data
Expand Down

0 comments on commit 7a8a6e4

Please sign in to comment.