Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
28 changes: 28 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
NAME := nowsecure-ci
BIN := ./bin/ns
EXE := .

default: ci

ci: lint test dependencies-analyze

build:
mkdir -p bin
CGO_ENABLED=0 go build -ldflags="-s -w" -o $(BIN) $(EXE)

PACKAGES := $(shell go list ./...)

test:
go run gotest.tools/gotestsum@latest --format testname $(PACKAGES)

LINTER_ARGS := "--fix"

lint:
@which golangci-lint > /dev/null || (echo "golangci-lint not found. Run 'nix develop' or install it manually." && exit 1)
golangci-lint run ${LINTER_ARGS} ./...

dependencies-analyze:
which govulncheck || go install golang.org/x/vuln/cmd/govulncheck@latest
govulncheck ./...

.PHONY: default ci build test lint dependencies-analyze
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ The tool provides three methods to run security assessments:

#### API Configuration

- `--api-host` - REST API base URL (default: `https://lab-api.nowsecure.com`)
- `--api-host` - REST API base URL (default: `https://api.nowsecure.com`)
- Use this to point to a different NowSecure endpoint if you are accessing a single tenant instance

- `--ui-host` - UI base URL (default: `https://app.nowsecure.com`)
Expand Down
2 changes: 1 addition & 1 deletion cmd/ns/nowsecure.go
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ func RootCommand(ctx context.Context, v *viper.Viper, config *internal.BaseConfi
}

rootCmd.PersistentFlags().StringP("config", "c", "", "config file path")
rootCmd.PersistentFlags().String("api-host", "https://lab-api.nowsecure.com", "REST API base url")
rootCmd.PersistentFlags().String("api-host", "https://api.nowsecure.com", "REST API base url")
rootCmd.PersistentFlags().String("ui-host", "https://app.nowsecure.com", "UI base url")
rootCmd.PersistentFlags().String("token", "", "auth token for REST API")
rootCmd.PersistentFlags().String("group-ref", "", "group uuid with which to run assessments")
Expand Down
2 changes: 1 addition & 1 deletion docs/cli/ns.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ NowSecure command line tool to interact with NowSecure Platform
### Options

```
--api-host string REST API base url (default "https://lab-api.nowsecure.com")
--api-host string REST API base url (default "https://api.nowsecure.com")
--ci-environment string appended to the user_agent header
-c, --config string config file path
--group-ref string group uuid with which to run assessments
Expand Down
2 changes: 1 addition & 1 deletion docs/cli/ns_run.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ Run an assessment for a given application
### Options inherited from parent commands

```
--api-host string REST API base url (default "https://lab-api.nowsecure.com")
--api-host string REST API base url (default "https://api.nowsecure.com")
--ci-environment string appended to the user_agent header
-c, --config string config file path
--group-ref string group uuid with which to run assessments
Expand Down
2 changes: 1 addition & 1 deletion docs/cli/ns_run_file.md
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ ns run file ./path/to/binary \

```
--analysis-type string One of: full, static, sbom (default "full")
--api-host string REST API base url (default "https://lab-api.nowsecure.com")
--api-host string REST API base url (default "https://api.nowsecure.com")
--artifacts-dir string directory in which to put artifacts (default "$PWD")
--ci-environment string appended to the user_agent header
-c, --config string config file path
Expand Down
2 changes: 1 addition & 1 deletion docs/cli/ns_run_id.md
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ ns run id [app-id] \

```
--analysis-type string One of: full, static, sbom (default "full")
--api-host string REST API base url (default "https://lab-api.nowsecure.com")
--api-host string REST API base url (default "https://api.nowsecure.com")
--artifacts-dir string directory in which to put artifacts (default "$PWD")
--ci-environment string appended to the user_agent header
-c, --config string config file path
Expand Down
2 changes: 1 addition & 1 deletion docs/cli/ns_run_package.md
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ ns run package [package-name] \

```
--analysis-type string One of: full, static, sbom (default "full")
--api-host string REST API base url (default "https://lab-api.nowsecure.com")
--api-host string REST API base url (default "https://api.nowsecure.com")
--artifacts-dir string directory in which to put artifacts (default "$PWD")
--ci-environment string appended to the user_agent header
-c, --config string config file path
Expand Down
Loading