Skip to content

PrivateKey detector should emit some metadata about the corresponding certificate if available #3631

Open
@hasnain-db

Description

Description

In some cases private keys are committed alongside the certificate chain in the same file. In those cases, it would be great if TruffleHog can also emit metadata about the cert (similar to how e.g. the AWS detector emits the account ID). In particular, some fields I think would be relevant:

  • Certificate expiry
  • The name of the CA
  • Subject name (and alternative names)
  • Key usage / extended key usage
  • A hash or a key id to help correlate with inventories.

Preferred Solution

N/A

Additional Context

N/A

References

Conceptually, I think this aligns well with what driftwood already does: https://trufflesecurity.com/blog/driftwood

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions