Skip to content

Commit

Permalink
Merge pull request #295 from tschmidtb51/build-require-go-1.19.1
Browse files Browse the repository at this point in the history
Build require go 1.19.1
  • Loading branch information
tschmidtb51 authored Sep 26, 2022
2 parents 3e09094 + 6b9ecea commit 1189d53
Show file tree
Hide file tree
Showing 8 changed files with 13 additions and 333 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/go.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ jobs:
- name: Set up Go
uses: actions/setup-go@v2
with:
go-version: 1.17
go-version: 1.19.1

- name: Build
run: go build -v ./cmd/...
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/itest.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ jobs:
- name: Set up Go
uses: actions/setup-go@v2
with:
go-version: 1.17
go-version: 1.19.1

- name: Checkout
uses: actions/checkout@v3
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ jobs:
- name: Set up Go
uses: actions/setup-go@v3
with:
go-version: '^1.18.2'
go-version: '^1.19.1'

- name: Build
run: make dist
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ Download the binaries from the most recent release assets on Github.

### Build from sources

- A recent version of **Go** (1.17+) should be installed. [Go installation](https://go.dev/doc/install)
- A recent version of **Go** (1.19.1+) should be installed. [Go installation](https://go.dev/doc/install)

- Clone the repository `git clone https://github.com/csaf-poc/csaf_distribution.git `

Expand Down
13 changes: 7 additions & 6 deletions cmd/csaf_checker/processor.go
Original file line number Diff line number Diff line change
Expand Up @@ -392,7 +392,7 @@ func (p *processor) integrity(
if u.IsAbs() {
return u
}
return util.JoinURLPath(b, u.String())
return b.JoinPath(u.String())
}

for _, f := range files {
Expand Down Expand Up @@ -715,7 +715,7 @@ func (p *processor) checkIndex(base string, mask whereType) error {
return err
}

index := util.JoinURLPath(bu, "index.txt").String()
index := bu.JoinPath("index.txt").String()

p.checkTLS(index)

Expand Down Expand Up @@ -773,7 +773,7 @@ func (p *processor) checkChanges(base string, mask whereType) error {
if err != nil {
return err
}
changes := util.JoinURLPath(bu, "changes.csv").String()
changes := bu.JoinPath("changes.csv").String()

p.checkTLS(changes)

Expand Down Expand Up @@ -1195,11 +1195,12 @@ func (p *processor) checkWellknown(domain string) string {
// 1. checks if the provider-metadata.json file is
// available under the /.well-known/csaf/ directory.
// 2. Then it checks the security.txt file by making HTTP request to fetch it.
// 3. After that it checks the existence of the CSAF field in the file
// content and tries to fetch the value of this field.
// 3. After that it checks the existence of the CSAF field in the file
// content and tries to fetch the value of this field.
// 4. Finally it checks if the "csaf.data.security.domain.tld" DNS record
// is available and serves the "provider-metadata.json".
///
//
// /
// If all three checks fail, errors are given,
// otherwise warnings for all failed checks.
// The function returns nil, unless errors outside the checks were found.
Expand Down
4 changes: 2 additions & 2 deletions csaf/advisories.go
Original file line number Diff line number Diff line change
Expand Up @@ -198,7 +198,7 @@ func (afp *AdvisoryFileProcessor) loadIndex(
return nil, err
}

indexURL := util.JoinURLPath(base, "index.txt").String()
indexURL := base.JoinPath("index.txt").String()
resp, err := afp.client.Get(indexURL)
if err != nil {
return nil, err
Expand All @@ -215,7 +215,7 @@ func (afp *AdvisoryFileProcessor) loadIndex(
continue
}
files = append(files,
PlainAdvisoryFile(util.JoinURLPath(base, u).String()))
PlainAdvisoryFile(base.JoinPath(u).String()))
}

if err := scanner.Err(); err != nil {
Expand Down
301 changes: 0 additions & 301 deletions util/joinpath.go

This file was deleted.

Loading

0 comments on commit 1189d53

Please sign in to comment.