Skip to content

docs(proposals): Add proposal to extend pluggable scanner spec#285

Open
Vad1mo wants to merge 1 commit into
goharbor:mainfrom
container-registry:extend-pluggable-scanner-spec
Open

docs(proposals): Add proposal to extend pluggable scanner spec#285
Vad1mo wants to merge 1 commit into
goharbor:mainfrom
container-registry:extend-pluggable-scanner-spec

Conversation

@Vad1mo

@Vad1mo Vad1mo commented May 27, 2026

Copy link
Copy Markdown
Member

Adds a new proposal under proposals/new/extend-pluggable-scanner-spec.md that proposes a backward-compatible v1.3 revision of the pluggable scanner spec (current: v1.2.0, June 2024) and a set of additive Harbor core changes to turn the scanner subsystem into a general-purpose image-analysis plugin framework with chaining.

The proposal opens the capability namespace (Dockerfile reconstruction, lint, helm.analyze, license, secret, malware, policy, attestation, etc.) and lets adapters declare consumes_capabilities so Harbor can build a DAG of analyzers — output of one feeding the next.

Related

Signed-off-by: Vadim Bauer <vb@container-registry.com>
@wy65701436

wy65701436 commented Jul 13, 2026

Copy link
Copy Markdown
Contributor

cc @stonezdj @chlins , could you please help review this? Since this was discussed in the community meeting, we would like to target this for v2.17 - maybe and explore enabling more flexibility on top of it. Take action, please.

- `policy` / `attestation` — OPA/Rego, Kyverno; consumes any prior report
- Vendor-prefixed: e.g. `x-acme.binary-provenance`

2. **Declared inputs** *(optional, default = none)*. Add `consumes_capabilities: []string` to `ScannerCapability` so Harbor can build a DAG. Default empty ⇒ standalone scanner, current v1.2 behavior.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you please explain what is DAG and its data structure? how it is generated, and where should it be stored, and how it controll the behaviour of the scanner adapter?


### Harbor Core Changes (all additive)

1. **N scanners per project (additive).** Keep the existing `project_scanner` single-binding row as the "primary scanner" for backward compatibility. Add a `project_scanner_binding(project_id, registration_uuid, capability_types[], priority, enabled)` join table alongside it. Projects that never use the new UI continue to behave exactly as today. `getScannerOfProject` returns the primary; a new endpoint returns the full binding list.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

For N scanners per project, there should be a new table project_scanner, how the application matches the scanner with specified configuration, if there is multiple scanner configured, is there any fallback mechanism when the first scanner failed?


### Harbor Core Changes (all additive)

1. **N scanners per project (additive).** Keep the existing `project_scanner` single-binding row as the "primary scanner" for backward compatibility. Add a `project_scanner_binding(project_id, registration_uuid, capability_types[], priority, enabled)` join table alongside it. Projects that never use the new UI continue to behave exactly as today. `getScannerOfProject` returns the primary; a new endpoint returns the full binding list.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In current Harbor UI, the capability is limited in the UI, when there are new capability configured, How the UI enable this capability, for example, when a secret scanner configured, How does the user access the feature scan secret in the UI dynamically?


8. **CLI/automation (additive).** Existing `harbor artifact scan` invocations behave identically. New flags: `harbor scanner list-capabilities`, `harbor artifact scan --capability dockerfile.reconstruct`.

### Example Chained Flow

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

can you take the license scan as an example, draw a whole picture flow diagram to include all interaction during this process?

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.

5 participants