Pipeline Orchestration
Decoupled end-to-end orchestration connecting feed watching, URL checking, OSV file scanning, and the offline wheel-bundled demo without coupling core business logic to CLI formatting.
pipeline
Decoupled end-to-end orchestration pipeline shared by CLI, demos, and benchmarks.
check_url(url, *, fetcher, extractor, backend=None, source_name='Manual URL', source_tier=SourceTier.UNKNOWN, registry_checker=None, state_store=None, run_prefilter=True, query_on_triage=False, only_vulnerable=True)
Fetch a single advisory URL securely and run it through the full verification pipeline.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
url
|
str
|
HTTP/HTTPS URL of the security blog post. |
required |
fetcher
|
SafeHttpFetcher
|
SSRF-hardened :class: |
required |
extractor
|
Extractor
|
Narrow LLM extractor. |
required |
backend
|
InventoryBackend | None
|
Optional inventory backend to check against verified advisories. |
None
|
source_name
|
str
|
Publisher name attached to the fetched article. |
'Manual URL'
|
source_tier
|
SourceTier
|
Credibility tier weight assigned to the source. |
UNKNOWN
|
registry_checker
|
RegistryChecker | None
|
Optional upstream registry existence checker. |
None
|
state_store
|
IngestStateStore | None
|
Optional ingestion state store. |
None
|
run_prefilter
|
bool
|
Whether to apply the pre-LLM keyword/regex filter. |
True
|
query_on_triage
|
bool
|
Whether |
False
|
only_vulnerable
|
bool
|
Whether to return only vulnerable inventory matches. |
True
|
Returns:
| Name | Type | Description |
|---|---|---|
A |
PipelineOutcome
|
class: |
Source code in src/zerobom/pipeline.py
433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 | |
convert_external_osv(inp)
Convert an external :class:OsvAdvisoryInput into an evaluable :class:OsvAdvisory.
Handles spec-optional fields (missing published, summary, or purl), skips
withdrawn records cleanly, and skips unsupported GIT ranges with diagnostic warnings.
Source code in src/zerobom/pipeline.py
113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 | |
load_osv_advisories(path, *, max_file_bytes=MAX_OSV_FILE_BYTES, max_files=MAX_OSV_FILES)
Load, validate, and normalize OSV v1.x JSON advisories from a file or directory.
Withdrawn or GIT-only records are omitted cleanly during conversion rather than failing directory scans.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
path
|
Path | str
|
Path to a single OSV JSON file or a directory of |
required |
max_file_bytes
|
int
|
Maximum byte size permitted per OSV JSON file. |
MAX_OSV_FILE_BYTES
|
max_files
|
int
|
Maximum number of JSON files permitted in a directory scan. |
MAX_OSV_FILES
|
Returns:
| Type | Description |
|---|---|
tuple[OsvAdvisory, ...]
|
Tuple of evaluable :class: |
Raises:
| Type | Description |
|---|---|
ValueError
|
If |
Source code in src/zerobom/pipeline.py
268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 | |
load_osv_inputs(path, *, max_file_bytes=MAX_OSV_FILE_BYTES, max_files=MAX_OSV_FILES)
Load and validate OSV JSON advisories using the spec-compliant lenient consumer contract.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
path
|
Path | str
|
Path to a single OSV JSON file or a directory of |
required |
max_file_bytes
|
int
|
Maximum byte size permitted per OSV JSON file. |
MAX_OSV_FILE_BYTES
|
max_files
|
int
|
Maximum number of JSON files permitted in a directory scan. |
MAX_OSV_FILES
|
Returns:
| Type | Description |
|---|---|
tuple[OsvAdvisoryInput, ...]
|
Tuple of validated :class: |
Raises:
| Type | Description |
|---|---|
ValueError
|
If |
Source code in src/zerobom/pipeline.py
213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 | |
process_article(article, *, extractor, backend=None, registry_checker=None, state_store=None, etag=None, last_modified=None, run_prefilter=True, query_on_triage=False, only_vulnerable=True, mark_seen=True, extra_urls=())
Run an ingested :class:RawArticle through pre-filter, extraction, verification, and match.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
article
|
RawArticle
|
Normalized article text and metadata. |
required |
extractor
|
Extractor
|
Narrow LLM (or fixture) extractor implementing :class: |
required |
backend
|
InventoryBackend | None
|
Optional inventory backend queried when routing passes the credibility gate. |
None
|
registry_checker
|
RegistryChecker | None
|
Optional upstream package registry verifier. |
None
|
state_store
|
IngestStateStore | None
|
Optional SQLite store updated after processing finishes. |
None
|
etag
|
str | None
|
Optional HTTP |
None
|
last_modified
|
str | None
|
Optional HTTP |
None
|
run_prefilter
|
bool
|
Whether to gate non-vulnerability noise prior to invoking |
True
|
query_on_triage
|
bool
|
Whether |
False
|
only_vulnerable
|
bool
|
Whether returned matches exclude patched/non-vulnerable versions. |
True
|
mark_seen
|
bool
|
Whether to persist |
True
|
extra_urls
|
Sequence[str]
|
Additional canonicalizable alias URLs (e.g., pre-redirect feed entry URLs)
recorded alongside |
()
|
Returns:
| Name | Type | Description |
|---|---|---|
A |
PipelineOutcome
|
class: |
Source code in src/zerobom/pipeline.py
300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 | |
run_offline_demo()
Run the zero-config offline demo using wheel-bundled advisory and SBOM fixtures.
Returns:
| Name | Type | Description |
|---|---|---|
A |
PipelineOutcome
|
class: |
PipelineOutcome
|
OSV compilation, and CycloneDX upstream/PURL SBOM matching. |
Source code in src/zerobom/pipeline.py
675 676 677 678 679 680 681 682 683 684 685 686 687 688 689 690 691 692 693 694 695 696 697 698 699 700 701 702 703 | |
scan_osv_files(osv_path, *, backend, only_vulnerable=True)
Deterministically evaluate OSV JSON advisories against an inventory backend (zero LLM).
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
osv_path
|
Path | str
|
Path to an OSV JSON file or directory of OSV JSON files. |
required |
backend
|
InventoryBackend
|
Configured :class: |
required |
only_vulnerable
|
bool
|
Whether to omit non-vulnerable versions from returned matches. |
True
|
Returns:
| Type | Description |
|---|---|
tuple[PipelineOutcome, ...]
|
Tuple of :class: |
Source code in src/zerobom/pipeline.py
395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 | |
watch_feeds(feeds, *, fetcher, extractor, backend=None, state_store=None, registry_checker=None, run_prefilter=True, query_on_triage=False, only_vulnerable=True)
Poll allowlisted feeds and process newly discovered or edited articles end-to-end.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
feeds
|
Sequence[SourceFeedConfig]
|
Allowlisted :class: |
required |
fetcher
|
SafeHttpFetcher
|
SSRF-hardened :class: |
required |
extractor
|
Extractor
|
Narrow LLM extractor. |
required |
backend
|
InventoryBackend | None
|
Optional inventory backend queried on verified advisories. |
None
|
state_store
|
IngestStateStore | None
|
Optional SQLite state store for conditional fetch & edit detection. |
None
|
registry_checker
|
RegistryChecker | None
|
Optional upstream registry existence verifier. |
None
|
run_prefilter
|
bool
|
Whether to run pre-LLM keyword/regex filtering. |
True
|
query_on_triage
|
bool
|
Whether |
False
|
only_vulnerable
|
bool
|
Whether to return only vulnerable matches. |
True
|
Returns:
| Type | Description |
|---|---|
tuple[PipelineOutcome, ...]
|
Tuple of :class: |
Source code in src/zerobom/pipeline.py
487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 | |
watch_feeds_report(feeds, *, fetcher, extractor, backend=None, state_store=None, registry_checker=None, run_prefilter=True, query_on_triage=False, only_vulnerable=True, mark_seen=True, outcome_sink_keys=None)
Poll allowlisted feeds with per-feed and per-article failure isolation.
Failures in feed fetching, XML/HTML parsing, article extraction, or backend matching are
recorded cleanly in :class:WatchReport without aborting remaining feeds or discarding prior
outcomes. When state_store and outcome_sink_keys are supplied, each article's state
and pending outbound alert deliveries are committed atomically per item.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
feeds
|
Sequence[SourceFeedConfig]
|
Allowlisted :class: |
required |
fetcher
|
SafeHttpFetcher
|
SSRF-hardened :class: |
required |
extractor
|
Extractor
|
Narrow LLM extractor. |
required |
backend
|
InventoryBackend | None
|
Optional inventory backend queried on verified advisories. |
None
|
state_store
|
IngestStateStore | None
|
Optional SQLite state store for conditional fetch & outbox persistence. |
None
|
registry_checker
|
RegistryChecker | None
|
Optional upstream registry existence verifier. |
None
|
run_prefilter
|
bool
|
Whether to run pre-LLM keyword/regex filtering. |
True
|
query_on_triage
|
bool
|
Whether |
False
|
only_vulnerable
|
bool
|
Whether to return only vulnerable matches. |
True
|
mark_seen
|
bool
|
Whether to persist processed article state to |
True
|
outcome_sink_keys
|
Callable[[PipelineOutcome], Sequence[str]] | None
|
Optional callback returning outbox sink keys triggered by an outcome. |
None
|
Returns:
| Name | Type | Description |
|---|---|---|
Structured |
WatchReport
|
class: |
Source code in src/zerobom/pipeline.py
544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 602 603 604 605 606 607 608 609 610 611 612 613 614 615 616 617 618 619 620 621 622 623 624 625 626 627 628 629 630 631 632 633 634 635 636 637 638 639 640 641 642 643 644 645 646 647 648 649 650 651 652 653 654 655 656 657 658 659 | |