# AGENTS
## Role
Implement the Russian BDU (Vulnerability Database) connector to ingest advisories published by FSTEC’s BDU catalogue.

## Scope
- Determine accessible BDU feeds/APIs (HTML listings, downloadable CSV, SOAP/REST) and access constraints.
- Build fetch/cursor pipeline with dedupe, retries, and backoff appropriate for the data source.
- Parse advisory records to extract summary, affected vendors/products, mitigation recommendations, CVE IDs.
- Map advisories into canonical `Advisory` objects including aliases, references, affected packages, and range primitives.
- Provide deterministic fixtures and regression tests for the connector lifecycle.

## Participants
- `Source.Common` (HTTP/fetch utilities, DTO storage).
- `Storage.Mongo` (raw/document/DTO/advisory stores + source state).
- `Feedser.Models` (canonical data structures).
- `Feedser.Testing` (integration harness, snapshot utilities).

## Interfaces & Contracts
- Job kinds: `bdu:fetch`, `bdu:parse`, `bdu:map`.
- Persist upstream metadata (e.g., record modification timestamp) to drive incremental updates.
- Alias set should include BDU identifiers and CVE IDs when present.

## In/Out of scope
In scope:
- Core ingestion/mapping of BDU vulnerability records.

Out of scope:
- Translation beyond normalising required canonical fields.

## Observability & Security Expectations
- Log fetch/mapping statistics and failure details.
- Sanitize source payloads, handling Cyrillic text/encodings correctly.
- Respect upstream rate limits and mark failures with backoff.

## Tests
- Add `StellaOps.Feedser.Source.Ru.Bdu.Tests` covering fetch/parse/map with canned fixtures.
- Snapshot canonical advisories; support fixture regeneration via env flag.
- Ensure deterministic ordering/time normalisation.
