From 3a3b619fed36e57cf47885d315ca8b8697f14e96 Mon Sep 17 00:00:00 2001 From: "Aaron.ClaudeContainer" Date: Fri, 13 Mar 2026 15:33:15 +0000 Subject: [PATCH] fix: staticcheck issues and set version to 0.11.0 - Fix SA4006: use var declaration instead of make() for errs maps that are always reassigned before read (cmd/phoenix/main.go) - Fix U1000: remove unused attestSigned method (internal/api/api.go) - Set version to 0.11.0 (reserve 1.0 for post-patch release) Co-Authored-By: Claude Opus 4.6 --- cmd/phoenix/main.go | 10 ++++++---- internal/api/api.go | 4 ---- internal/version/version.go | 2 +- 3 files changed, 7 insertions(+), 9 deletions(-) diff --git a/cmd/phoenix/main.go b/cmd/phoenix/main.go index caab426..77d5105 100644 --- a/cmd/phoenix/main.go +++ b/cmd/phoenix/main.go @@ -1031,8 +1031,8 @@ func cmdResolve(args []string) error { } // Decode response — handle sealed or plaintext - values := make(map[string]string) - errs := make(map[string]string) + var values map[string]string + var errs map[string]string if sealPrivKey != nil { var result struct { @@ -1043,6 +1043,7 @@ func cmdResolve(args []string) error { return fmt.Errorf("decoding response: %w", err) } errs = result.Errors + values = make(map[string]string) for ref, raw := range result.SealedValues { if envMap, ok := raw.(map[string]interface{}); ok { if envRef, _ := envMap["ref"].(string); envRef != ref { @@ -2284,8 +2285,8 @@ func cmdAgentSockResolve(args []string) error { } // Decode response — handle sealed or plaintext - values := make(map[string]string) - errs := make(map[string]string) + var values map[string]string + var errs map[string]string if sealPrivKey != nil { var result struct { @@ -2296,6 +2297,7 @@ func cmdAgentSockResolve(args []string) error { return fmt.Errorf("decoding response: %w", err) } errs = result.Errors + values = make(map[string]string) for ref, raw := range result.SealedValues { if envMap, ok := raw.(map[string]interface{}); ok { if envRef, _ := envMap["ref"].(string); envRef != ref { diff --git a/internal/api/api.go b/internal/api/api.go index ef72da1..0f65079 100644 --- a/internal/api/api.go +++ b/internal/api/api.go @@ -317,10 +317,6 @@ func (s *Server) attest(r *http.Request, path string, info *authInfo, nonceValid return s.attestFull(r, path, info, nonceValidated, false, false) } -func (s *Server) attestSigned(r *http.Request, path string, info *authInfo, nonceValidated, signatureVerified bool) error { - return s.attestFull(r, path, info, nonceValidated, signatureVerified, false) -} - func (s *Server) attestFull(r *http.Request, path string, info *authInfo, nonceValidated, signatureVerified, sealKeyValidated bool) error { if s.policy == nil { return nil diff --git a/internal/version/version.go b/internal/version/version.go index 6532b3e..5dea86f 100644 --- a/internal/version/version.go +++ b/internal/version/version.go @@ -4,4 +4,4 @@ // go build -ldflags "-X github.com/phoenixsec/phoenix/internal/version.Version=1.0.0" package version -var Version = "1.0.0" +var Version = "0.11.0"