Repository navigation
Add the CIRCL OSINT feed (MISP feed format) - #1472
Merged
Merged
Conversation
CIRCL publishes OSINT MISP events as static files: a manifest.json plus one <uuid>.json per event. MispFeed needs a MISP server and an API key, and the feed export differs from the API export (no event_id on attributes, and the Attribute or Object list can be missing), so this is a new reader. MispFeedFormat holds the run loop: fetch the manifest (an unchanged Last-Modified ends the run), select events updated in the last 60 days on the first run and since last_run minus a day after that, skip events carrying a skip tag, and fetch each event file, logging and skipping a bad one. Attributes that are deleted, non-IDS or External analysis are left out (the latter's links go into context); types come from MISP_TYPES_TO_IMPORT and values are checked with the type's validator; filename|hash keeps the hash. One context entry per event per observable, event and attribute tags plus a marker tag, and object members linked as linked_by_misp_<name>. CirclOsintFeed sets the URL, skips misp:automation-level="unsupervised" (daily dumps of ~12,000 domains) and tags circl-osint. The parsing is in module-level functions tested without a database; fixtures are a trimmed TLP:CLEAR CERT-FR event and three manifest entries from the live feed. Refs yeti-platform#1421 Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
A regkey attribute maps to registry_key, whose model needs a key, data and a hive that a MISP attribute doesn't carry. Building it raised a ValidationError that nothing caught, so one such attribute failed the whole run. save_observable() now catches the ValueError from observable.save(), logs the value and moves on. create() checks a value against the type it is given, so the separate validator call is gone: the same except covers both cases. Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
The third entry of the trimmed manifest stands for an old event that the date filter leaves out. The one picked was tagged tlp:green. It is replaced by the oldest tlp:white entry of the live manifest, copied as published, so every fixture is TLP:WHITE or TLP:CLEAR. Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
tomchop
approved these changes
Nov 19, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #1421.
Adds
CirclOsintFeed, which reads CIRCL's OSINT feed. The feed is published in the MISP feed format: static files, amanifest.jsonthat lists every event and one<uuid>.jsonper event.MispFeedcan't read it, because it talks to a MISP server through PyMISP and needs an API key.It is one new plugin file, with no config change and no new dependency. The parsing functions take and return dicts.
MispFeedFormat(FeedTask)holds the run loop, andCirclOsintFeedsets the URL, the skipped tags and acircl-osinttag, so another feed in this format is a short subclass.What a run does
_make_request, so an unchangedLast-Modifiedends the run.MispFeed'sdays, then everything sincelast_runminus one day. The manifest is regenerated on CIRCL's schedule, and a strict cutoff can miss an event that changed between two generations. Reading an event again changes nothing.sort=False. The manifest has already said the event changed, and the per-fileLast-Modifiedcheck would skip an event that was selected by the one-day overlap. A file that can't be fetched or parsed is logged and skipped.to_ids, top-level and inside objects, with the types inMISP_TYPES_TO_IMPORT. Afilename|hashattribute keeps the hash and puts the filename in context. A value its type can't hold is logged and skipped; that covers values failing the type's validator andregkey, which has no data or hive forRegistryKey.event_uuid, so a changed event updates its entry instead of adding one.circl-osint. Members of a MISP object are linked to its first member aslinked_by_misp_<object name>, the relationshipMispToYetiuses.Defaults
#1421 asked about three choices. This is what the PR does, and each is a one-line change:
misp:automation-level="unsupervised"are skipped. They are Maltrail's daily dumps of about 12,000 domains each, 286 of the feed's 1,681 events.to_idsattributes are imported.filenamemaps tofile, asMISP_TYPES_TO_IMPORTsays.Tests
36 in
tests/core_tests/circl_osint_test.py: the parsing functions without a database,analyze_event()against a trimmed TLP:CLEAR CERT-FR event, andrun()with only the HTTP calls mocked.tests/feeds.pygets the live entry.Against the live feed on 2026-11-16, a first run stored 252 observables from the last 60 days in about two minutes. A second run over a recent
last_runand a third against an unchanged manifest were measured on 2026-10-10: one event with identical counts in 8 s, and 0.5 s.Checks: ruff, ty and the three test directories in a CI-equivalent environment.
🤖 Generated with Claude Code