ONB-01 · Target taxonomy + unified data model (OnboardedTarget/TargetType/Artifact) #119

Open
opened 2026-07-10 08:34:41 +00:00 by sharang · 0 comments
Owner

Part of #118.

Context

Three target models exist today with no shared abstraction: TrackedRepository (SAST path), DastTarget (DAST path), and the pentest target/PentestSession. None captures what kind of software the target is, nor which artifacts it has.

Scope

  • Add TargetType enum: WebApp, BackendService, DesktopApp, AndroidApp, IosApp, FirmwareBareMetal, FirmwareRtos, EmbeddedLinuxYocto, PlcSps.
  • Add ArtifactKind enum: GitRepo, SourceArchive, FirmwareImage, MobilePackage (APK/AAB/IPA), ContainerImage, LiveUrl, PlcProject, PlaintextDescription.
  • Add OnboardedTarget aggregate: id, name, target_type, Vec<Artifact>, enabled scan configs, environment, timestamps. Artifact { kind, location/ref, metadata, detected_facts }.
  • Mongo repository (CRUD + list/paginate), following the existing repo/model conventions in compliance-core/src/models/ and the Mongo repo layer.
  • Keep TrackedRepository/DastTarget compiling (migration handled in ONB-14).

Acceptance criteria

  • Models serialize/deserialize (bson round-trip test in compliance-core/tests/models.rs).
  • Repo layer has create/get/list/update/delete with pagination.
  • No behavior change to existing scan paths yet.

Depends on

None (foundational — do first).

Part of #118. ## Context Three target models exist today with no shared abstraction: `TrackedRepository` (SAST path), `DastTarget` (DAST path), and the pentest target/`PentestSession`. None captures *what kind of software* the target is, nor which artifacts it has. ## Scope - Add `TargetType` enum: `WebApp`, `BackendService`, `DesktopApp`, `AndroidApp`, `IosApp`, `FirmwareBareMetal`, `FirmwareRtos`, `EmbeddedLinuxYocto`, `PlcSps`. - Add `ArtifactKind` enum: `GitRepo`, `SourceArchive`, `FirmwareImage`, `MobilePackage` (APK/AAB/IPA), `ContainerImage`, `LiveUrl`, `PlcProject`, `PlaintextDescription`. - Add `OnboardedTarget` aggregate: id, name, `target_type`, `Vec<Artifact>`, enabled scan configs, environment, timestamps. `Artifact { kind, location/ref, metadata, detected_facts }`. - Mongo repository (CRUD + list/paginate), following the existing repo/model conventions in `compliance-core/src/models/` and the Mongo repo layer. - Keep `TrackedRepository`/`DastTarget` compiling (migration handled in ONB-14). ## Acceptance criteria - Models serialize/deserialize (bson round-trip test in `compliance-core/tests/models.rs`). - Repo layer has create/get/list/update/delete with pagination. - No behavior change to existing scan paths yet. ## Depends on None (foundational — do first).
sharang added this to the Onboarding v1 milestone 2026-07-10 08:34:41 +00:00
sharang added the enhancementonboarding labels 2026-07-10 08:34:41 +00:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: sharang/compliance-scanner-agent#119