Skip to content

Commit

Permalink
Merge pull request #123 from essentialkaos/develop
Browse files Browse the repository at this point in the history
Version 14.0.0
  • Loading branch information
andyone authored Mar 30, 2024
2 parents ec38a08 + c1c4a26 commit d3de1ab
Show file tree
Hide file tree
Showing 10 changed files with 2,064 additions and 182 deletions.
8 changes: 4 additions & 4 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -37,14 +37,14 @@ jobs:

strategy:
matrix:
go: [ '1.18.x', '1.19.x', '1.20.x', '1.21.x' ]
go: [ '1.21.x', '1.22.x' ]

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

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

Expand All @@ -70,9 +70,9 @@ jobs:
uses: actions/checkout@v4

- name: Set up Go
uses: actions/setup-go@v4
uses: actions/setup-go@v5
with:
go-version: '1.20.x'
go-version: '1.22.x'

- name: Download dependencies
run: make deps
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/codeql.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,9 +25,9 @@ jobs:
fetch-depth: 2

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

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

# This Makefile generated by GoMakeGen 2.2.0 using next command:
# This Makefile generated by GoMakeGen 2.3.0 using next command:
# gomakegen --mod .
#
# More info: https://kaos.sh/gomakegen
Expand All @@ -13,6 +13,7 @@ ifdef VERBOSE ## Print verbose information (Flag)
VERBOSE_FLAG = -v
endif

COMPAT ?= 1.18
MAKEDIR = $(dir $(realpath $(firstword $(MAKEFILE_LIST))))
GITREV ?= $(shell test -s $(MAKEDIR)/.git && git rev-parse --short HEAD)

Expand Down Expand Up @@ -46,7 +47,7 @@ else
endif

ifdef COMPAT ## Compatible Go version (String)
go mod tidy $(VERBOSE_FLAG) -compat=$(COMPAT)
go mod tidy $(VERBOSE_FLAG) -compat=$(COMPAT) -go=$(COMPAT)
else
go mod tidy $(VERBOSE_FLAG)
endif
Expand Down Expand Up @@ -87,6 +88,6 @@ help: ## Show this info
| sed 's/ifdef //' \
| awk 'BEGIN {FS = " .*?## "}; {printf " \033[32m%-14s\033[0m %s\n", $$1, $$2}'
@echo -e ''
@echo -e '\033[90mGenerated by GoMakeGen 2.2.0\033[0m\n'
@echo -e '\033[90mGenerated by GoMakeGen 2.3.0\033[0m\n'

################################################################################
14 changes: 3 additions & 11 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<p align="center"><a href="#readme"><img src="https://gh.kaos.st/sslscan.svg"/></a></p>

<p align="center">
<a href="https://kaos.sh/g/sslscan.v13"><img src="https://gh.kaos.st/godoc.svg" alt="PkgGoDev" /></a>
<a href="https://kaos.sh/g/sslscan.v14"><img src="https://gh.kaos.st/godoc.svg" alt="PkgGoDev" /></a>
<a href="https://kaos.sh/l/sslscan"><img src="https://kaos.sh/l/35f63606e26d8588f906.svg" alt="Code Climate Maintainability" /></a>
<a href="https://kaos.sh/b/sslscan"><img src="https://kaos.sh/b/59a17b0e-b974-425e-a442-b9bcc3ccf7c0.svg" alt="Codebeat badge" /></a>
<a href="https://kaos.sh/w/sslscan/ci"><img src="https://kaos.sh/w/sslscan/ci.svg" alt="GitHub Actions CI Status" /></a>
Expand All @@ -13,15 +13,7 @@

<br/>

Package for Go for working with [SSLLabs](https://www.ssllabs.com) public API.

### Installation

To build the SSLScan from scratch, make sure you have a working Go 1.18+ workspace ([instructions](https://go.dev/doc/install)), then:

```bash
go get -u github.com/essentialkaos/sslscan/v13
```
Package for Go for working with [SSLLabs](https://www.ssllabs.com) public API ([Version 4](https://github.com/ssllabs/ssllabs-scan/blob/master/ssllabs-api-docs-v4.md)).

### Build Status

Expand All @@ -36,7 +28,7 @@ Before contributing to this project please read our [Contributing Guidelines](ht

### Terms of Use

This project is not affiliated with SSL Labs and not officially supported by SSL Labs. Before using this package please read [Qualys SSL Labs Terms of Use](https://www.ssllabs.com/downloads/Qualys_SSL_Labs_Terms_of_Use.pdf).
This project IS NOT AFFILIATED with SSL Labs and not officially supported by SSL Labs. Before using this package please read [Qualys SSL Labs Terms of Use](https://www.ssllabs.com/downloads/Qualys_SSL_Labs_Terms_of_Use.pdf).

Also you should:

Expand Down
9 changes: 3 additions & 6 deletions go.mod
Original file line number Diff line number Diff line change
@@ -1,17 +1,14 @@
module github.com/essentialkaos/sslscan/v13
module github.com/essentialkaos/sslscan/v14

go 1.18

require (
github.com/essentialkaos/check v1.4.0
github.com/valyala/fasthttp v1.50.0
github.com/essentialkaos/ek/v12 v12.112.1
)

require (
github.com/andybalholm/brotli v1.0.5 // indirect
github.com/klauspost/compress v1.16.5 // indirect
github.com/kr/pretty v0.3.1 // indirect
github.com/kr/text v0.2.0 // indirect
github.com/rogpeppe/go-internal v1.10.0 // indirect
github.com/valyala/bytebufferpool v1.0.0 // indirect
github.com/rogpeppe/go-internal v1.11.0 // indirect
)
14 changes: 4 additions & 10 deletions go.sum
Original file line number Diff line number Diff line change
@@ -1,19 +1,13 @@
github.com/andybalholm/brotli v1.0.5 h1:8uQZIdzKmjc/iuPu7O2ioW48L81FgatrcpfFmiq/cCs=
github.com/andybalholm/brotli v1.0.5/go.mod h1:fO7iG3H7G2nSZ7m0zPUDn85XEX2GTukHGRSepvi9Eig=
github.com/creack/pty v1.1.9/go.mod h1:oKZEueFk5CKHvIhNR5MUki03XCEU+Q6VDXinZuGJ33E=
github.com/essentialkaos/check v1.4.0 h1:kWdFxu9odCxUqo1NNFNJmguGrDHgwi3A8daXX1nkuKk=
github.com/essentialkaos/check v1.4.0/go.mod h1:LMKPZ2H+9PXe7Y2gEoKyVAwUqXVgx7KtgibfsHJPus0=
github.com/klauspost/compress v1.16.5 h1:IFV2oUNUzZaz+XyusxpLzpzS8Pt5rh0Z16For/djlyI=
github.com/klauspost/compress v1.16.5/go.mod h1:ntbaceVETuRiXiv4DpjP66DpAtAGkEQskQzEyD//IeE=
github.com/essentialkaos/ek/v12 v12.112.1 h1:mYhqb7K3c5e1LSMGOSUfCNRcVn9iEoZi4wQG0G1MLFk=
github.com/essentialkaos/ek/v12 v12.112.1/go.mod h1:SslW97Se34YQKc08Ume2V/8h/HPTgLS1+Iok64cNF/U=
github.com/kr/pretty v0.3.1 h1:flRD4NNwYAUpkphVc1HcthR4KEIFJ65n8Mw5qdRn3LE=
github.com/kr/pretty v0.3.1/go.mod h1:hoEshYVHaxMs3cyo3Yncou5ZscifuDolrwPKZanG3xk=
github.com/kr/text v0.2.0 h1:5Nx0Ya0ZqY2ygV366QzturHI13Jq95ApcVaJBhpS+AY=
github.com/kr/text v0.2.0/go.mod h1:eLer722TekiGuMkidMxC/pM04lWEeraHUUmBw8l2grE=
github.com/pkg/diff v0.0.0-20210226163009-20ebb0f2a09e/go.mod h1:pJLUxLENpZxwdsKMEsNbx1VGcRFpLqf3715MtcvvzbA=
github.com/rogpeppe/go-internal v1.9.0/go.mod h1:WtVeX8xhTBvf0smdhujwtBcq4Qrzq/fJaraNFVN+nFs=
github.com/rogpeppe/go-internal v1.10.0 h1:TMyTOH3F/DB16zRVcYyreMH6GnZZrwQVAoYjRBZyWFQ=
github.com/rogpeppe/go-internal v1.10.0/go.mod h1:UQnix2H7Ngw/k4C5ijL5+65zddjncjaFoBhdsK/akog=
github.com/valyala/bytebufferpool v1.0.0 h1:GqA5TC/0021Y/b9FG4Oi9Mr3q7XYx6KllzawFIhcdPw=
github.com/valyala/bytebufferpool v1.0.0/go.mod h1:6bBcMArwyJ5K/AmCkWv1jt77kVWyCJ6HpOuEn7z0Csc=
github.com/valyala/fasthttp v1.50.0 h1:H7fweIlBm0rXLs2q0XbalvJ6r0CUPFWK3/bB4N13e9M=
github.com/valyala/fasthttp v1.50.0/go.mod h1:k2zXd82h/7UZc3VOdJ2WaUqt1uZ/XpXAfE9i+HBC3lA=
github.com/rogpeppe/go-internal v1.11.0 h1:cWPaGQEPrBb5/AsnsZesgZZ9yb1OQ+GOISoDNXVBh4M=
github.com/rogpeppe/go-internal v1.11.0/go.mod h1:ddIwULY96R17DhadqLgMfk9H9tvdUzkipdSkR5nkCZA=
13 changes: 7 additions & 6 deletions responses/get.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,16 +2,17 @@

################################################################################

API_ANALYZE="https://api.ssllabs.com/api/v3/analyze"
API_DETAILS="https://api.ssllabs.com/api/v3/getEndpointData"
API_ANALYZE="https://api.ssllabs.com/api/v4/analyze"
API_DETAILS="https://api.ssllabs.com/api/v4/getEndpointData"
EMAIL="[email protected]"

################################################################################

main() {
local output_dir="${1:-.}"
local version status endpoint

version=$(curl -s "$API_ANALYZE?host=essentialkaos.com" | jq '"v3-" + .engineVersion + "-" + .criteriaVersion' | tr -d '"')
version=$(curl -s --header "email: $EMAIL" "$API_ANALYZE?host=essentialkaos.com" | jq '"v4-" + .engineVersion + "-" + .criteriaVersion' | tr -d '"')

echo "Current API version: $version"

Expand All @@ -21,16 +22,16 @@ main() {
fi

while : ; do
status=$(curl -s "$API_ANALYZE?host=essentialkaos.com" | jq '.status' | tr -d '"')
status=$(curl -s --header "email: $EMAIL" "$API_ANALYZE?host=essentialkaos.com" | jq '.status' | tr -d '"')

if [[ "$status" != "READY" ]] ; then
sleep 5
continue
fi

endpoint=$(curl -s "$API_ANALYZE?host=essentialkaos.com" | jq '.endpoints[0].ipAddress' | tr -d '"')
endpoint=$(curl -s --header "email: $EMAIL" "$API_ANALYZE?host=essentialkaos.com" | jq '.endpoints[0].ipAddress' | tr -d '"')

curl -s "$API_DETAILS?host=essentialkaos.com&s=$endpoint" | jq '.' > "$output_dir/$version.json"
curl -s --header "email: $EMAIL" "$API_DETAILS?host=essentialkaos.com&s=$endpoint" | jq '.' > "$output_dir/$version.json"
echo -e "" >> "$output_dir/$version.json"

echo "Data saved as $output_dir/$version.json"
Expand Down
Loading

0 comments on commit d3de1ab

Please sign in to comment.