Skip to content

Add custom extraction patterns - #58

Merged
PakitoSec merged 1 commit into
mainfrom
feature/custom-extraction-patterns
Jun 16, 2026
Merged

Add custom extraction patterns#58
PakitoSec merged 1 commit into
mainfrom
feature/custom-extraction-patterns

Conversation

@PakitoSec

Copy link
Copy Markdown
Owner

Summary

Adds regex-backed custom extraction patterns to the observable extraction module.

Changes

  • Adds ExtractionPattern for per-call or globally registered custom extractors.
  • Extends ExtractedObservable with optional subtype and namespace metadata.
  • Adds custom extraction support to extract_all() and extract_from_url().
  • Deduplicates extracted observables by type, subtype, namespace, and value.
  • Omits None fields from CLI JSON extraction output.
  • Documents custom extraction patterns and registration helpers.

Validation

  • uv run pytest tests/test_extract.py
  • uv run ruff check src/cyvest/extract.py src/cyvest/cli.py tests/test_extract.py

@PakitoSec PakitoSec self-assigned this Jun 16, 2026
@PakitoSec
PakitoSec marked this pull request as ready for review June 16, 2026 14:10
@PakitoSec
PakitoSec merged commit 4275388 into main Jun 16, 2026
10 checks passed
@PakitoSec
PakitoSec deleted the feature/custom-extraction-patterns branch June 16, 2026 14:11
PakitoSec added a commit that referenced this pull request Jul 12, 2026
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.

1 participant