1
0
Fork 0
mirror of https://github.com/gocsaf/csaf.git synced 2025-12-22 05:40:11 +01:00

feat: perform go path repo move

* Change the go module path
   from github.com/csaf-poc/csaf_distribution to github.com/gocsaf/csaf.
 * Rename archive for release tarballs.
 * Adjust testing scripts and documentation.
This commit is contained in:
Bernhard Reiter 2024-10-30 14:46:50 +01:00 committed by Paul Schwabauer
parent 91207f2b7b
commit e8706e5eb9
58 changed files with 102 additions and 102 deletions

View file

@ -25,7 +25,7 @@ jobs:
sudo apt install -y make nginx fcgiwrap gnutls-bin sudo apt install -y make nginx fcgiwrap gnutls-bin
cp -r $GITHUB_WORKSPACE ~ cp -r $GITHUB_WORKSPACE ~
cd ~ cd ~
cd csaf_distribution/docs/scripts/ cd csaf/docs/scripts/
# keep in sync with docs/scripts/Readme.md # keep in sync with docs/scripts/Readme.md
export FOLDERNAME=devca1 ORGANAME="CSAF Tools Development (internal)" export FOLDERNAME=devca1 ORGANAME="CSAF Tools Development (internal)"
source ./TLSConfigsForITest.sh source ./TLSConfigsForITest.sh

View file

@ -24,5 +24,5 @@ jobs:
uses: softprops/action-gh-release@v1 uses: softprops/action-gh-release@v1
with: with:
files: | files: |
dist/csaf_distribution-*.zip dist/csaf-*.zip
dist/csaf_distribution-*.tar.gz dist/csaf-*.tar.gz

View file

@ -6,7 +6,7 @@
# SPDX-FileCopyrightText: 2021 German Federal Office for Information Security (BSI) <https://www.bsi.bund.de> # SPDX-FileCopyrightText: 2021 German Federal Office for Information Security (BSI) <https://www.bsi.bund.de>
# Software-Engineering: 2021 Intevation GmbH <https://intevation.de> # Software-Engineering: 2021 Intevation GmbH <https://intevation.de>
# #
# Makefile to build csaf_distribution components # Makefile to build csaf components
SHELL = /bin/bash SHELL = /bin/bash
BUILD = go build BUILD = go build
@ -59,7 +59,7 @@ testsemver:
# Set -ldflags parameter to pass the semversion. # Set -ldflags parameter to pass the semversion.
LDFLAGS = -ldflags "-X github.com/csaf-poc/csaf_distribution/v3/util.SemVersion=$(SEMVER)" LDFLAGS = -ldflags "-X github.com/gocsaf/csaf/v3/util.SemVersion=$(SEMVER)"
# Build binaries and place them under bin-$(GOOS)-$(GOARCH) # Build binaries and place them under bin-$(GOOS)-$(GOARCH)
# Using 'Target-specific Variable Values' to specify the build target system # Using 'Target-specific Variable Values' to specify the build target system
@ -78,7 +78,7 @@ build_linux build_win build_mac_amd64 build_mac_arm64:
env GOARCH=$(GOARCH) GOOS=$(GOOS) $(BUILD) -o $(BINDIR) $(LDFLAGS) -v ./cmd/... env GOARCH=$(GOARCH) GOOS=$(GOOS) $(BUILD) -o $(BINDIR) $(LDFLAGS) -v ./cmd/...
DISTDIR := csaf_distribution-$(SEMVER) DISTDIR := csaf-$(SEMVER)
dist: build_linux build_win build_mac_amd64 build_mac_arm64 dist: build_linux build_win build_mac_amd64 build_mac_arm64
mkdir -p dist mkdir -p dist
mkdir -p dist/$(DISTDIR)-windows-amd64/bin-windows-amd64 mkdir -p dist/$(DISTDIR)-windows-amd64/bin-windows-amd64

View file

@ -18,7 +18,7 @@
> and redirection will be switched off a few months later.) > and redirection will be switched off a few months later.)
# csaf_distribution # csaf
Implements a [CSAF](https://csaf.io/) Implements a [CSAF](https://csaf.io/)
([specification v2.0](https://docs.oasis-open.org/csaf/csaf/v2.0/os/csaf-v2.0-os.html) ([specification v2.0](https://docs.oasis-open.org/csaf/csaf/v2.0/os/csaf-v2.0-os.html)
@ -52,10 +52,10 @@ is a CSAF Aggregator, to list or mirror providers.
## Other stuff ## Other stuff
### [examples](./examples/README.md) ### [examples](./examples/README.md)
are small examples of how to use `github.com/csaf-poc/csaf_distribution` are small examples of how to use `github.com/gocsaf/csaf`
as an API. Currently this is a work in progress, as usage of this repository as an API. Currently this is a work in progress, as usage of this repository
as a library to access is _not officially supported_, e.g. as a library to access is _not officially supported_, e.g.
see https://github.com/csaf-poc/csaf_distribution/issues/367 . see https://github.com/gocsaf/csaf/issues/367 .
## Setup ## Setup
Binaries for the server side are only available and tested Binaries for the server side are only available and tested
@ -81,7 +81,7 @@ Download the binaries from the most recent release assets on Github.
- A recent version of **Go** (1.22+) should be installed. [Go installation](https://go.dev/doc/install) - A recent version of **Go** (1.22+) should be installed. [Go installation](https://go.dev/doc/install)
- Clone the repository `git clone https://github.com/csaf-poc/csaf_distribution.git ` - Clone the repository `git clone https://github.com/gocsaf/csaf.git `
- Build Go components Makefile supplies the following targets: - Build Go components Makefile supplies the following targets:
- Build for GNU/Linux system: `make build_linux` - Build for GNU/Linux system: `make build_linux`
@ -110,7 +110,7 @@ For further details of the development process consult our [development page](./
## License ## License
- `csaf_distribution` is licensed as Free Software under the terms of the [Apache License, Version 2.0](./LICENSES/Apache-2.0.txt). - `csaf` is licensed as Free Software under the terms of the [Apache License, Version 2.0](./LICENSES/Apache-2.0.txt).
- See the specific source files - See the specific source files
for details, the license itself can be found in the directory `LICENSES/`. for details, the license itself can be found in the directory `LICENSES/`.

View file

@ -13,7 +13,7 @@ import (
"io" "io"
"net/http" "net/http"
"github.com/csaf-poc/csaf_distribution/v3/util" "github.com/gocsaf/csaf/v3/util"
) )
var errNotFound = errors.New("not found") var errNotFound = errors.New("not found")

View file

@ -20,12 +20,12 @@ import (
"time" "time"
"github.com/ProtonMail/gopenpgp/v2/crypto" "github.com/ProtonMail/gopenpgp/v2/crypto"
"github.com/csaf-poc/csaf_distribution/v3/csaf" "github.com/gocsaf/csaf/v3/csaf"
"github.com/csaf-poc/csaf_distribution/v3/internal/certs" "github.com/gocsaf/csaf/v3/internal/certs"
"github.com/csaf-poc/csaf_distribution/v3/internal/filter" "github.com/gocsaf/csaf/v3/internal/filter"
"github.com/csaf-poc/csaf_distribution/v3/internal/models" "github.com/gocsaf/csaf/v3/internal/models"
"github.com/csaf-poc/csaf_distribution/v3/internal/options" "github.com/gocsaf/csaf/v3/internal/options"
"github.com/csaf-poc/csaf_distribution/v3/util" "github.com/gocsaf/csaf/v3/util"
"golang.org/x/time/rate" "golang.org/x/time/rate"
) )

View file

@ -18,8 +18,8 @@ import (
"sync" "sync"
"time" "time"
"github.com/csaf-poc/csaf_distribution/v3/csaf" "github.com/gocsaf/csaf/v3/csaf"
"github.com/csaf-poc/csaf_distribution/v3/util" "github.com/gocsaf/csaf/v3/util"
) )
type fullJob struct { type fullJob struct {

View file

@ -19,8 +19,8 @@ import (
"strings" "strings"
"time" "time"
"github.com/csaf-poc/csaf_distribution/v3/csaf" "github.com/gocsaf/csaf/v3/csaf"
"github.com/csaf-poc/csaf_distribution/v3/util" "github.com/gocsaf/csaf/v3/util"
) )
const ( const (

View file

@ -24,8 +24,8 @@ import (
"sync" "sync"
"time" "time"
"github.com/csaf-poc/csaf_distribution/v3/csaf" "github.com/gocsaf/csaf/v3/csaf"
"github.com/csaf-poc/csaf_distribution/v3/util" "github.com/gocsaf/csaf/v3/util"
) )
type interimJob struct { type interimJob struct {

View file

@ -13,7 +13,7 @@ import (
"os" "os"
"path/filepath" "path/filepath"
"github.com/csaf-poc/csaf_distribution/v3/util" "github.com/gocsaf/csaf/v3/util"
) )
type lazyTransaction struct { type lazyTransaction struct {

View file

@ -11,8 +11,8 @@ package main
import ( import (
"fmt" "fmt"
"github.com/csaf-poc/csaf_distribution/v3/csaf" "github.com/gocsaf/csaf/v3/csaf"
"github.com/csaf-poc/csaf_distribution/v3/util" "github.com/gocsaf/csaf/v3/util"
) )
// mirrorAllowed checks if mirroring is allowed. // mirrorAllowed checks if mirroring is allowed.

View file

@ -15,7 +15,7 @@ import (
"os" "os"
"path/filepath" "path/filepath"
"github.com/csaf-poc/csaf_distribution/v3/internal/options" "github.com/gocsaf/csaf/v3/internal/options"
"github.com/gofrs/flock" "github.com/gofrs/flock"
) )

View file

@ -30,8 +30,8 @@ import (
"github.com/ProtonMail/gopenpgp/v2/constants" "github.com/ProtonMail/gopenpgp/v2/constants"
"github.com/ProtonMail/gopenpgp/v2/crypto" "github.com/ProtonMail/gopenpgp/v2/crypto"
"github.com/csaf-poc/csaf_distribution/v3/csaf" "github.com/gocsaf/csaf/v3/csaf"
"github.com/csaf-poc/csaf_distribution/v3/util" "github.com/gocsaf/csaf/v3/util"
) )
// mirrorAllowed checks if mirroring is allowed. // mirrorAllowed checks if mirroring is allowed.

View file

@ -14,8 +14,8 @@ import (
"os" "os"
"path/filepath" "path/filepath"
"github.com/csaf-poc/csaf_distribution/v3/csaf" "github.com/gocsaf/csaf/v3/csaf"
"github.com/csaf-poc/csaf_distribution/v3/util" "github.com/gocsaf/csaf/v3/util"
"github.com/ProtonMail/gopenpgp/v2/crypto" "github.com/ProtonMail/gopenpgp/v2/crypto"
) )

View file

@ -13,10 +13,10 @@ import (
"fmt" "fmt"
"net/http" "net/http"
"github.com/csaf-poc/csaf_distribution/v3/internal/certs" "github.com/gocsaf/csaf/v3/internal/certs"
"github.com/csaf-poc/csaf_distribution/v3/internal/filter" "github.com/gocsaf/csaf/v3/internal/filter"
"github.com/csaf-poc/csaf_distribution/v3/internal/models" "github.com/gocsaf/csaf/v3/internal/models"
"github.com/csaf-poc/csaf_distribution/v3/internal/options" "github.com/gocsaf/csaf/v3/internal/options"
) )
type outputFormat string type outputFormat string

View file

@ -15,7 +15,7 @@ import (
"github.com/PuerkitoBio/goquery" "github.com/PuerkitoBio/goquery"
"github.com/csaf-poc/csaf_distribution/v3/util" "github.com/gocsaf/csaf/v3/util"
) )
type ( type (

View file

@ -12,7 +12,7 @@ package main
import ( import (
"log" "log"
"github.com/csaf-poc/csaf_distribution/v3/internal/options" "github.com/gocsaf/csaf/v3/internal/options"
) )
// run uses a processor to check all the given domains or direct urls // run uses a processor to check all the given domains or direct urls

View file

@ -32,8 +32,8 @@ import (
"github.com/ProtonMail/gopenpgp/v2/crypto" "github.com/ProtonMail/gopenpgp/v2/crypto"
"golang.org/x/time/rate" "golang.org/x/time/rate"
"github.com/csaf-poc/csaf_distribution/v3/csaf" "github.com/gocsaf/csaf/v3/csaf"
"github.com/csaf-poc/csaf_distribution/v3/util" "github.com/gocsaf/csaf/v3/util"
) )
// topicMessages stores the collected topicMessages for a specific topic. // topicMessages stores the collected topicMessages for a specific topic.

View file

@ -18,8 +18,8 @@ import (
"os" "os"
"time" "time"
"github.com/csaf-poc/csaf_distribution/v3/csaf" "github.com/gocsaf/csaf/v3/csaf"
"github.com/csaf-poc/csaf_distribution/v3/internal/models" "github.com/gocsaf/csaf/v3/internal/models"
) )
// MessageType is the kind of the message. // MessageType is the kind of the message.

View file

@ -13,7 +13,7 @@ import (
"sort" "sort"
"strings" "strings"
"github.com/csaf-poc/csaf_distribution/v3/util" "github.com/gocsaf/csaf/v3/util"
) )
type ( type (

View file

@ -15,8 +15,8 @@ import (
"sort" "sort"
"strings" "strings"
"github.com/csaf-poc/csaf_distribution/v3/csaf" "github.com/gocsaf/csaf/v3/csaf"
"github.com/csaf-poc/csaf_distribution/v3/util" "github.com/gocsaf/csaf/v3/util"
) )
// identifier consist of document/tracking/id and document/publisher/namespace, // identifier consist of document/tracking/id and document/publisher/namespace,

View file

@ -12,7 +12,7 @@ import (
"fmt" "fmt"
"sort" "sort"
"github.com/csaf-poc/csaf_distribution/v3/csaf" "github.com/gocsaf/csaf/v3/csaf"
) )
type ruleCondition int type ruleCondition int

View file

@ -19,10 +19,10 @@ import (
"path/filepath" "path/filepath"
"time" "time"
"github.com/csaf-poc/csaf_distribution/v3/internal/certs" "github.com/gocsaf/csaf/v3/internal/certs"
"github.com/csaf-poc/csaf_distribution/v3/internal/filter" "github.com/gocsaf/csaf/v3/internal/filter"
"github.com/csaf-poc/csaf_distribution/v3/internal/models" "github.com/gocsaf/csaf/v3/internal/models"
"github.com/csaf-poc/csaf_distribution/v3/internal/options" "github.com/gocsaf/csaf/v3/internal/options"
) )
const ( const (

View file

@ -33,8 +33,8 @@ import (
"github.com/ProtonMail/gopenpgp/v2/crypto" "github.com/ProtonMail/gopenpgp/v2/crypto"
"golang.org/x/time/rate" "golang.org/x/time/rate"
"github.com/csaf-poc/csaf_distribution/v3/csaf" "github.com/gocsaf/csaf/v3/csaf"
"github.com/csaf-poc/csaf_distribution/v3/util" "github.com/gocsaf/csaf/v3/util"
) )
type downloader struct { type downloader struct {

View file

@ -19,8 +19,8 @@ import (
"path/filepath" "path/filepath"
"strings" "strings"
"github.com/csaf-poc/csaf_distribution/v3/internal/misc" "github.com/gocsaf/csaf/v3/internal/misc"
"github.com/csaf-poc/csaf_distribution/v3/util" "github.com/gocsaf/csaf/v3/util"
) )
// failedForwardDir is the name of the special sub folder // failedForwardDir is the name of the special sub folder

View file

@ -23,8 +23,8 @@ import (
"strings" "strings"
"testing" "testing"
"github.com/csaf-poc/csaf_distribution/v3/internal/options" "github.com/gocsaf/csaf/v3/internal/options"
"github.com/csaf-poc/csaf_distribution/v3/util" "github.com/gocsaf/csaf/v3/util"
) )
func TestValidationStatusUpdate(t *testing.T) { func TestValidationStatusUpdate(t *testing.T) {

View file

@ -15,7 +15,7 @@ import (
"os" "os"
"os/signal" "os/signal"
"github.com/csaf-poc/csaf_distribution/v3/internal/options" "github.com/gocsaf/csaf/v3/internal/options"
) )
func run(cfg *config, domains []string) error { func run(cfg *config, domains []string) error {

View file

@ -26,8 +26,8 @@ import (
"github.com/ProtonMail/gopenpgp/v2/constants" "github.com/ProtonMail/gopenpgp/v2/constants"
"github.com/ProtonMail/gopenpgp/v2/crypto" "github.com/ProtonMail/gopenpgp/v2/crypto"
"github.com/csaf-poc/csaf_distribution/v3/csaf" "github.com/gocsaf/csaf/v3/csaf"
"github.com/csaf-poc/csaf_distribution/v3/util" "github.com/gocsaf/csaf/v3/util"
) )
const dateFormat = time.RFC3339 const dateFormat = time.RFC3339

View file

@ -18,7 +18,7 @@ import (
"github.com/ProtonMail/gopenpgp/v2/crypto" "github.com/ProtonMail/gopenpgp/v2/crypto"
"golang.org/x/crypto/bcrypt" "golang.org/x/crypto/bcrypt"
"github.com/csaf-poc/csaf_distribution/v3/csaf" "github.com/gocsaf/csaf/v3/csaf"
) )
const ( const (

View file

@ -22,8 +22,8 @@ import (
"github.com/ProtonMail/gopenpgp/v2/crypto" "github.com/ProtonMail/gopenpgp/v2/crypto"
"github.com/csaf-poc/csaf_distribution/v3/csaf" "github.com/gocsaf/csaf/v3/csaf"
"github.com/csaf-poc/csaf_distribution/v3/util" "github.com/gocsaf/csaf/v3/util"
) )
// ensureFolders initializes the paths and call functions to create // ensureFolders initializes the paths and call functions to create

View file

@ -13,7 +13,7 @@ import (
"crypto/sha512" "crypto/sha512"
"os" "os"
"github.com/csaf-poc/csaf_distribution/v3/util" "github.com/gocsaf/csaf/v3/util"
) )
func writeHashedFile(fname, name string, data []byte, armored string) error { func writeHashedFile(fname, name string, data []byte, armored string) error {

View file

@ -18,7 +18,7 @@ import (
"sort" "sort"
"time" "time"
"github.com/csaf-poc/csaf_distribution/v3/util" "github.com/gocsaf/csaf/v3/util"
) )
func updateIndex(dir, fname string) error { func updateIndex(dir, fname string) error {

View file

@ -18,7 +18,7 @@ import (
"github.com/jessevdk/go-flags" "github.com/jessevdk/go-flags"
"github.com/csaf-poc/csaf_distribution/v3/util" "github.com/gocsaf/csaf/v3/util"
) )
type options struct { type options struct {

View file

@ -15,8 +15,8 @@ import (
"strings" "strings"
"time" "time"
"github.com/csaf-poc/csaf_distribution/v3/csaf" "github.com/gocsaf/csaf/v3/csaf"
"github.com/csaf-poc/csaf_distribution/v3/util" "github.com/gocsaf/csaf/v3/util"
) )
// mergeCategories merges the given categories into the old ones. // mergeCategories merges the given categories into the old ones.

View file

@ -12,8 +12,8 @@ import (
"os" "os"
"path/filepath" "path/filepath"
"github.com/csaf-poc/csaf_distribution/v3/csaf" "github.com/gocsaf/csaf/v3/csaf"
"github.com/csaf-poc/csaf_distribution/v3/util" "github.com/gocsaf/csaf/v3/util"
) )
func doTransaction( func doTransaction(

View file

@ -18,8 +18,8 @@ import (
"golang.org/x/crypto/bcrypt" "golang.org/x/crypto/bcrypt"
"golang.org/x/term" "golang.org/x/term"
"github.com/csaf-poc/csaf_distribution/v3/internal/certs" "github.com/gocsaf/csaf/v3/internal/certs"
"github.com/csaf-poc/csaf_distribution/v3/internal/options" "github.com/gocsaf/csaf/v3/internal/options"
) )
const ( const (

View file

@ -9,7 +9,7 @@
// Implements a command line tool that uploads csaf documents to csaf_provider. // Implements a command line tool that uploads csaf documents to csaf_provider.
package main package main
import "github.com/csaf-poc/csaf_distribution/v3/internal/options" import "github.com/gocsaf/csaf/v3/internal/options"
func main() { func main() {
args, cfg, err := parseArgsConfig() args, cfg, err := parseArgsConfig()

View file

@ -26,9 +26,9 @@ import (
"github.com/ProtonMail/gopenpgp/v2/constants" "github.com/ProtonMail/gopenpgp/v2/constants"
"github.com/ProtonMail/gopenpgp/v2/crypto" "github.com/ProtonMail/gopenpgp/v2/crypto"
"github.com/csaf-poc/csaf_distribution/v3/csaf" "github.com/gocsaf/csaf/v3/csaf"
"github.com/csaf-poc/csaf_distribution/v3/internal/misc" "github.com/gocsaf/csaf/v3/internal/misc"
"github.com/csaf-poc/csaf_distribution/v3/util" "github.com/gocsaf/csaf/v3/util"
) )
type processor struct { type processor struct {

View file

@ -18,8 +18,8 @@ import (
"github.com/jessevdk/go-flags" "github.com/jessevdk/go-flags"
"github.com/csaf-poc/csaf_distribution/v3/csaf" "github.com/gocsaf/csaf/v3/csaf"
"github.com/csaf-poc/csaf_distribution/v3/util" "github.com/gocsaf/csaf/v3/util"
) )
type options struct { type options struct {

View file

@ -19,7 +19,7 @@ import (
"strings" "strings"
"time" "time"
"github.com/csaf-poc/csaf_distribution/v3/util" "github.com/gocsaf/csaf/v3/util"
) )
// AdvisoryFile constructs the urls of a remote file. // AdvisoryFile constructs the urls of a remote file.

View file

@ -17,7 +17,7 @@ import (
"strings" "strings"
"time" "time"
"github.com/csaf-poc/csaf_distribution/v3/util" "github.com/gocsaf/csaf/v3/util"
) )
// TLPLabel is the traffic light policy of the CSAF. // TLPLabel is the traffic light policy of the CSAF.

View file

@ -18,7 +18,7 @@ import (
"net/http" "net/http"
"strings" "strings"
"github.com/csaf-poc/csaf_distribution/v3/util" "github.com/gocsaf/csaf/v3/util"
) )
// ProviderMetadataLoader helps load provider-metadata.json from // ProviderMetadataLoader helps load provider-metadata.json from

View file

@ -14,7 +14,7 @@ import (
"sort" "sort"
"time" "time"
"github.com/csaf-poc/csaf_distribution/v3/util" "github.com/gocsaf/csaf/v3/util"
) )
// ROLIEServiceWorkspaceCollectionCategoriesCategory is a category in a ROLIE service collection. // ROLIEServiceWorkspaceCollectionCategoriesCategory is a category in a ROLIE service collection.

View file

@ -11,7 +11,7 @@ package csaf
import ( import (
"time" "time"
"github.com/csaf-poc/csaf_distribution/v3/util" "github.com/gocsaf/csaf/v3/util"
) )
const ( const (

View file

@ -93,7 +93,7 @@ ignorepattern = [".*white.*", ".*red.*"]
The `role` given in the `provider-metadata.json` is not The `role` given in the `provider-metadata.json` is not
yet considered to change the overall result, yet considered to change the overall result,
see <https://github.com/csaf-poc/csaf_distribution/issues/221> . see <https://github.com/gocsaf/csaf/issues/221> .
If a provider hosts one or more advisories with a TLP level of AMBER or RED, then these advisories must be access protected. If a provider hosts one or more advisories with a TLP level of AMBER or RED, then these advisories must be access protected.
To check these advisories, authorization can be given via custom headers or certificates. To check these advisories, authorization can be given via custom headers or certificates.

View file

@ -141,5 +141,5 @@ contact_details = "Example Company can be reached at contact_us@example.com, or
There is an experimental upload interface which works with a web browser. There is an experimental upload interface which works with a web browser.
It is disabled by default, as there are known issues, notably: It is disabled by default, as there are known issues, notably:
* https://github.com/csaf-poc/csaf_distribution/issues/43 * https://github.com/gocsaf/csaf/issues/43
* https://github.com/csaf-poc/csaf_distribution/issues/256 * https://github.com/gocsaf/csaf/issues/256

View file

@ -115,7 +115,7 @@ sudo chmod g+r,o-rwx /etc/csaf/config.toml
Here is a minimal example configuration, Here is a minimal example configuration,
which you need to customize for a production setup, which you need to customize for a production setup,
see the [options of `csaf_provider`](https://github.com/csaf-poc/csaf_distribution/blob/main/docs/csaf_provider.md). see the [options of `csaf_provider`](https://github.com/gocsaf/csaf/blob/main/docs/csaf_provider.md).
<!-- MARKDOWN-AUTO-DOCS:START (CODE:src=../docs/scripts/setupProviderForITest.sh&lines=94-101) --> <!-- MARKDOWN-AUTO-DOCS:START (CODE:src=../docs/scripts/setupProviderForITest.sh&lines=94-101) -->
<!-- The below code snippet is automatically added from ../docs/scripts/setupProviderForITest.sh --> <!-- The below code snippet is automatically added from ../docs/scripts/setupProviderForITest.sh -->

View file

@ -1,7 +1,7 @@
Scripts for assisting the Integration tests. Scripts for assisting the Integration tests.
They were written on Ubuntu 20.04 TLS amd64 and also tested with 24.04 TLS. They were written on Ubuntu 20.04 TLS amd64 and also tested with 24.04 TLS.
- `prepareUbuntuInstanceForITests.sh` installs the required packages for the csaf_distribution integration tests on a naked ubuntu LTS amd64. - `prepareUbuntuInstanceForITests.sh` installs the required packages for the csaf integration tests on a naked Ubuntu LTS amd64.
- `TLSConfigsForITest.sh` generates a root CA and webserver cert by running `createRootCAForITest.sh` and `createWebserverCertForITest.sh` - `TLSConfigsForITest.sh` generates a root CA and webserver cert by running `createRootCAForITest.sh` and `createWebserverCertForITest.sh`
and configures nginx for serving TLS connections. and configures nginx for serving TLS connections.
@ -14,11 +14,11 @@ As creating the folders needs to authenticate with the csaf_provider, the config
Calling example (as user with sudo privileges): Calling example (as user with sudo privileges):
``` bash ``` bash
curl --fail -O https://raw.githubusercontent.com/csaf-poc/csaf_distribution/main/docs/scripts/prepareUbuntuInstanceForITests.sh curl --fail -O https://raw.githubusercontent.com/gocsaf/csaf/main/docs/scripts/prepareUbuntuInstanceForITests.sh
sudo bash prepareUbuntuInstanceForITests.sh sudo bash prepareUbuntuInstanceForITests.sh
git clone https://github.com/csaf-poc/csaf_distribution.git # --branch <name> git clone https://github.com/gocsaf/csaf.git # --branch <name>
pushd csaf_distribution/docs/scripts/ pushd csaf/docs/scripts/
export FOLDERNAME=devca1 ORGANAME="CSAF Tools Development (internal)" export FOLDERNAME=devca1 ORGANAME="CSAF Tools Development (internal)"
source ./TLSConfigsForITest.sh source ./TLSConfigsForITest.sh

View file

@ -18,7 +18,7 @@ set -e
NGINX_CONFIG_PATH=/etc/nginx/sites-available/default NGINX_CONFIG_PATH=/etc/nginx/sites-available/default
cd ~/csaf_distribution/docs/scripts/ cd ~/csaf/docs/scripts/
source ./createCCForITest.sh source ./createCCForITest.sh
echo ' echo '

View file

@ -17,7 +17,7 @@ set -e
NGINX_CONFIG_PATH=/etc/nginx/sites-available/default NGINX_CONFIG_PATH=/etc/nginx/sites-available/default
cd ~/csaf_distribution/docs/scripts/ cd ~/csaf/docs/scripts/
## Create Root CA ## Create Root CA
./createRootCAForITest.sh ./createRootCAForITest.sh

View file

@ -2,7 +2,7 @@
set -e set -e
# This script prepares a naked Ubuntu LTS amd64 # This script prepares a naked Ubuntu LTS amd64
# for the csaf_distribution integration tests # for the csaf integration tests
# by installing the required packages. # by installing the required packages.
apt update apt update

View file

@ -29,6 +29,6 @@ popd
echo echo
echo '=== run aggregator' echo '=== run aggregator'
cd ~/csaf_distribution/ cd ~/csaf/
sudo cp docs/examples/aggregator.toml /etc/csaf sudo cp docs/examples/aggregator.toml /etc/csaf
sudo ./bin-linux-amd64/csaf_aggregator -c /etc/csaf/aggregator.toml sudo ./bin-linux-amd64/csaf_aggregator -c /etc/csaf/aggregator.toml

View file

@ -11,7 +11,7 @@
set -e # to exit if a command in the script fails set -e # to exit if a command in the script fails
echo '==== run checker (twice)' echo '==== run checker (twice)'
cd ~/csaf_distribution cd ~/csaf
./bin-linux-amd64/csaf_checker -f html -o ../checker-results.html --insecure \ ./bin-linux-amd64/csaf_checker -f html -o ../checker-results.html --insecure \
--client_cert ~/devca1/testclient1.crt \ --client_cert ~/devca1/testclient1.crt \

View file

@ -10,7 +10,7 @@
set -e # to exit if a command in the script fails set -e # to exit if a command in the script fails
cd ~/csaf_distribution cd ~/csaf
echo echo
echo '==== run downloader (1)' echo '==== run downloader (1)'

View file

@ -1,6 +1,6 @@
# API examples # API examples
An experimental example of how to use `github.com/csaf-poc/csaf_distribution` An experimental example of how to use `github.com/gocsaf/csaf`
as a library. as a library.
As usage of the repository as an API is currently a _work in progress_, As usage of the repository as an API is currently a _work in progress_,
these examples are likely to be changed. these examples are likely to be changed.

View file

@ -1,5 +1,5 @@
// Package main implements a simple demo program to // Package main implements a simple demo program to
// work with the csaf_distribution library. // work with the csaf library.
package main package main
import ( import (
@ -9,8 +9,8 @@ import (
"os" "os"
"strings" "strings"
"github.com/csaf-poc/csaf_distribution/v3/csaf" "github.com/gocsaf/csaf/v3/csaf"
"github.com/csaf-poc/csaf_distribution/v3/util" "github.com/gocsaf/csaf/v3/util"
) )
func main() { func main() {

2
go.mod
View file

@ -1,4 +1,4 @@
module github.com/csaf-poc/csaf_distribution/v3 module github.com/gocsaf/csaf/v3
go 1.22 go 1.22

View file

@ -15,7 +15,7 @@ import (
"log/slog" "log/slog"
"os" "os"
"github.com/csaf-poc/csaf_distribution/v3/util" "github.com/gocsaf/csaf/v3/util"
"github.com/BurntSushi/toml" "github.com/BurntSushi/toml"
"github.com/jessevdk/go-flags" "github.com/jessevdk/go-flags"