English fallback
This translation is missing; the canonical English reference follows.
Experimental governed local Docker export¶
PlanLocalImageExport creates a pure source descriptor without filesystem reads, scope mutation or process execution. ExportLocalImage requires independently registered source scope, current permission and explicit SAFE workflow approval. It inspects the original local reference, saves only its immutable config ID, verifies original Docker-save bytes and rechecks the original reference.
LocalImageExportSummary returns an accepted archive pin only after a terminal completed job and an exact typed workspace Save acknowledgement followed by exact expected-revision readback. Suppressed, stale, wrong or lost acknowledgements retain explicit uncertainty and expose no accepted pin. A file left after failed acknowledgement does not establish export acceptance. The canonical model is unchanged by export.
Use a separate scope, native Trivy permission and workflow approval to scan the resulting archive. The optional expected_image_identity is checked against fresh Metadata.ImageID before candidate projection or model Save. Low-level LocalImageExportWorkflow and its persistence/lifecycle helpers are Internal. Genuine daemon/provider acceptance is a distinct CI requirement; source or inert tests alone do not establish it.
See docs/LOCAL_IMAGE_REFERENCE.md and ADR 0114.
fuzzy1337.local_image_workflow
¶
Explicit local-reference export jobs; generated archive scans require separate authority.
LocalImageExportPlan
dataclass
¶
Pure selected source descriptor; neither a scope registration nor an execution grant.
源代码位于: fuzzy1337/local_image_workflow.py
65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 | |
ToDict() -> dict[str, object]
¶
Render the exact source target and explicit two-phase authority requirement.
返回:
| 类型 | 描述 |
|---|---|
dict[str, object]
|
Detached selected descriptor without reading files or contacting Docker. |
源代码位于: fuzzy1337/local_image_workflow.py
71 72 73 74 75 76 77 78 79 80 81 82 | |
LocalImageExportSummary
dataclass
¶
Actual job outcome; archive pins are exposed only after confirmed workspace persistence.
源代码位于: fuzzy1337/local_image_workflow.py
100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 | |
ExitCode() -> int
¶
Return zero only for an acknowledged completed export.
返回:
| 类型 | 描述 |
|---|---|
int
|
Zero for completion, three for authority, four for failure, or 130 for cancellation. |
源代码位于: fuzzy1337/local_image_workflow.py
109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 | |
ToDict() -> dict[str, object]
¶
Render factual export results without presenting an export as a scan.
返回:
| 类型 | 描述 |
|---|---|
dict[str, object]
|
Terminal job, original records and accepted archive/config identities if confirmed. |
源代码位于: fuzzy1337/local_image_workflow.py
126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 | |
LocalImageExportWorkflow
dataclass
¶
One original inspect/export/recheck job preserving current authority and raw evidence.
源代码位于: fuzzy1337/local_image_workflow.py
152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 | |
Context() -> ArtifactPolicyContext
¶
Reopen current source scope and explicit fresh policy without implicit permissions.
返回:
| 类型 | 描述 |
|---|---|
ArtifactPolicyContext
|
Same-store current authority and selected executing actor. |
源代码位于: fuzzy1337/local_image_workflow.py
170 171 172 173 174 175 176 177 178 179 180 181 | |
Persist(context: JobContext, validate: Callable[[], None] | None = None) -> None
¶
Attempt one CAS preserving original workspace, model and actual retained acquisitions.
参数:
| 名称 | 类型 | 描述 | 默认 |
|---|---|---|---|
context
|
JobContext
|
Original owning job context. |
必需 |
validate
|
Callable[[], None] | None
|
Fresh final acceptance gate, absent only during failed-job evidence cleanup. |
None
|
源代码位于: fuzzy1337/local_image_workflow.py
183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 | |
Run(context: JobContext) -> None
async
¶
Execute three bounded commands and publish one separately scoped immutable archive.
参数:
| 名称 | 类型 | 描述 | 默认 |
|---|---|---|---|
context
|
JobContext
|
Shared job owner of cancellation, events and original evidence. |
必需 |
引发:
| 类型 | 描述 |
|---|---|
JobError
|
Current authority, provider, acceptance or persistence refuses completion. |
源代码位于: fuzzy1337/local_image_workflow.py
226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 | |
PlanLocalImageExport(selection: LocalImageSelection) -> LocalImageExportPlan
¶
Describe one explicit local source without filesystem reads or daemon access.
参数:
| 名称 | 类型 | 描述 | 默认 |
|---|---|---|---|
selection
|
LocalImageSelection
|
Exact typed source and selected read-consent declaration. |
必需 |
返回:
| 类型 | 描述 |
|---|---|
LocalImageExportPlan
|
Pure selected source plan without creating scope, claims or scratch. |
源代码位于: fuzzy1337/local_image_workflow.py
85 86 87 88 89 90 91 92 93 94 95 96 97 | |
ExportLocalImage(selection: LocalImageSelection, scope_id: str, owner_reference: str, policy_provider: Callable[[], ImpactPolicy], *, approve_local_image: bool = False, on_event: Callable[[JobEvent], None] | None = None, clock: Callable[[], datetime] = UtcNow) -> LocalImageExportSummary
async
¶
Run an explicitly approved local export without authorizing the generated archive scan.
参数:
| 名称 | 类型 | 描述 | 默认 |
|---|---|---|---|
selection
|
LocalImageSelection
|
Exact trusted executable, local reference, Unix endpoint and owning workspace. |
必需 |
scope_id
|
str
|
Already registered exact source descriptor scope. |
必需 |
owner_reference
|
str
|
Actor matching the explicit selected read consent. |
必需 |
policy_provider
|
Callable[[], ImpactPolicy]
|
Fresh typed source permission supplier. |
必需 |
approve_local_image
|
bool
|
Exact explicit SAFE workflow approval, independent of policy. |
False
|
on_event
|
Callable[[JobEvent], None] | None
|
Optional fast unchanged canonical event consumer. |
None
|
clock
|
Callable[[], datetime]
|
Trusted aware authority clock. |
UtcNow
|
返回:
| 类型 | 描述 |
|---|---|
LocalImageExportSummary
|
Actual terminal job and accepted archive only after confirmed workspace persistence. |
源代码位于: fuzzy1337/local_image_workflow.py
376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 | |