Skip to content

test : added unit tests for finding_intelligence asset reference and signature helpers#1251

Merged
utksh1 merged 2 commits into
utksh1:mainfrom
tmdeveloper007:#1246
Jun 24, 2026
Merged

test : added unit tests for finding_intelligence asset reference and signature helpers#1251
utksh1 merged 2 commits into
utksh1:mainfrom
tmdeveloper007:#1246

Conversation

@tmdeveloper007

Copy link
Copy Markdown
Contributor

Closes #1246.

Summary of What Has Been Done:
Added unit tests for 4 pure helper functions in backend/secuscan/finding_intelligence.py: _extract_best_url, _guess_asset_ref, _issue_signature, and _finding_kind_for. Tests cover metadata/evidence/target URL extraction, asset ref resolution, signature generation, and finding kind classification.

Changes Made:

  • Created testing/backend/unit/test_finding_intelligence_asset_ref.py with 33 test cases
  • _extract_best_url: 10 tests (priority order, metadata keys, evidence, target fallback, edge cases)
  • _guess_asset_ref: 5 tests (asset_refs priority, URL extraction, host metadata, target fallback)
  • _issue_signature: 6 tests (CVE prefix, field-based, determinism, empty cases)
  • _finding_kind_for: 12 tests (observation/suspected/validated classification, category and severity interactions)

Impact it Made:

  • Guards finding deduplication and classification logic against regressions
  • Documents expected behavior for asset reference extraction
  • Increases overall test coverage of the finding_intelligence module

Note: This task is being handled by tmdeveloper007 -- please assign to that account when picking it up.

@utksh1 utksh1 merged commit 6579112 into utksh1:main Jun 24, 2026
@utksh1 utksh1 added the gssoc:approved Admin validation: approved for GSSoC scoring label Jun 24, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

gssoc:approved Admin validation: approved for GSSoC scoring

Projects

None yet

Development

Successfully merging this pull request may close these issues.

test : add unit tests for finding_intelligence asset reference and signature helpers

2 participants