From 88d991f22642ea47c61a6300bdcd5219b34022e8 Mon Sep 17 00:00:00 2001 From: Andrei Lepikhov Date: Thu, 24 Sep 2026 09:14:19 +0200 Subject: [PATCH 1/2] Remove Windows support ACE now supports Linux and macOS only. This is a breaking change for users who run ACE on Windows or download the Windows release archives. The helpers in pkg/common/secure_file.go make output files owner-only with POSIX mode bits. On Windows, os.Chmod does not change the ACLs, so other local users could read reports that contain table rows. - GoReleaser does not build Windows binaries and does not make .zip archives any more. - pkg/common/secure_file_windows.go stops the build on Windows, so "go install" and "go build" cannot make an unsafe binary there. - The install guide says that ACE supports Linux and macOS only, and tells Windows users to run ACE in WSL or in the container image, with the output directory on the Linux file system. --- .goreleaser.yaml | 5 ----- docs/install.md | 10 +++++++--- pkg/common/secure_file.go | 4 ++++ pkg/common/secure_file_windows.go | 21 +++++++++++++++++++++ 4 files changed, 32 insertions(+), 8 deletions(-) create mode 100644 pkg/common/secure_file_windows.go diff --git a/.goreleaser.yaml b/.goreleaser.yaml index eafa225b..32e434ab 100644 --- a/.goreleaser.yaml +++ b/.goreleaser.yaml @@ -14,7 +14,6 @@ builds: goos: - linux - darwin - - windows goarch: - amd64 - arm64 @@ -33,10 +32,6 @@ archives: wrap_in_directory: "ace-{{ .Version }}" - format_overrides: - - goos: windows - formats: [zip] - changelog: sort: asc filters: diff --git a/docs/install.md b/docs/install.md index ab7ced7b..74a441a5 100644 --- a/docs/install.md +++ b/docs/install.md @@ -1,5 +1,10 @@ # Installing ACE +ACE supports Linux and macOS only. It does not build on Windows. On a +Windows host, run ACE in WSL or in the container image. Keep its output +directory on the Linux file system, not on a Windows drive: ACE protects +reports with POSIX file modes, and Windows drives do not keep them. + Choose the option that fits your environment: - Go install (fastest if you have Go toolchains) @@ -30,7 +35,7 @@ Grab the prebuilt archive for your platform from GitHub Releases and unpack the ```sh ACE_VER=v1.9.0 # update to the latest tag from GitHub Releases -OS=Linux # or Darwin or Windows +OS=Linux # or Darwin ARCH=x86_64 # or arm64 curl -fsSL "https://github.com/pgedge/ace/releases/download/${ACE_VER}/ace_${OS}_${ARCH}.tar.gz" -o /tmp/ace.tgz @@ -39,8 +44,7 @@ sudo install -m 0755 /tmp/ace/ace /usr/local/bin/ace ``` Notes: -- macOS uses `Darwin`; Windows archives are `.zip`. -- On Windows, place `ace.exe` somewhere on your `PATH` (e.g., `%USERPROFILE%\\bin`). +- macOS uses `Darwin`. ## Run with Docker/Podman diff --git a/pkg/common/secure_file.go b/pkg/common/secure_file.go index 22fb78db..bd9fe43c 100644 --- a/pkg/common/secure_file.go +++ b/pkg/common/secure_file.go @@ -21,6 +21,10 @@ import ( // only *request* a mode, which the umask then masks off — under the usual 0022 // that lands at 0644, readable by every local user. These helpers set the mode // explicitly so it does not depend on the operator's umask. +// +// Owner-only access here comes from POSIX mode bits. On Windows, os.Chmod +// does not change the ACLs, so these helpers would not protect the files. +// For this reason ACE does not build on Windows: see secure_file_windows.go. const ( SecureFileMode os.FileMode = 0o600 SecureDirMode os.FileMode = 0o700 diff --git a/pkg/common/secure_file_windows.go b/pkg/common/secure_file_windows.go new file mode 100644 index 00000000..856a698a --- /dev/null +++ b/pkg/common/secure_file_windows.go @@ -0,0 +1,21 @@ +// /////////////////////////////////////////////////////////////////////////// +// +// # ACE - Active Consistency Engine +// +// Copyright (C) 2023 - 2026, pgEdge (https://www.pgedge.com/) +// +// This software is released under the PostgreSQL License: +// https://opensource.org/license/postgresql +// +// /////////////////////////////////////////////////////////////////////////// + +//go:build windows + +package common + +// ACE does not support Windows. The helpers in secure_file.go protect +// output files with POSIX mode bits, and Windows does not use them for +// access control: other local users could read reports that contain +// table rows. This reference to an undefined name stops the build on +// Windows, so nobody gets an unsafe binary by accident. +var _ = ACE_does_not_support_Windows From 1856b01bfad4e103480e59c27ff6576b16950823 Mon Sep 17 00:00:00 2001 From: Andrei Lepikhov Date: Thu, 24 Sep 2026 09:49:47 +0200 Subject: [PATCH 2/2] Warn about reports left by earlier Windows builds Reports written by earlier Windows builds keep their Windows ACLs after a move to WSL. The install guide now tells users to delete them or to restrict their ACLs by hand. --- docs/install.md | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/docs/install.md b/docs/install.md index 74a441a5..5dfb5adf 100644 --- a/docs/install.md +++ b/docs/install.md @@ -5,6 +5,10 @@ Windows host, run ACE in WSL or in the container image. Keep its output directory on the Linux file system, not on a Windows drive: ACE protects reports with POSIX file modes, and Windows drives do not keep them. +Reports written by earlier Windows builds keep their Windows ACLs, even +after you move ACE to WSL. Other local users may be able to read the +table rows in them. Delete these reports, or restrict their ACLs by hand. + Choose the option that fits your environment: - Go install (fastest if you have Go toolchains)