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
215 changes: 215 additions & 0 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 6 additions & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,10 @@ description = "Greenbone web application scanner"
publish = false
default-run = "greenbone-was"

[features]
default = ["api-docs"]
api-docs = ["utoipa", "utoipa-swagger-ui"]

[[bin]]
name = "greenbone-was"
path = "src/main.rs"
Expand Down Expand Up @@ -35,6 +39,8 @@ tracing = "0.1.44"
tracing-subscriber = { version = "0.3.23", features = ["default", "env-filter", "fmt", "json"] }
uuid = { version = "1", features = ["v4"] }
regex = "1.12.3"
utoipa = { version = "5", features = ["axum_extras"], optional = true }
utoipa-swagger-ui = { version = "9", features = ["axum"], optional = true }

[dev-dependencies]
serial_test = "3.5.0"
Expand Down
25 changes: 25 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,24 @@ make DESTDIR=path/to/install install

The binary can be found at `path/to/install/usr/local/bin` afterwards.

### Build Features

The project supports the following build features:

#### `api-docs` (enabled by default)

Enables dynamically generated OpenAPI 3.0 documentation endpoints served as Swagger UI and YAML/JSON specs.

**Default build (with docs enabled):**
```sh
cargo build
```

**Production build (docs disabled):**
```sh
cargo build --release --no-default-features
```

## Configuration

WAS reads configuration from environment variables prefixed with
Expand Down Expand Up @@ -53,6 +71,13 @@ URL `sqlite:/var/lib/greenbone-was/scans.db`. Set
`GREENBONE_WAS_SQLITE_URL` when a fully explicit file-backed SQLite URL is
required.

## API documentation

Unless the default `api-docs` flag is disabled, the Web Application Scanner will serve API documentation at the following endpoints:

- `GET /doc` — Interactive Swagger UI documentation
- `GET /doc/openapi.yml` — OpenAPI 3.0 YAML specification
- `GET /doc/openapi.json` — OpenAPI 3.0 JSON specification

## Maintainer

Expand Down
Loading
Loading