Skip to content

Follow up: align vulnerability report HTML asset references with selected graph output format #2013

Description

@coderabbitai

Summary

The vulnerability report page generator currently hardcodes SVG asset references in the generated HTML, but the graph generator only writes SVG files when --svg-output is enabled.

This can produce broken image links in at least two cases:

  • page generation runs without SVG graph generation
  • graphs are generated with PNG output only

Rationale

The HTML template and the graph writer should stay aligned so the generated page never points to files that were not created.

Affected area

  • scripts/vulnerability_report.py
    • generate_page()
    • main() / page-generation call site
    • related argument validation in check_args() if SVG must be required for page generation

Required changes

Implement one of the following approaches:

  1. Require SVG output whenever page generation is requested, or
  2. Pass the selected output format into the page template and reference the generated asset type consistently

Also ensure page-only runs cannot emit HTML that references missing graph files.

Acceptance criteria

  • The generated HTML references files that are actually produced by the selected graph output settings
  • --generate-page cannot succeed with broken graph links caused by format mismatch
  • The logic between graph generation and page rendering is consistent and easy to follow

Backlinks

Requested by: @tisnik

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions