Skip to content

Conversation

nichtsfrei
Copy link
Member

This refactors openvasd to use:

  • SQLite
  • greenbone-scanner-framework
    And adds:
  • container-image-scanner functionality as a new endpoint localhost:3000/container-image-scanner/

TODO:

  • internal scanner needs to be implemented
  • lint issues needs to be fixed
  • code duplication needs to be reduced
  • workspace dependencies instead of each one separately in crates

@nichtsfrei nichtsfrei requested a review from a team as a code owner August 14, 2025 14:53
@nichtsfrei nichtsfrei marked this pull request as draft August 14, 2025 15:00
@nichtsfrei nichtsfrei force-pushed the refactor-openvasd branch 2 times, most recently from 3f4272a to 736d1df Compare August 15, 2025 05:04
Adds the greenbone-scanner-framework to enable us to remodel openvasd.

Chore: move vts to new greenbone-scanner-framework system

Chore: migrate notus endpoints to gsf
Instead of returning a boolean the construct to verify if the scan_id is
known by the client it now returns an Option<String>.

That way the implementing interfaces don't need client_id and scan_id
but just that internal id.
This adds a new scanner on the subroute: `container-image-scanner`.

Meaning the scans API is additionally available under e.g.
`curl localhost:3000/container-image-scanner/scans'
In environments that don't have a docker environment available we
download the images and extract them via download-frozen-image-v2.sh.

This bash script is based on:
https://raw.githubusercontent.com/moby/moby/refs/heads/master/contrib/download-frozen-image-v2.sh
Instead of having to define a duration like

```toml
[check_interval]
secs = 0
nanos = 500000000
```

you can additionally define it as

```toml
check_interval = "500ms"
```

Which makes the configuration less polluted and easier to read.
This allows us to configure some packages to be quieter than others:

```toml
[logging]
level = 'INFO'

[logging.additional]
sqlx = 'WARN'
```

This sets the overall logging level to INFO but sqlx to WARN.
@github-actions github-actions bot added the minor_release creates a minor release label Aug 15, 2025
@github-actions github-actions bot added minor_release creates a minor release and removed minor_release creates a minor release labels Aug 26, 2025
@github-actions github-actions bot added minor_release creates a minor release and removed minor_release creates a minor release labels Aug 26, 2025
@github-actions github-actions bot added minor_release creates a minor release and removed minor_release creates a minor release labels Aug 26, 2025
@github-actions github-actions bot added minor_release creates a minor release and removed minor_release creates a minor release labels Aug 28, 2025
@github-actions github-actions bot added minor_release creates a minor release and removed minor_release creates a minor release labels Aug 28, 2025
@github-actions github-actions bot added minor_release creates a minor release and removed minor_release creates a minor release labels Aug 28, 2025
@github-actions github-actions bot added minor_release creates a minor release and removed minor_release creates a minor release labels Aug 28, 2025
@github-actions github-actions bot added minor_release creates a minor release and removed minor_release creates a minor release labels Aug 28, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
minor_release creates a minor release
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants