← All Modules

assay.harbor

Harbor container registry. Projects, repositories, artifacts, vulnerability scanning. Client: harbor.client(url, {api_key="..."}) or {username="...", password="..."}.

System (c.system)

Projects (c.projects)

Repositories (c.repositories)

Artifacts (c.artifacts)

Scan (c.scan)

Replication (c.replication)

Backward Compatibility

All legacy colon-style methods (c:health(), c:projects(), c:artifacts(), etc.) remain available and delegate to the sub-objects above.

Example:

local harbor = require("assay.harbor")
local c = harbor.client("https://harbor.example.com", {username = "admin", password = env.get("HARBOR_PASS")})

-- New sub-object style
assert.eq(c.system:is_healthy(), true, "Harbor unhealthy")
c.scan:trigger("myproject", "myapp", "latest")
sleep(30)
local vulns = c.scan:vulnerabilities("myproject", "myapp", "latest")
assert.eq(vulns.critical, 0, "Critical vulnerabilities found!")

-- Legacy style still works
assert.eq(c:is_healthy(), true, "Harbor unhealthy")
c:scan_artifact("myproject", "myapp", "latest")