Skip to content

Add the CIRCL OSINT feed (MISP feed format) - #1472

Merged
tomchop merged 3 commits into
yeti-platform:mainfrom
kev365:feat/circl-osint-feed
Nov 19, 2026
Merged

tomchop merged 3 commits into
yeti-platform:mainfrom
kev365:feat/circl-osint-feed

Conversation

@kev365

@kev365 kev365 commented Nov 17, 2026

Copy link
Copy Markdown
Contributor

Fixes #1421.

Adds CirclOsintFeed, which reads CIRCL's OSINT feed. The feed is published in the MISP feed format: static files, a manifest.json that lists every event and one <uuid>.json per event. MispFeed can'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, and CirclOsintFeed sets the URL, the skipped tags and a circl-osint tag, so another feed in this format is a short subclass.

What a run does

  • Manifest. Fetched through _make_request, so an unchanged Last-Modified ends the run.
  • Which events. Selected by their manifest timestamp: the last 60 days on the first run, like MispFeed's days, then everything since last_run minus 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.
  • Event files. Fetched with sort=False. The manifest has already said the event changed, and the per-file Last-Modified check 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.
  • Observables. Attributes flagged to_ids, top-level and inside objects, with the types in MISP_TYPES_TO_IMPORT. A filename|hash attribute 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 and regkey, which has no data or hive for RegistryKey.
  • Context. One entry per event on each observable: event uuid, info, date, org, category, comment, a link to the event file and the event's External analysis links. Entries are compared on event_uuid, so a changed event updates its entry instead of adding one.
  • Tags and links. The event's and the attribute's tags plus circl-osint. Members of a MISP object are linked to its first member as linked_by_misp_<object name>, the relationship MispToYeti uses.

Defaults

#1421 asked about three choices. This is what the PR does, and each is a one-line change:

  • Events tagged 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.
  • Only to_ids attributes are imported.
  • filename maps to file, as MISP_TYPES_TO_IMPORT says.

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, and run() with only the HTTP calls mocked. tests/feeds.py gets 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_run and 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

kev365 and others added 3 commits November 16, 2026 19:26
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
tomchop merged commit 2ac86bf into yeti-platform:main Nov 19, 2026
5 checks passed
@kev365
kev365 deleted the feat/circl-osint-feed branch November 20, 2026 00:29
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.

Feed: CIRCL's OSINT feed, in the MISP feed format

2 participants