You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Add: Notus rust implementation and integrate it into openvasd
This commit contains the complete notus implementation and integration in the openvas rust framework.
To enable the notus endpoint, it has to be configured in the `openvasd.toml` file, e.g.:
```
[notus]
advisory_path = "/var/lib/notus/products"
```
Note: adjust path according to your local setup, be sure to pick the products directory
If everything is done correctly, the notus endpoint is available at `/notus` and `/notus/{os}`.
For the following examples the URL and X-API-KEY must be changed according to the used configuration.
With a get request to `/notus` all available products (OS) are returned, e.g.:
```
curl --verbose --insecure --request GET https://127.0.0.1:3000/notus -H "X-API-KEY: changeme" |jq .
```
With a post request to `/notus/{os}`, a notus scan is requested. For the `{os}` key the required operating system must be given, e.g. for Debian 12 the corresponding os string is debian_12. The general rule is, the os string in lowercase and all white spaces are replacec by `_`. Here an example for a small notus scan execution:
```
curl --verbose --insecure --request POST https://127.0.0.1:3000/notus/debian_12 -H "X-API-KEY: changeme" -d '["firefox-esr-102.12.0esr-1~deb12u1"]' |jq .
```
The following changes are contained in the notus implementation/integration:
* SC-941: Add Notus endpoint to OpenAPI documentation
* SC-942: Implement notus entrypoint
* SC-943: Implement tests for notus functionality
* SC-944: Implement Hashsum file loader for Notus
Load Notus files from the feed using the Sha256sums file. Hashsums are verified, as the files are needed.
* SC-945: Implement version comparison algorithm
* SC-946: Create Package type models
Supported package systems: ebuild, rpm, deb, slackware
* SC-947: Use openvasd Notus endpoint for LSC in openvas
- add URI parser to get the schema, host and port to communicate with openvasd
- use curl for simple http/https client
- add structures and functions to parse the openvasd response, the notus json object containing the advisories and vulnerabilities
- function to process the advisories and to store them in the redis kb in the right format.
- dont init mqtt if openvasd lsc is enabled. Fix OS format. And other small improvements
* SC-948: Implement Notus Scanning logic
* SC-951: Change Hashsum loader to only verify necessary Hashsums
For the verification of the Hashsum used in the feed, an Iterator is used to check each line of the Hashsum file. The Hashsum was immediately verified, regardless if each iteration Item was even necessary. With this change, it is possible to only verify the Hashsum, when the corresponding File is needed.
* SC-954: Add /notus endpoint to get a list of supported product OS
* SC-967 Add: perform notus signature check
If enabled in the congiguration file (or passed via command line option) and the GNUPGHOME env variable is set pointing to the gnupg keyring, it will perform the signature check each time that a new product file is uploaded.
* Add notus standalone executable
* Change: add libcurl to docker images.
* Fix: CodeQL: uses build image
Although the build image construct got deprecated codeql relies on it.
To change that CodeQL now uses gvm-libs and install the dependencies like
the other build steps.
---------
Co-authored-by: Kraemii <[email protected]>
Co-authored-by: Philipp Eder <[email protected]>
0 commit comments