Changelog-Fixed: Replacing sed by $(SED) in Makefile
What changed, and why it matters
This is a tiny build-system cleanup: the Makefile now uses a variable named $(SED) instead of directly calling the 'sed' command. It does not change what the software does, only how the build system refers to the sed tool. There is no security issue visible in this change.
No security action needed. Treat as a normal build-system maintenance commit.
Security signals we found
No strong security signals were identified.
Evidence from the diff
The commit replaces two literal invocations of ‘sed’ in the top-level Makefile with the make variable ‘$(SED)’. This is a portability/maintainability improvement (e.g., allowing a build environment to override which sed binary is used). The affected commands extract the version string from the current directory name and parse the major version from ‘openssl version’. No functional or security-relevant logic is altered.
Changed components
MakefileInspect captured patch +2 / −2
diff --git a/Makefile b/Makefile
index 3c7d7831..6576f693 100644
--- a/Makefile
+++ b/Makefile
@@ -3,7 +3,7 @@
# Prefer VERSION from environment if provided (e.g., from GitHub Actions)
# Extract version from git, or if we're from a zipfile, use dirname
VERSION ?= $(shell git describe --tags --always --dirty=-modded --abbrev=7 2>/dev/null || \
- pwd | sed -n 's|.*/c\{0,1\}lightning-v\{0,1\}\([0-9a-f.rc\-]*\)$$|v\1|gp')
+ pwd | $(SED) -n 's|.*/c\{0,1\}lightning-v\{0,1\}\([0-9a-f.rc\-]*\)$$|v\1|gp')
$(info Building version $(VERSION))
# Next release.
@@ -412,7 +412,7 @@ include plugins/Makefile
include tests/plugins/Makefile
# Only include fuzz tests if OpenSSL >= 3.0, will be disabled on ubuntu focal
-OPENSSL_VERSION := $(shell openssl version | sed -n 's/OpenSSL \([0-9]\+\)\..*/\1/p')
+OPENSSL_VERSION := $(shell openssl version | $(SED) -n 's/OpenSSL \([0-9]\+\)\..*/\1/p')
ifneq ($(shell test $(OPENSSL_VERSION) -ge 3 && echo yes),)
include tests/fuzz/Makefile
endif
Why this scored 15/100
Community notes
Notes can correct, qualify, or add evidence to the AI analysis. Every note shown here has been validated by a human moderator.
The AI analysis stands alone for now. Submit a note if you can add evidence or important context.