Skip to content

Add PGP keyserver expansion for key IDs and UID metadata - #936

Merged
adulau merged 2 commits into
mainfrom
codex/pgp-keyserver-expansion
Oct 15, 2026
Merged

adulau merged 2 commits into
mainfrom
codex/pgp-keyserver-expansion

Conversation

@adulau

@adulau adulau commented Oct 15, 2026 •

Copy link
Copy Markdown
Member

Add a pgp_keyserver expansion/hover module that queries an HKP keyserver by key ID, fingerprint, email address or UID text, using https://pgp.circl.lu by default.

Return one pgp-key and one pgp-meta object per result, linked with extracted-from, while preserving the original attribute. Keep complete UIDs, key IDs, fingerprints, dates, flags and provenance; retrieve public-key armor by full fingerprint and retain index metadata when a download fails. Queries, response sizes and result counts are bounded, with configurable keyserver, timeout and result limit. Accept HKP indexes without the optional information record and with omitted trailing empty fields; absent versions default to 1 and missing result counts are derived locally.

Bundle the new object templates for older PyMISP releases and include usage documentation, a message/metadata relationship example and regression tests. MISP-side installation requires the templates merged in MISP/misp-objects#543. The existing pgp-meta template is unchanged.

Validation:

  • pytest -q tests/test_pgp_keyserver.py: 105 passed.
  • Regression cases cover optional information/version/count fields, shortened pub/uid records, deduplication and result limits.
  • Flake8, Black and isort checks pass.
  • Wheel build succeeds and includes the exact committed module and both bundled templates.
  • Live CIRCL key-ID and email lookups return public keys, metadata and relationships.

UID matching depends on the server's index; CIRCL returned no matches for the tested name-only and complete-UID queries. Keyserver claims and public-key armor are not cryptographically verified. pgp-message is an artifact template with an example; this module does not parse or decrypt messages.

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 15, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-10-15T13:05:01.560301Z 8d642ea PR opened
🔒 Security Review ✅ Completed 2026-10-15T13:13:29.952831Z 8d642ea PR opened
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 8d642ea4cc

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread misp_modules/modules/expansion/pgp_keyserver.py Outdated
Comment thread misp_modules/modules/expansion/pgp_keyserver.py Outdated
@adulau
adulau merged commit 5568b86 into main Oct 15, 2026
7 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant