VulnCheck.Report.GitHub (VulnCheck v1.0.1)

Copy Markdown View Source

GitHub Actions report (--format github).

Prints workflow commands that GitHub turns into pull request annotations: ::error for reachable findings, ::warning for potentially reachable findings and retired releases (::notice for unreachable ones with --show-unreachable). When GITHUB_STEP_SUMMARY is set, the Markdown report is appended to the job summary as well.

Summary

Functions

Escapes workflow command data.

Escapes a workflow command property value.

Appends the Markdown report to the file named by GITHUB_STEP_SUMMARY. Does nothing when the variable is unset.

Functions

data(text)

@spec data(String.t()) :: String.t()

Escapes workflow command data.

iex> VulnCheck.Report.GitHub.data("50% done\nnext")
"50%25 done%0Anext"

property(text)

@spec property(String.t()) :: String.t()

Escapes a workflow command property value.

iex> VulnCheck.Report.GitHub.property("a:b,c")
"a%3Ab%2Cc"

write_step_summary(report, config)

@spec write_step_summary(VulnCheck.Types.ScanReport.t(), VulnCheck.Config.t()) ::
  :ok | {:error, File.posix()}

Appends the Markdown report to the file named by GITHUB_STEP_SUMMARY. Does nothing when the variable is unset.