Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
64 commits
Select commit Hold shift + click to select a range
b183f77
Bump github.com/essentialkaos/ek/v13 in the all group
dependabot[bot] May 20, 2025
dc6b30d
Merge pull request #243 from essentialkaos/dependabot/go_modules/deve…
andyone May 22, 2025
606c5ed
Bump github.com/essentialkaos/ek/v13 in the all group
dependabot[bot] May 23, 2025
d409828
Merge pull request #244 from essentialkaos/dependabot/go_modules/deve…
andyone May 23, 2025
15f6d81
Bump github.com/essentialkaos/ek/v13 in the all group
dependabot[bot] May 26, 2025
4baf5b7
Merge pull request #245 from essentialkaos/dependabot/go_modules/deve…
andyone May 27, 2025
c23eaa2
Bump github.com/essentialkaos/ek/v13 in the all group
dependabot[bot] Jun 6, 2025
3e47cbd
Merge pull request #246 from essentialkaos/dependabot/go_modules/deve…
andyone Jun 17, 2025
0241d11
Bump github.com/essentialkaos/ek/v13 in the all group
dependabot[bot] Jun 18, 2025
dd6a16d
Merge pull request #247 from essentialkaos/dependabot/go_modules/deve…
andyone Jun 18, 2025
2c832d8
Bump github.com/essentialkaos/ek/v13 in the all group
dependabot[bot] Jul 16, 2025
ce937fb
Merge pull request #248 from essentialkaos/dependabot/go_modules/deve…
andyone Jul 16, 2025
c2fc89d
Bump github.com/essentialkaos/ek/v13 in the all group
dependabot[bot] Jul 21, 2025
9e48fc2
Merge pull request #249 from essentialkaos/dependabot/go_modules/deve…
andyone Jul 21, 2025
72c08f2
Bump github.com/essentialkaos/ek/v13 in the all group
dependabot[bot] Jul 28, 2025
691b290
Merge pull request #250 from essentialkaos/dependabot/go_modules/deve…
andyone Jul 30, 2025
0a3badd
Bump github.com/essentialkaos/ek/v13 in the all group
dependabot[bot] Jul 31, 2025
1234d8c
Merge pull request #251 from essentialkaos/dependabot/go_modules/deve…
andyone Jul 31, 2025
89feac8
Bump github.com/essentialkaos/ek/v13 in the all group
dependabot[bot] Aug 1, 2025
4459675
Merge pull request #252 from essentialkaos/dependabot/go_modules/deve…
andyone Aug 1, 2025
21f9c1c
Bump github.com/essentialkaos/sslscan/v14 in the all group
dependabot[bot] Aug 4, 2025
db46a63
Merge pull request #253 from essentialkaos/dependabot/go_modules/deve…
andyone Aug 4, 2025
4a4204e
Regenerate Makefile with the latest version of gomakegen
andyone Aug 4, 2025
5bf62e0
Bump github.com/essentialkaos/ek/v13 in the all group
dependabot[bot] Aug 7, 2025
dda1033
Merge pull request #254 from essentialkaos/dependabot/go_modules/deve…
andyone Aug 8, 2025
cf723ec
Bump actions/checkout from 4 to 5
dependabot[bot] Aug 12, 2025
cee9594
Merge pull request #255 from essentialkaos/dependabot/github_actions/…
andyone Aug 12, 2025
f54864b
Bump actions/setup-go from 5 to 6
dependabot[bot] Sep 5, 2025
568cb47
Merge pull request #256 from essentialkaos/dependabot/github_actions/…
andyone Sep 5, 2025
f55d398
Bump github.com/essentialkaos/ek/v13 in the all group
dependabot[bot] Sep 11, 2025
75ca018
Merge pull request #257 from essentialkaos/dependabot/go_modules/deve…
andyone Sep 11, 2025
7a0f7c7
Bump github.com/essentialkaos/ek/v13 in the all group
dependabot[bot] Sep 16, 2025
8b9a845
Merge pull request #258 from essentialkaos/dependabot/go_modules/deve…
andyone Sep 16, 2025
a93ecfa
Bump github.com/essentialkaos/ek/v13 in the all group
dependabot[bot] Sep 17, 2025
75875ad
Merge pull request #259 from essentialkaos/dependabot/go_modules/deve…
andyone Sep 17, 2025
3db6572
Bump github.com/essentialkaos/ek/v13 in the all group
dependabot[bot] Sep 26, 2025
e46f0c5
Merge pull request #260 from essentialkaos/dependabot/go_modules/deve…
andyone Sep 26, 2025
2de7faf
Bump github/codeql-action from 3 to 4
dependabot[bot] Oct 8, 2025
ee492f9
Bump github.com/essentialkaos/ek/v13 in the all group
dependabot[bot] Oct 8, 2025
bed14e9
Merge pull request #261 from essentialkaos/dependabot/github_actions/…
andyone Oct 8, 2025
3198b4d
Merge pull request #262 from essentialkaos/dependabot/go_modules/deve…
andyone Oct 8, 2025
9137dd8
Merge branch 'develop' of github.com:essentialkaos/sslcli into develop
andyone Nov 11, 2025
e6be60a
Dependencies update
andyone Nov 11, 2025
92e9575
Bump github.com/essentialkaos/ek/v13 in the all group
dependabot[bot] Nov 13, 2025
7aaab57
Merge pull request #264 from essentialkaos/dependabot/go_modules/deve…
andyone Nov 14, 2025
801634c
Bump actions/checkout from 5 to 6
dependabot[bot] Nov 21, 2025
b5b51b2
Merge pull request #265 from essentialkaos/dependabot/github_actions/…
andyone Nov 21, 2025
03af22d
Bump github.com/essentialkaos/ek/v13 in the all group
dependabot[bot] Nov 24, 2025
9918ffa
Merge pull request #266 from essentialkaos/dependabot/go_modules/deve…
andyone Dec 15, 2025
1d34863
Bump github.com/essentialkaos/ek/v13 in the all group
dependabot[bot] Dec 16, 2025
811ccad
Merge pull request #267 from essentialkaos/dependabot/go_modules/deve…
andyone Dec 16, 2025
a8a4b7e
Bump github.com/essentialkaos/ek/v13 in the all group
dependabot[bot] Jan 8, 2026
dc30506
Merge pull request #268 from essentialkaos/dependabot/go_modules/deve…
andyone Jan 12, 2026
726e355
Bump github.com/essentialkaos/ek/v13 in the all group
dependabot[bot] Jan 14, 2026
1bc3e87
Merge pull request #269 from essentialkaos/dependabot/go_modules/deve…
andyone Jan 14, 2026
230a8d2
Bump github.com/essentialkaos/ek/v13 in the all group
dependabot[bot] Jan 16, 2026
43ac073
Merge pull request #270 from essentialkaos/dependabot/go_modules/deve…
andyone Jan 16, 2026
771f26a
Bump github.com/essentialkaos/ek/v13 in the all group
dependabot[bot] Jan 20, 2026
4b95ef8
Merge pull request #271 from essentialkaos/dependabot/go_modules/deve…
andyone Jan 20, 2026
be76a77
Add self-update feature
andyone Jan 20, 2026
e42c332
Update copyright header
andyone Jan 20, 2026
1eb35e6
Update minimal required version of Go
andyone Jan 20, 2026
ebfd79d
Migrate to Alpine 3.23
andyone Jan 20, 2026
7f77b49
Code refactoring
andyone Jan 20, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions .docker/alpine.docker
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ ARG REGISTRY="ghcr.io"

## BUILDER #####################################################################

FROM ${REGISTRY}/essentialkaos/golang:alpine3.21 AS builder
FROM ${REGISTRY}/essentialkaos/golang:alpine3.23 AS builder

WORKDIR /go/src/github.com/essentialkaos/sslcli

Expand All @@ -14,7 +14,7 @@ RUN make deps && make all

## FINAL IMAGE #################################################################

FROM ${REGISTRY}/essentialkaos/alpine:3.21
FROM ${REGISTRY}/essentialkaos/alpine:3.23 AS final

LABEL org.opencontainers.image.title="sslcli" \
org.opencontainers.image.description="Pretty awesome command-line client for public SSLLabs API" \
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/cd-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ jobs:

steps:
- name: Checkout
uses: actions/checkout@v4
uses: actions/checkout@v6
with:
fetch-depth: 0

Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/ci-pr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ jobs:

steps:
- name: Checkout
uses: actions/checkout@v4
uses: actions/checkout@v6

- name: Login to DockerHub
uses: docker/login-action@v3
Expand Down
14 changes: 7 additions & 7 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,10 +19,10 @@ jobs:

steps:
- name: Checkout
uses: actions/checkout@v4
uses: actions/checkout@v6

- name: Set up Go
uses: actions/setup-go@v5
uses: actions/setup-go@v6
with:
go-version: ${{ matrix.go }}

Expand All @@ -40,10 +40,10 @@ jobs:

steps:
- name: Checkout
uses: actions/checkout@v4
uses: actions/checkout@v6

- name: Set up Go
uses: actions/setup-go@v5
uses: actions/setup-go@v6
with:
go-version: 'stable'

Expand All @@ -64,7 +64,7 @@ jobs:

steps:
- name: Code checkout
uses: actions/checkout@v4
uses: actions/checkout@v6

- name: Login to GitHub Container Registry
uses: docker/login-action@v3
Expand All @@ -86,7 +86,7 @@ jobs:

steps:
- name: Checkout
uses: actions/checkout@v4
uses: actions/checkout@v6

- name: Check dockerfiles with Hadolint
uses: essentialkaos/hadolint-action@v1
Expand All @@ -101,7 +101,7 @@ jobs:

steps:
- name: Checkout
uses: actions/checkout@v4
uses: actions/checkout@v6

- name: Check spelling
uses: crate-ci/typos@master
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/codeql.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,14 +20,14 @@ jobs:

steps:
- name: Checkout repository
uses: actions/checkout@v4
uses: actions/checkout@v6
with:
fetch-depth: 2

- name: Initialize CodeQL
uses: github/codeql-action/init@v3
uses: github/codeql-action/init@v4
with:
languages: go

- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@v3
uses: github/codeql-action/analyze@v4
10 changes: 5 additions & 5 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
################################################################################

# This Makefile generated by GoMakeGen 3.3.2 using next command:
# This Makefile generated by GoMakeGen 3.3.3 using next command:
# gomakegen --mod .
#
# More info: https://kaos.sh/gomakegen
Expand Down Expand Up @@ -123,15 +123,15 @@ clean: ## Remove generated files
@rm -f sslcli

help: ## Show this info
@echo -e '\n\033[1mTargets:\033[0m\n'
@printf '\n\033[1mTargets:\033[0m\n\n'
@grep -E '^[a-zA-Z_-]+:.*?## .*$$' $(MAKEFILE_LIST) \
| awk 'BEGIN {FS = ":.*?## "}; {printf " \033[33m%-9s\033[0m %s\n", $$1, $$2}'
@echo -e '\n\033[1mVariables:\033[0m\n'
@printf '\n\033[1mVariables:\033[0m\n\n'
@grep -E '^ifdef [A-Z_]+ .*?## .*$$' $(abspath $(lastword $(MAKEFILE_LIST))) \
| sed 's/ifdef //' \
| sort -h \
| awk 'BEGIN {FS = " .*?## "}; {printf " \033[32m%-11s\033[0m %s\n", $$1, $$2}'
@echo -e ''
@echo -e '\033[90mGenerated by GoMakeGen 3.3.2\033[0m\n'
@echo ''
@printf '\033[90mGenerated by GoMakeGen 3.3.3\033[0m\n\n'

################################################################################
17 changes: 17 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,23 @@ podman run --rm -it ghcr.io/essentialkaos/sslcli:latest mydomain.com
docker run --rm -it ghcr.io/essentialkaos/sslcli:latest mydomain.com
```

### Upgrading

Since version `3.1.0` you can update `sslcli` to the latest release using [self-update feature](https://github.com/essentialkaos/.github/blob/master/APPS-UPDATE.md):

```bash
sslcli --update
```

This command will runs a self-update in interactive mode. If you want to run a quiet update (_no output_), use the following command:

```bash
sslcli --update=quiet
```

> [!NOTE]
> Please note that the self-update feature only works with binaries that are downloaded from the [EK Apps Repository](https://apps.kaos.st/sslcli/latest). Binaries from packages do not have a self-update feature and must be upgraded via the package manager.

### Feature list

* Superb UI
Expand Down
34 changes: 29 additions & 5 deletions cli/cli.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ package cli

// ////////////////////////////////////////////////////////////////////////////////// //
// //
// Copyright (c) 2025 ESSENTIAL KAOS //
// Copyright (c) 2026 ESSENTIAL KAOS //
// Apache License, Version 2.0 <http://www.apache.org/licenses/LICENSE-2.0> //
// //
// ////////////////////////////////////////////////////////////////////////////////// //
Expand All @@ -25,6 +25,7 @@ import (
"github.com/essentialkaos/ek/v13/support"
"github.com/essentialkaos/ek/v13/support/deps"
"github.com/essentialkaos/ek/v13/terminal"
"github.com/essentialkaos/ek/v13/terminal/tty"
"github.com/essentialkaos/ek/v13/timeutil"
"github.com/essentialkaos/ek/v13/usage"
"github.com/essentialkaos/ek/v13/usage/completion/bash"
Expand All @@ -40,7 +41,7 @@ import (

const (
APP = "SSLScan Client"
VER = "3.0.3"
VER = "3.1.0"
DESC = "Command-line client for the SSL Labs API"
)

Expand All @@ -64,6 +65,7 @@ const (
OPT_NAME = "name"
OPT_ORG = "org"

OPT_UPDATE = "U:update"
OPT_VERB_VER = "vv:verbose-version"
OPT_COMPLETION = "completion"
OPT_GENERATE_MAN = "generate-man"
Expand Down Expand Up @@ -155,6 +157,9 @@ func Run(gitRev string, gomod []byte) {

runtime.GOMAXPROCS(2)

preConfigureUI()
preConfigureOptions()

args, errs := options.Parse(optMap)

if !errs.IsEmpty() {
Expand All @@ -181,6 +186,8 @@ func Run(gitRev string, gomod []byte) {
WithChecks(checkAPIAvailability()).
Print()
os.Exit(0)
case withSelfUpdate && options.GetB(OPT_UPDATE):
os.Exit(updateBinary())
case options.GetB(OPT_HELP) || (len(args) == 0 && !options.GetB(OPT_REGISTER)):
genUsage().Print()
os.Exit(0)
Expand Down Expand Up @@ -211,9 +218,9 @@ func Run(gitRev string, gomod []byte) {
}
}

// configureUI configures user interface
func configureUI() {
if options.GetB(OPT_NO_COLOR) {
// preConfigureUI preconfigures UI based on information about user terminal
func preConfigureUI() {
if !tty.IsTTY() {
fmtc.DisableColors = true
}

Expand All @@ -230,6 +237,18 @@ func configureUI() {
}
}

// preConfigureOptions preconfigures command-line options based on build tags
func preConfigureOptions() {
optMap.SetIf(withSelfUpdate, OPT_UPDATE, &options.V{Type: options.MIXED})
}

// configureUI configures user interface
func configureUI() {
if options.GetB(OPT_NO_COLOR) {
fmtc.DisableColors = true
}
}

// prepare prepares utility for processing data
func prepare() error {
if !options.Has(OPT_MAX_LEFT) {
Expand Down Expand Up @@ -753,6 +772,11 @@ func genUsage() *usage.Info {
info.AddOption(OPT_QUIET, "Don't show any output")
info.AddOption(OPT_PAGER, "Use pager for long output")
info.AddOption(OPT_NO_COLOR, "Disable colors in output")

if withSelfUpdate {
info.AddOption(OPT_UPDATE, "Update application to the latest version")
}

info.AddOption(OPT_HELP, "Show this help message")
info.AddOption(OPT_VER, "Show version")

Expand Down
6 changes: 3 additions & 3 deletions cli/details.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ package cli

// ////////////////////////////////////////////////////////////////////////////////// //
// //
// Copyright (c) 2025 ESSENTIAL KAOS //
// Copyright (c) 2026 ESSENTIAL KAOS //
// Apache License, Version 2.0 <http://www.apache.org/licenses/LICENSE-2.0> //
// //
// ////////////////////////////////////////////////////////////////////////////////// //
Expand Down Expand Up @@ -1180,12 +1180,12 @@ func printTestInfo(info *sslscan.EndpointInfo) {
fmtc.Printfn(
" %-24s {s}|{!} %s {s-}(%s ago){!}", "Test date",
timeutil.Format(testDate, "%Y/%m/%d %H:%M:%S"),
timeutil.PrettyDuration(time.Since(testDate)),
timeutil.Pretty(time.Since(testDate)),
)

fmtc.Printfn(
" %-24s {s}|{!} %s", "Test duration",
timeutil.PrettyDuration(info.Duration/1000),
timeutil.Pretty(info.Duration/1000),
)

if details.HTTPStatusCode == 0 {
Expand Down
2 changes: 1 addition & 1 deletion cli/encoder.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ package cli

// ////////////////////////////////////////////////////////////////////////////////// //
// //
// Copyright (c) 2025 ESSENTIAL KAOS //
// Copyright (c) 2026 ESSENTIAL KAOS //
// Apache License, Version 2.0 <http://www.apache.org/licenses/LICENSE-2.0> //
// //
// ////////////////////////////////////////////////////////////////////////////////// //
Expand Down
62 changes: 62 additions & 0 deletions cli/with_selfupdate.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,62 @@
//go:build selfupdate

package cli

// ////////////////////////////////////////////////////////////////////////////////// //
// //
// Copyright (c) 2026 ESSENTIAL KAOS //
// Apache License, Version 2.0 <https://www.apache.org/licenses/LICENSE-2.0> //
// //
// ////////////////////////////////////////////////////////////////////////////////// //

import (
"strings"

"github.com/essentialkaos/ek/v13/fmtc"
"github.com/essentialkaos/ek/v13/options"
"github.com/essentialkaos/ek/v13/selfupdate"
"github.com/essentialkaos/ek/v13/selfupdate/interactive"
storage "github.com/essentialkaos/ek/v13/selfupdate/storage/basic"
"github.com/essentialkaos/ek/v13/terminal"
)

// ////////////////////////////////////////////////////////////////////////////////// //

var withSelfUpdate = true

// ////////////////////////////////////////////////////////////////////////////////// //

// updateBinary updates current binary to the latest version
func updateBinary() int {
quiet := strings.ToLower(options.GetS(OPT_UPDATE)) == "quiet"
updInfo, hasUpdate, err := storage.NewStorage("https://apps.kaos.ws").Check(APP, VER)

if err != nil {
if !quiet {
terminal.Error("Can't update binary: %v", err)
}

return 1
}

if !hasUpdate {
fmtc.If(!quiet).Println("{g}You are using the latest version of the app{!}")
return 0
}

pubKey := "MFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAEnYHsOTvrKqeE97dsEt7Ge97+yUcvQJn1++s++FqShDyqwV8CcoKp0E6nDTc8SxInZ5wxwcScxSicfvC9S73OSg=="

if quiet {
err = selfupdate.Run(updInfo, pubKey, nil)
} else {
err = selfupdate.Run(updInfo, pubKey, interactive.Dispatcher())
}

if err != nil {
return 1
}

return 0
}

// ////////////////////////////////////////////////////////////////////////////////// //
21 changes: 21 additions & 0 deletions cli/without_selfupdate.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
//go:build !selfupdate

package cli

// ////////////////////////////////////////////////////////////////////////////////// //
// //
// Copyright (c) 2026 ESSENTIAL KAOS //
// Apache License, Version 2.0 <https://www.apache.org/licenses/LICENSE-2.0> //
// //
// ////////////////////////////////////////////////////////////////////////////////// //

var withSelfUpdate = false

// ////////////////////////////////////////////////////////////////////////////////// //

// updateBinary updates current binary to the latest version
func updateBinary() int {
return 1
}

// ////////////////////////////////////////////////////////////////////////////////// //
Loading
Loading