Skip to content

[FEATURE]: Add markdown report output for CI/CD #159

Description

@luisjones

Summary

Add Markdown as a supported DockSec report format.

This would allow scan results to be published directly into pull request comments, CI/CD job summaries, GitHub issues, and other Markdown-compatible interfaces.

Problem Statement

DockSec currently supports HTML, PDF, JSON, and CSV reports, but none of these formats can be posted directly as a readable pull request comment through GitHub.

For CI/CD use cases we currently need to either:

  • Convert the generated HTML report into Markdown using a third party package.
  • Parse the JSON output and manually construct a Markdown report using jq.

Our current CI/CD pipeline contains approximately 50 lines of jq and shell logic purely to parse DockSec's JSON output and generate a readable Markdown pull request comment. This adds unnecessary complexity, makes the pipeline harder to maintain and requiring maintainers to understand DockSec's internal JSON report structure

Proposed Solution

Add markdown as a supported report format.

For example:

docksec path/to/Dockerfile --format markdown

Alternatives Considered

Post a link to an uploaded report

The HTML or PDF report could be uploaded as a CI artifact and linked from the pull request similar to SonarQube. However, this requires reviewers to leave the pull request to view the results and may require additional authentication or artifact-retention configuration.
A Markdown report would allow the important results to be reviewed directly within the pull request.

Convert the HTML report to Markdown
The HTML report is designed as an interactive standalone report. Converting it into Markdown can produce inconsistent formatting and may lose information or presentation structure.

Use Case

Who would benefit from this feature?

  • Individual developers
  • DevOps teams
  • Security teams
  • CI/CD pipelines
  • Enterprise users
  • Other:

Acceptance Criteria

What does done look like?

  • A .md report file is generated when the format is selected. Markdown can be generated alongside the existing HTML, PDF, JSON, and CSV formats.
  • The report includes vulnerability counts grouped by severity.
  • The report includes a readable table of vulnerabilities and available fixed versions.

Implementation Ideas

The Markdown report could reuse the same normalised report data used by the existing HTML, PDF, JSON, and CSV exporters.

Severity Package Installed Version Fixed Version
HIGH example-package 1.0.0 1.0.1

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions