full diff

io.atcr.hold.subscribeScanJobs

seamark.cr +11 −0
From
bafyreifzk7kamgpxcjqhau3wvruclefo7aq2yy36kr7it4vcpag4wurhcq indexed 2026-03-19 20:28 UTC View this version
To
bafyreiba5mul5r3bljixvyr2ibgbxts6qpwu5o4j64ivatlthcetdcno4m indexed 2026-11-13 08:11 UTC View this version

Compatibility

backward compatible No changes detected.

Changes

11{
22 "$type": "com.atproto.lexicon.schema",
33 "defs": {
44 "main": {
55 "description": "Subscribe to vulnerability scan jobs via WebSocket. Scanners connect to receive pending scan jobs and send back results. Authenticated via shared secret (query parameter or X-Scanner-Secret header).",
66 "errors": [
77 {
88 "description": "Scanner shared secret is invalid",
99 "name": "InvalidSecret"
1010 }
1111 ],
1212 "message": {
1313 "schema": {
1414 "refs": [
1515 "#scanJob",
1616 "#scanResult"
1717 ],
1818 "type": "union"
1919 }
2020 },
2121 "parameters": {
2222 "properties": {
2323 "cursor": {
2424 "description": "Sequence number to resume from. If omitted, starts from latest. Use -1 to receive only new jobs.",
2525 "type": "integer"
26 },
27 "instance": {
28 "description": "Stable identity of the scanner process, sent on every connect. A scanner that reconnects with the same value resumes the jobs it was holding when the connection dropped, instead of having them offered to another scanner. Omitted means the hold assigns a per-connection identity and the scanner's in-flight work is reclaimed rather than resumed.",
29 "maxLength": 64,
30 "type": "string"
31 },
32 "workers": {
33 "description": "How many scans this scanner runs concurrently. The hold keeps this many jobs in flight for the connection. Omitted or unusable means one.",
34 "maximum": 32,
35 "minimum": 1,
36 "type": "integer"
2637 }
2738 },
2839 "type": "params"
2940 },
3041 "type": "subscription"
3142 },
3243 "scanJob": {
3344 "description": "A scan job dispatched from hold to scanner. Sent as a JSON WebSocket message.",
3445 "properties": {
3546 "digest": {
3647 "description": "Manifest digest (e.g., sha256:abc123...)",
3748 "maxLength": 128,
3849 "type": "string"
3950 },
4051 "holdDid": {
4152 "description": "DID of the hold where the image is stored",
4253 "format": "did",
4354 "type": "string"
4455 },
4556 "holdEndpoint": {
4657 "description": "HTTP endpoint of the hold for blob downloads",
4758 "format": "uri",
4859 "type": "string"
4960 },
5061 "priority": {
5162 "description": "Scan priority (lower = higher priority). Tier-based scheduling.",
5263 "type": "integer"
5364 },
5465 "repository": {
5566 "description": "Repository name (e.g., myapp)",
5667 "maxLength": 256,
5768 "type": "string"
5869 },
5970 "seq": {
6071 "description": "Monotonic sequence number for cursor-based resumption",
6172 "type": "integer"
6273 },
6374 "tag": {
6475 "description": "Optional tag that triggered the scan",
6576 "maxLength": 256,
6677 "type": "string"
6778 },
6879 "type": {
6980 "const": "scan_job",
7081 "description": "Message type discriminator",
7182 "maxLength": 32,
7283 "type": "string"
7384 },
7485 "userDid": {
7586 "description": "DID of the image owner",
7687 "format": "did",
7788 "type": "string"
7889 }
7990 },
8091 "required": [
8192 "type",
8293 "seq",
8394 "digest",
8495 "repository",
8596 "userDid",
8697 "holdDid",
8798 "holdEndpoint"
8899 ],
89100 "type": "object"
90101 },
91102 "scanResult": {
92103 "description": "A scan result sent from scanner back to hold. Sent as a JSON WebSocket message.",
93104 "properties": {
94105 "digest": {
95106 "description": "Manifest digest that was scanned",
96107 "maxLength": 128,
97108 "type": "string"
98109 },
99110 "error": {
100111 "description": "Error message if scan failed",
101112 "maxLength": 1024,
102113 "type": "string"
103114 },
104115 "sbom": {
105116 "description": "SBOM blob (SPDX JSON format, max 100MB)",
106117 "maxLength": 104857600,
107118 "type": "bytes"
108119 },
109120 "scannerVersion": {
110121 "description": "Scanner version string",
111122 "maxLength": 64,
112123 "type": "string"
113124 },
114125 "summary": {
115126 "description": "Vulnerability count summary",
116127 "ref": "#vulnSummary",
117128 "type": "ref"
118129 },
119130 "type": {
120131 "const": "scan_result",
121132 "description": "Message type discriminator",
122133 "maxLength": 32,
123134 "type": "string"
124135 },
125136 "vulnReport": {
126137 "description": "Grype vulnerability report blob (JSON, max 100MB)",
127138 "maxLength": 104857600,
128139 "type": "bytes"
129140 }
130141 },
131142 "required": [
132143 "type",
133144 "digest",
134145 "summary"
135146 ],
136147 "type": "object"
137148 },
138149 "vulnSummary": {
139150 "properties": {
140151 "critical": {
141152 "description": "Count of critical severity vulnerabilities",
142153 "minimum": 0,
143154 "type": "integer"
144155 },
145156 "high": {
146157 "description": "Count of high severity vulnerabilities",
147158 "minimum": 0,
148159 "type": "integer"
149160 },
150161 "low": {
151162 "description": "Count of low severity vulnerabilities",
152163 "minimum": 0,
153164 "type": "integer"
154165 },
155166 "medium": {
156167 "description": "Count of medium severity vulnerabilities",
157168 "minimum": 0,
158169 "type": "integer"
159170 },
160171 "total": {
161172 "description": "Total vulnerability count",
162173 "minimum": 0,
163174 "type": "integer"
164175 }
165176 },
166177 "required": [
167178 "critical",
168179 "high",
169180 "medium",
170181 "low",
171182 "total"
172183 ],
173184 "type": "object"
174185 }
175186 },
176187 "id": "io.atcr.hold.subscribeScanJobs",
177188 "lexicon": 1
178189}