-
Notifications
You must be signed in to change notification settings - Fork 9
Fix build workflow failures, add workflow_dispatch trigger, and resolve merge conflicts #44
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
c1fd679
0f6b0b5
41fbafb
fa0745e
6a443e4
e352cda
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -42,17 +42,17 @@ snap: | |
| bin/linux-amd64/mdview: manpage | ||
| env GOOS=linux GOARCH=amd64 go build -buildvcs=false -ldflags "-X main.appVersion=$(VERSION)" -o ./bin/linux-amd64/mdview | ||
| cp mdview.1 bin/linux-amd64/ | ||
| tar czvf mdview-$(VERSION_SAFE)-linux-amd64.tar.gz --transform s/linux-amd64/mdview-$(VERSION_SAFE)/ -C bin linux-amd64 | ||
| tar czvf mdview-$(VERSION_SAFE)-linux-amd64.tar.gz --transform 's,^linux-amd64,mdview-$(VERSION_SAFE),' -C bin linux-amd64 | ||
|
|
||
| bin/linux-i386/mdview: | ||
| env GOOS=linux GOARCH=386 go build -buildvcs=false -ldflags "-X main.appVersion=$(VERSION)" -o ./bin/linux-i386/mdview | ||
| cp mdview.1 bin/linux-i386/ | ||
| tar czvf mdview-$(VERSION_SAFE)-linux-i386.tar.gz --transform s/linux-i386/mdview-$(VERSION_SAFE)/ -C bin linux-i386 | ||
| tar czvf mdview-$(VERSION_SAFE)-linux-i386.tar.gz --transform 's,^linux-i386,mdview-$(VERSION_SAFE),' -C bin linux-i386 | ||
|
|
||
| bin/linux-arm64/mdview: | ||
| env GOOS=linux GOARCH=arm64 go build -buildvcs=false -ldflags "-X main.appVersion=$(VERSION)" -o ./bin/linux-arm64/mdview | ||
| cp mdview.1 bin/linux-arm64/ | ||
| tar czvf mdview-$(VERSION_SAFE)-linux-arm64.tar.gz --transform s/linux-arm64/mdview-$(VERSION_SAFE)/ -C bin linux-arm64 | ||
| tar czvf mdview-$(VERSION_SAFE)-linux-arm64.tar.gz --transform 's,^linux-arm64,mdview-$(VERSION_SAFE),' -C bin linux-arm64 | ||
|
|
||
| bin/windows-amd64/mdview.exe: | ||
| env GOOS=windows GOARCH=amd64 go build -buildvcs=false -ldflags "-X main.appVersion=$(VERSION)" -o ./bin/windows-amd64/mdview.exe | ||
|
|
@@ -61,17 +61,17 @@ bin/windows-amd64/mdview.exe: | |
| bin/darwin-amd64/mdview: | ||
| env GOOS=darwin GOARCH=amd64 go build -buildvcs=false -ldflags "-X main.appVersion=$(VERSION)" -o ./bin/darwin-amd64/mdview | ||
| cp mdview.1 bin/darwin-amd64/ | ||
| tar czvf mdview-$(VERSION_SAFE)-darwin-amd64.tar.gz --transform s/darwin-amd64/mdview-$(VERSION_SAFE)/ -C bin darwin-amd64 | ||
| tar czvf mdview-$(VERSION_SAFE)-darwin-amd64.tar.gz --transform 's,^darwin-amd64,mdview-$(VERSION_SAFE),' -C bin darwin-amd64 | ||
|
|
||
| bin/darwin-arm64/mdview: | ||
| env GOOS=darwin GOARCH=arm64 go build -buildvcs=false -ldflags "-X main.appVersion=$(VERSION)" -o ./bin/darwin-arm64/mdview | ||
| cp mdview.1 bin/darwin-arm64/ | ||
| tar czvf mdview-$(VERSION_SAFE)-darwin-arm64.tar.gz --transform s/darwin-arm64/mdview-$(VERSION_SAFE)/ -C bin darwin-arm64 | ||
| tar czvf mdview-$(VERSION_SAFE)-darwin-arm64.tar.gz --transform 's,^darwin-arm64,mdview-$(VERSION_SAFE),' -C bin darwin-arm64 | ||
|
|
||
| bin/freebsd-amd64/mdview: | ||
| env GOOS=freebsd GOARCH=amd64 go build -buildvcs=false -ldflags "-X main.appVersion=$(VERSION)" -o ./bin/freebsd-amd64/mdview | ||
| cp mdview.1 bin/freebsd-amd64/mdview | ||
| tar czvf mdview-$(VERSION_SAFE)-freebsd-amd64.tar.gz --transform s/freebsd-amd64/mdview-$(VERSION_SAFE)/ -C bin freebsd-amd64 | ||
| tar czvf mdview-$(VERSION_SAFE)-freebsd-amd64.tar.gz --transform 's,^freebsd-amd64,mdview-$(VERSION_SAFE),' -C bin freebsd-amd64 | ||
|
Comment on lines
+64
to
+74
|
||
|
|
||
| clean: | ||
| rm -rf bin | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The use of
$(VERSION_SAFE)unquoted in thesetarcommands makes the build vulnerable to shell command injection ifVERSIONcan be influenced (for example via a workflowversioninput or a branch name).VERSION_SAFEonly replaces/, so characters like;,&, backticks or'can break the command line or the quoted--transformargument and execute arbitrary commands in the build environment. To mitigate this, constrainVERSION/VERSION_SAFEto a strict safe character set before using it in shell commands (or avoid shell interpretation entirely) and apply the same hardening to all similar packaging commands.