[Misdetection] OpenSSH private key file misdetected as <PEM certificate>
- Dominant language
- Rust
- Stars
- 18.6k
- Forks
- 1.2k
- Avg merge
- 3d 12h
- Merged PRs (30d)
- 20
Description
**What should the file have been detected as? What has the file been misdetected as?**
OpenSSH private key files are being mistaken for PEM certificate files.
**Please link or attach the misdetected file below** (Do NOT upload PII!)
The file could not be uploaded as the format is not supported. Also, the file is a private key, so I'm inclined to not share it.
**Additional context**
Private keys look a lot like PEM certificates, except that their structure is:
```
-----BEGIN PRIVATE KEY-----
[...Base64 gibberish...]
-----END PRIVATE KEY-----
```
whereas certificates' format is:
```
-----BEGIN CERTIFICATE-----
[...Base64 gibberish...]
-----END CERTIFICATE-----
```
I would have thought that this was an easy distinction, and in fact, the Linux command `file` manages to distinguish them.
I got this mistake both in command-line and from Python code. I'm using the model `standard_v1`. Should I be doing something different?
Contributor guide
Assessment
This issue has not been assessed yet.