v0.2.3 — acc build CLI Regressions
Fixed - acc build CLI Regressions
This release fixes critical bugs in acc build that broke backward compatibility and SBOM generation guarantees.
Critical Fixes:
-
Positional argument handling - acc build now accepts image reference as positional argument
- Bug:
acc build demo-app:oksilently ignored positional argument, exited 0 without SBOM - Root Cause: CLI command didn't parse
args, only accepted--tagflag - Fix: Accept both
acc build demo-app:ok(positional) andacc build --tag demo-app:ok(flag) - Impact: Restores v0.1.x backward compatibility for automation scripts
- Code:
cmd/acc/main.go:114-163- NewBuildCmd with args support
- Bug:
-
SBOM generation guarantee - Build now verifies SBOM file exists or fails explicitly
- Bug: acc build could exit successfully without creating SBOM file
- Root Cause: No verification that SBOM file actually existed after syft command
- Fix: Added explicit file existence check after generateSBOM
- Impact: Build ALWAYS produces SBOM or fails with clear error
- Code:
internal/build/build.go:81-84- SBOM file verification
-
Help text and examples - Added usage examples to acc build --help
- Bug: Help text lacked examples, unclear that --tag was accepted
- Fix: Added examples showing both positional and flag usage
- Impact: Users can discover correct syntax via --help
- Code:
cmd/acc/main.go:121-126- Example usage in help
Positional Argument Behavior:
# All these work now:
acc build demo-app:ok # positional argument
acc build --tag demo-app:ok # flag syntax
acc build -t demo-app:ok # short flag
# If both provided, --tag takes precedence with warning
acc build demo-app:ok --tag other:latest # Uses other:latestSBOM Guarantee:
- If
acc buildexits 0, SBOM MUST exist in.acc/sbom/ - If SBOM can't be generated (syft missing, syft fails), build exits non-zero
- Build logs show explicit "Generating SBOM..." and success/failure
Regression Tests Added:
TestDetectBuildTool- Verifies build tool detection with clear errorsTestBuild_SBOMVerification- Verifies SBOM exists after successful buildTestGenerateSBOM_Contract- Verifies generateSBOM creates file or errorsTestSBOMPath_Consistency- Verifies SBOM path is predictable
Files Changed:
cmd/acc/main.go- Accept positional args, add examples to helpinternal/build/build.go- Add SBOM file verification, improve logginginternal/build/build_test.go- New file with 4 regression tests
Breaking Changes: None - changes restore v0.1.x compatibility
Installation
Download the appropriate binary for your platform and verify the checksum:
Linux (AMD64):
curl -LO "https://github.com/cloudcwfranck/acc/releases/download/v0.2.3/acc_0.2.3_linux_amd64.tar.gz"
curl -LO "https://github.com/cloudcwfranck/acc/releases/download/v0.2.3/checksums.txt"
sha256sum -c checksums.txt --ignore-missing
tar -xzf acc_0.2.3_linux_amd64.tar.gz
sudo mv acc-linux-amd64 /usr/local/bin/acc
chmod +x /usr/local/bin/acc
acc versionmacOS (Apple Silicon):
curl -LO "https://github.com/cloudcwfranck/acc/releases/download/v0.2.3/acc_0.2.3_darwin_arm64.tar.gz"
curl -LO "https://github.com/cloudcwfranck/acc/releases/download/v0.2.3/checksums.txt"
shasum -a 256 -c checksums.txt --ignore-missing
tar -xzf acc_0.2.3_darwin_arm64.tar.gz
sudo mv acc-darwin-arm64 /usr/local/bin/acc
chmod +x /usr/local/bin/acc
acc versionSee README.md for complete installation instructions.