Skip to content

Add/get scan report command#3043

Merged
greenbonebot merged 15 commits into
mainfrom
add/get-report-command
Jul 21, 2026
Merged

Add/get scan report command#3043
greenbonebot merged 15 commits into
mainfrom
add/get-report-command

Conversation

@ozgen

@ozgen ozgen commented Jul 17, 2026

Copy link
Copy Markdown
Member

What

  • Add a new get_scan_report command
  • Return a structured report summary
  • Include task, target, progress, counts, severity, and scan information
  • Add GMP XML output
  • Fix memory cleanup
  • Add command documentation

Why

  • Separate report retrieval from report export
  • Avoid creating temporary report files

References

GEA-1937

ozgen added 5 commits July 16, 2026 16:18
Introduce a structured model for loading a single vulnerability report.

This adds:

report metadata
task and target information
resource and result summaries
filter and usage-type validation
timezone handling
memory cleanup

Audit reports remain separate.
Add GMP handling and XML output for structured report retrieval.

Include report metadata, task, target, progress, resource counts, result counts, severity, and scan information.
Add GMP documentation for structured report retrieval, including request attributes, response fields, filtering, and an example.
@ozgen
ozgen requested review from a team as code owners July 17, 2026 13:16
@greenbonebot
greenbonebot enabled auto-merge (rebase) July 17, 2026 13:17
ozgen and others added 5 commits July 20, 2026 08:44
* rename related functions and files
* align the command name with the scan report resource
* add support for singular GET response wrappers
* generate matching get_scan_report_response start and end tags
@ozgen ozgen changed the title Add/get report command Add/get scan report command Jul 20, 2026
Comment thread src/gmp_scan_report.c
@ozgen
ozgen requested a review from a-h-abdelsalam July 21, 2026 08:53
@greenbonebot
greenbonebot merged commit 8f859ce into main Jul 21, 2026
25 of 27 checks passed
@greenbonebot
greenbonebot deleted the add/get-report-command branch July 21, 2026 09:08
Comment thread src/gmp_scan_report.c

if (find_attribute (attribute_names,
attribute_values,
"report_id",

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Wouldn't it make sense to name the attribute scan_report_id for consistency?

Comment thread src/gmp_scan_report.c
Comment on lines +550 to +552
get_data_set_extra (&get_scan_report_data.get,
"report_id",
attribute);

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Is this really needed? For me this only makes sense for getting objects inside the report like get_report_hosts.

Comment thread src/manage_resources.c
&& strcasecmp (type, "report_tls_certificate")
&& strcasecmp (type, "report_vuln");
&& strcasecmp (type, "report_vuln")
&& strcasecmp (type, "scan_report");

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

The reports do have owners, so this should not be in here even though it may require some changes to ensure the permission checks use the "subtype".

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.

4 participants