strix icon indicating copy to clipboard operation
strix copied to clipboard

[FEATURE] Asset-type taxonomy: detect and route diverse targets (mobile/cloud/web3/binary/identity) to methodology skills

Open NetVar1337 opened this issue 5 months ago • 1 comments

Problem

infer_target_type only resolves targets into the core code / file / url / network / identifier buckets. Targets that are valid attack surface but don't fit those buckets — mobile bundles (APK/IPA), cloud resources (S3 buckets, blob stores, serverless functions), web3 (smart contracts, RPC endpoints, wallets), binaries/firmware, and identity/auth endpoints — are classified generically, so the root agent receives no asset-specific methodology and treats, say, an .apk like an opaque file.

Proposal

A small, frozen AssetType taxonomy with detection (prefix, file extension, URL scheme) and routing that maps each recognized asset to a methodology skill. The recommended skill is surfaced in the root task only when that skill is available, so the engine degrades gracefully and ships independently of the skill corpus (tracked separately).

Known pitfalls (from prior exploration in the now-closed #533)

  • Keep the source dict type-coherent for mypy --strict. A bool is_dir flag stored in a dict[str, str] makes get("is_dir") is False a non-overlapping identity check. Either use a string sentinel ("is_dir": "false") and keep the dict homogeneous, or thread dict[str, str | bool] through every consumer — including runtime/session_manager.create_or_reuse, which was missed.
  • Every AssetType.skill stem must resolve to a real skill file. The prior draft routed source code to a non-existent source_code_review stem (the real stems are source_aware_sast / source_aware_whitebox).

Acceptance

  • Detection/routing unit tests for representative targets of each kind.
  • Existing core target types (local_code, repository, url, domain, subdomain, ip_address) behave exactly as before.
  • ruff, mypy --strict, and bandit green.

Depends-on: the per-asset methodology skills corpus (separate issue). Related: #287.

NetVar1337 avatar Jun 09 '26 07:06 NetVar1337

Skills corpus tracked in #551 (routing here must reference skill stems that exist there).

NetVar1337 avatar Jun 09 '26 07:06 NetVar1337