Repository navigation
Commit e643f44
Fix: Scan Preference handling
There were multiple issues with the scan preference handling:
1. All given values for preferences of type checkbox (bool) were yes, if they were not set to `0`.
With the fix the values `0`, `false` and `no` will lead to a false and the values `1`, `true`
and `yes` will lead to a true. All other values are invalid and logged. In this case VT
parameters are skipped and Scan Preferences fall back to their default.
2. Configured scan preferences via the command line or config file were ignored when a scan was
created. They were correctly set into the config, but never read. In the end just the default
values were used
3. Alive Test preference 7 value was always set to `yes`
All things are fixed now and tests were created.1 parent 3b5d4db commit e643f44
6 files changed
Lines changed: 478 additions & 139 deletions
File tree
- rust/src
- openvasd
- api_tests/snapshots
- config
- scans
- openvas
- scanner/preferences
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
11 | 11 | | |
12 | 12 | | |
13 | 13 | | |
| 14 | + | |
14 | 15 | | |
15 | 16 | | |
16 | 17 | | |
| |||
30 | 31 | | |
31 | 32 | | |
32 | 33 | | |
33 | | - | |
| 34 | + | |
34 | 35 | | |
35 | 36 | | |
36 | 37 | | |
| |||
94 | 95 | | |
95 | 96 | | |
96 | 97 | | |
97 | | - | |
| 98 | + | |
98 | 99 | | |
99 | 100 | | |
100 | 101 | | |
| |||
105 | 106 | | |
106 | 107 | | |
107 | 108 | | |
| 109 | + | |
| 110 | + | |
| 111 | + | |
| 112 | + | |
108 | 113 | | |
109 | 114 | | |
110 | 115 | | |
| |||
0 commit comments