Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Get scanner details #1612

Merged
merged 4 commits into from
Apr 24, 2024
Merged

Get scanner details #1612

merged 4 commits into from
Apr 24, 2024

Conversation

Kraemii
Copy link
Member

@Kraemii Kraemii commented Apr 3, 2024

Rename scanner preferences to scan preferences
Add get scanner details from OSP to the new scanner API as get scan preferences
Implement the new endpoint into Openvasd

The new endpoint is /scans/preferences and a simple get command should get something like:

[{
    "id": "auto_enable_dependencies",
    "name": "Automatic Enable Dependencies",
    "default": true,
    "description": "OpenVAS plugins use the result of each other to execute their job. For instance, a plugin which logs into the remote SMB registry will need the results of the plugin which finds the SMB name of the remote host and the results of the plugin which attempts to log into the remote host. If you want to only select a subset of the plugins available, tracking the dependencies can quickly become tiresome. If you set this option to 'yes', openvas will automatically enable the plugins that are depended on."
}, {
    "id": "cgi_path",
    "name": "CGI Path",
    "default": "/cgi-bin:/scripts",
    "description": "By default, openvas looks for default CGIs in /cgi-bin and /scripts. You may change these to something else to reflect the policy of your site. The syntax of this option is the same as the shell $PATH variable: path1:path2:..."
}, ...]

Jira: SC-1040

@Kraemii Kraemii requested a review from a team as a code owner April 3, 2024 07:58
@Kraemii Kraemii force-pushed the get-scanner-details branch 3 times, most recently from 9ccaebb to 720656c Compare April 3, 2024 12:22
Copy link
Member Author

@Kraemii Kraemii left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This PR contains an API change for the rename of scanner_preference to scan_preference and should only be included for the next Major Release

@Kraemii Kraemii marked this pull request as draft April 3, 2024 12:43
@Kraemii Kraemii force-pushed the get-scanner-details branch 2 times, most recently from 6e70d84 to 13235e0 Compare April 3, 2024 15:02
@Kraemii Kraemii marked this pull request as ready for review April 3, 2024 16:07
@Kraemii
Copy link
Member Author

Kraemii commented Apr 3, 2024

Moved API changes to a new PR #1615

jjnicola
jjnicola previously approved these changes Apr 4, 2024
@Kraemii Kraemii enabled auto-merge (rebase) April 10, 2024 08:54
It is now possible to reach the entrypoint /scans/preferences to get a list of all preferences available for a scan.
All available preferences are hardcoded, as they are static.
@Kraemii Kraemii merged commit e211b6f into main Apr 24, 2024
6 of 8 checks passed
@Kraemii Kraemii deleted the get-scanner-details branch April 24, 2024 08:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants