# AGENTS
## Role
Deliver the KISA (Korea Internet & Security Agency) advisory connector to ingest Korean vulnerability alerts for Feedser’s regional coverage.

## Scope
- Identify KISA’s advisory feeds (RSS/Atom, JSON, HTML) and determine localisation requirements (Korean language parsing).
- Implement fetch/cursor logic with retry/backoff, handling authentication if required.
- Parse advisory content to extract summary, affected vendors/products, mitigation steps, CVEs, references.
- Map advisories into canonical `Advisory` records with aliases, references, affected packages, and range primitives (including vendor/language metadata).
- Provide deterministic fixtures and regression tests.

## 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 fixtures and snapshots).

## Interfaces & Contracts
- Job kinds: `kisa:fetch`, `kisa:parse`, `kisa:map`.
- Persist upstream caching metadata (e.g., ETag/Last-Modified) when available.
- Alias set should include KISA advisory identifiers and CVE IDs.

## In/Out of scope
In scope:
- Advisory ingestion, translation/normalisation, range primitives.

Out of scope:
- Automated Korean↔English translations beyond summary normalization (unless required for canonical fields).

## Observability & Security Expectations
- Log fetch and mapping metrics; record failures with backoff.
- Sanitise HTML, removing scripts/styles.
- Handle character encoding (UTF-8/Korean) correctly.

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