Skip to content

feat: add White Security Specification for container security management - #4

Merged
garnizeh merged 2 commits into
mainfrom
p1/1.2-drawing
Apr 8, 2026
Merged

feat: add White Security Specification for container security management#4
garnizeh merged 2 commits into
mainfrom
p1/1.2-drawing

Conversation

@garnizeh

@garnizeh garnizeh commented Apr 8, 2026

Copy link
Copy Markdown
Owner

This pull request introduces several improvements to the CI/CD pipeline, updates documentation to require Go 1.26.2, and adds automation for releases. The most significant changes include restricting CI runs to the main branch, adding a Release Please workflow for automated versioning and changelog management, and ensuring the Go version is embedded in build artifacts. Additionally, the documentation and roadmap have been updated to reflect the new Go version requirement.

CI/CD Pipeline Improvements

  • The CI workflow (.github/workflows/ci.yml) now only runs on pushes and pull requests targeting the main branch, reducing unnecessary CI runs on pattern-matched branches.
  • The Codecov coverage upload step has been removed from the CI workflow, simplifying the process and eliminating an external dependency.
  • The vulnerability scan step in CI now uses the make vuln target, centralizing the command in the Makefile for consistency. [1] [2]
  • The ci-local target in the Makefile was refactored to use existing Makefile targets for linting, vulnerability scanning, testing, and building, reducing duplication.

Release Automation

  • Added a new Release Please workflow (.github/workflows/release-please.yml) to automate versioning and changelog generation, along with its manifest file (.release-please-manifest.json). [1] [2]
  • The release workflow now captures the Go version used during the build and injects it into the build artifacts via the GOVERSION environment variable and linker flags. [1] [2] [3]

Documentation Updates

  • All documentation references to the required Go version have been updated from 1.26.1+ to 1.26.2+, including README.md, docs/design-document.md, and docs/roadmap.md. [1] [2] [3] [4]
  • The roadmap date was updated to 2026-02-01.

Other Minor Changes

Summary by CodeRabbit

  • New Features

    • Added maestro image commands: pull (with --platform support), ls, inspect, history, and rm for full image lifecycle management.
    • Implemented maestro login and logout for container registry authentication.
    • Added pull progress reporting showing layer download status and completion summaries.
    • Introduced local image metadata tracking (creation date, size, digest) and history inspection.
    • Integrated registry resilience with retry logic and circuit breaker protection.
  • Chores

    • Bumped Go toolchain to 1.26.2 across build and CI configurations.
    • Updated dependencies and added release automation via GitHub Actions.

garnizeh added 2 commits April 8, 2026 00:03
- Introduced a comprehensive specification document detailing security features including user namespace management, seccomp profiles, capabilities, AppArmor/SELinux integration, and image signing.
- Implemented requirements and scenarios for rootless container setup, seccomp defaults, capability management, and security diagnostics.

chore: configure release-please for automated versioning

- Added release-please configuration to manage versioning and changelog generation.

test: add utility functions for testing with OCI registries

- Created test utilities for pushing random and multi-platform images to an in-process OCI registry.
- Implemented helper functions for managing test registries and generating fake digests.
@coderabbitai

coderabbitai Bot commented Apr 8, 2026

Copy link
Copy Markdown
📝 Walkthrough

Walkthrough

This PR implements core OCI image management functionality for Maestro, including a registry client (Shardik), local content-addressable storage (Maturin), credential handling (Sigul), HTTP resilience (Horn), CLI commands for image operations (pull, login, logout, image ls/inspect/history/rm), and comprehensive specification documents defining system architecture.

Changes

Cohort / File(s) Summary
CI and Release Workflows
.github/workflows/ci.yml, .github/workflows/release-please.yml, .github/workflows/release.yml, .goreleaser.yml, release-please-config.json, .release-please-manifest.json
Updated CI triggers to main-branch-only, added Release Please workflow for automated versioning, exposed Go version to GoReleaser config, and configured release manifest.
Go Module and Toolchain
go.mod
Bumped Go toolchain from 1.26.1 to 1.26.2; reorganized dependencies, promoting key packages (containerregistry, cobra, zerolog, yaml) to direct requirements while removing charm-land deps and updating container registry stack.
Documentation Updates
README.md, docs/design-document.md, docs/roadmap.md
Updated Go version requirements from 1.26.1 to 1.26.2, normalized formatting in design doc, updated roadmap phases with completion tracking and CI version targets.
Makefile and Build Configuration
Makefile
Added vuln target running govulncheck, refactored ci-local to delegate to Make sub-targets, updated .PHONY declarations.
Image Storage Backend (Maturin)
internal/maturin/store.go, internal/maturin/manifests.go, internal/maturin/image_info.go, internal/maturin/drawing.go, internal/maturin/index.go, internal/maturin/keystone.go, internal/maturin/progress.go
Implemented content-addressable blob storage with SHA256 verification, manifest/tag resolution via symlinks, image listing/inspection/history/removal, image pulling with layer deduplication and platform selection, OCI index management with atomic updates and flock-based locking, and multi-platform descriptor selection.
Maturin Tests
internal/maturin/{store,manifests,image_info,drawing,index,keystone}_test.go, internal/maturin/{store,image_info,drawing,index,keystone}_internal_test.go
Comprehensive test coverage for blob storage, manifest operations, image metadata, drawing/pulling, index concurrency, platform selection, and error scenarios.
Registry Client (Shardik)
internal/shardik/shardik.go, internal/shardik/sigul.go, internal/shardik/horn.go, internal/shardik/thinny.go, internal/shardik/errors.go, internal/shardik/transport.go
Implemented OCI-compliant registry client with manifest/image/index/blob fetching, credential resolution chain (CLI flags > env > auth.json > Docker keychain > anonymous), HTTP retry+circuit-breaker resilience, mirror/proxy resolution, and insecure transport support.
Shardik Tests
internal/shardik/{shardik,sigul,horn,thinny}_test.go, internal/shardik/sigul_internal_test.go
Integration and unit tests for registry operations, credential flows, retry/circuit-breaker behavior, mirror resolution, and error cases.
Image CLI Commands
internal/cli/cmd_image.go, internal/cli/cmd_pull.go, internal/cli/cmd_login.go, internal/cli/progress.go
Added image commands (ls/inspect/history/rm with format support), pull with progress tracking, login/logout for registry auth, and progress reporting with byte-size formatting and concurrency safety.
CLI Tests
internal/cli/{cmd_image,cmd_pull,cmd_login,progress}_internal_test.go, internal/cli/progress_internal_test.go
Comprehensive CLI tests covering image operations, pull mechanics, login/logout flows, progress output, and helper functions; includes format validation, error propagation, and quiet-mode behavior.
CLI Command Wiring
internal/cli/cmd_groups.go, internal/cli/cmd_shortcuts.go, internal/cli/cmd_version.go, internal/cli/root_test.go
Wired new image/login/logout/pull commands into command groups, removed obsolete stub shortcuts, updated version command to use format constants, removed stub-command tests.
Test Utilities
test/testutil/registry.go, test/testutil/fixture.go
Added in-process test registry helper and fixture functions for pushing random/multi-platform images to test registries.
Specification Documents
openspec/config.yaml, openspec/schemas/maestro/..., openspec/specs/{dinh-cli,beam-network,eld-runtime,gan-lifecycle,glass-tui,maturin-image,positronics-api,prim-storage,rose-artifact,shardik-registry,tower-engine,waystation-state,white-security}/spec.md, openspec/changes/{p1-1.1-tower-rises,p1-1.2-drawing}.md
Added comprehensive OpenSpec framework with schemas, templates, and detailed specifications covering CLI, networking, runtime, image management, registry, state storage, security, and milestone change documentation.

Sequence Diagram(s)

sequenceDiagram
    actor User as User/CLI
    participant CLI as Image Commands
    participant Maturin as Maturin<br/>(Storage)
    participant Shardik as Shardik<br/>(Registry Client)
    participant Registry as Remote<br/>Registry
    participant Sigul as Sigul<br/>(Credentials)

    User->>CLI: maestro pull nginx:latest
    CLI->>Sigul: Resolve credentials for docker.io
    Sigul-->>CLI: Auth token
    CLI->>Shardik: GetManifest(nginx:latest)
    Shardik->>Registry: Fetch manifest
    Registry-->>Shardik: Manifest descriptor
    Shardik-->>CLI: Manifest
    CLI->>Shardik: GetImage(manifest)
    Shardik->>Registry: Fetch config blob
    Registry-->>Shardik: Config
    Shardik-->>CLI: Image with layers
    CLI->>Maturin: Draw(image, layers)
    loop For each layer
        Maturin->>Maturin: Check if blob exists
        alt Blob exists
            Maturin-->>CLI: Progress(skipped)
        else Blob missing
            Maturin->>Shardik: GetBlob(layer digest)
            Shardik->>Registry: Download layer
            Registry-->>Shardik: Layer data
            Shardik-->>Maturin: Layer stream
            Maturin->>Maturin: Verify SHA256 digest
            Maturin->>Maturin: Store blob in CAS
            Maturin-->>CLI: Progress(pulled, size)
        end
    end
    Maturin->>Maturin: Finalize manifest & index
    Maturin-->>CLI: Success
    CLI-->>User: Pull complete
Loading

Estimated code review effort

🎯 5 (Critical) | ⏱️ ~120 minutes

The PR implements substantial, interdependent subsystems (image storage, registry client, credential handling, HTTP resilience) with complex logic including concurrent access control, cryptographic operations, atomic file I/O, and multi-platform selection. High logic density across heterogeneous components requires careful validation of correctness for digest verification, locking behavior, error handling, and API consistency.

Possibly related PRs

Poem

🐰 Nibbling through the specs, I see
Images pulled with symphony,
Blobs stored safe in CAS array,
Credentials resolved the Sigul way!
Docker Hub to storage deep,
Platform choice, your promises keep. 🏃‍♂️✨

✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch p1/1.2-drawing

@garnizeh garnizeh changed the title P1/1.2 drawing feat: add White Security Specification for container security management Apr 8, 2026
@garnizeh
garnizeh merged commit c97cdbe into main Apr 8, 2026
5 of 6 checks passed
@garnizeh
garnizeh deleted the p1/1.2-drawing branch April 8, 2026 03:27
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.

1 participant