Skip to main content

Output Destinations

Where rendered outputs go. For formatting & templates see: Output Formats. Combining semantics: Combining & Grouping.

Supported Destinations

Destination PrefixExamplePurpose
git:prgit:prPost / update pull request comment (requires PR context)
git:issuegit:issueCreate / update issue (repository backlog tracking)
file:file:/results/report.mdPersist artifact in mounted /results volume
log:stdoutlog:stdoutPrint to standard output (CI logs)
log:stderrlog:stderrPrint to error stream

Destination string format: <prefix>[:<path>] where git:pr / git:issue ignore path; file: requires absolute or relative path inside writable mount; log: variants ignore path.

Examples

Minimal PR table:

{"format":"markdown","template":"table","destination":"git:pr","fields":["VulnerabilityID","Severity"],"changes":["new"]}

Issue (backlog) plus PR (delta) split:

[
{"format":"markdown","template":"table","destination":"git:pr","changes":["new","changed"],"title":"New / Changed High+ Vulns"},
{"format":"markdown","template":"table","destination":"git:issue","changes":["existing"],"title":"Existing High+ Vulns Backlog","collapse":true}
]

File JSON export:

{"format":"json","destination":"file:/results/vuln-diff.json","changes":["new","changed","removed"],"combined":true}

Console (stdout) license summary:

{"format":"markdown","template":"text","destination":"log:stdout","changes":["new"],"title":"License Changes"}

Combined Destinations

combined:true aggregates multiple policy outputs targeting the same (destination, format) pair into a single artifact. Homogeneous format required (JSON groups yield one concatenated array; markdown groups produce one merged comment section). Full rules: Combining & Grouping.

Example combining vulnerability + license into one PR comment:

{
"vulnerability": [
{"name":"crit-block","actions":{"new":"block"},"rules":[{"field":"Severity","type":"eq","value":"CRITICAL"}],
"outputs":[{"format":"markdown","template":"table","destination":"git:pr","combined":true,"title":"Critical Vulnerabilities"}]}],
"license": [
{"name":"gpl-block","actions":{"new":"block"},"rules":[{"field":"Name","type":"contains","value":"GPL"}],
"outputs":[{"format":"markdown","template":"table","destination":"git:pr","combined":true,"title":"GPL License Issues"}]}]
}

Environment Requirements (Git Destinations)

VariableRequired ForNotes
GITHUB_TOKENgit:pr, git:issueAPI token with comment / issue scope
GITHUB_OWNERgit:pr, git:issueRepository owner
GITHUB_REPOgit:pr, git:issueRepository name
GITHUB_PR_NRgit:prPR number (when CI_EVENT=pr)
CI_EVENTgit:prMust be pr for diff; main skips PR posting

Without required env vars a destination is skipped (others still process).

Change Category Strategy

Typical mapping:

  • PR (git:pr): new, changed — actionable delta
  • Issue (git:issue): existing — backlog visibility
  • File / JSON: include removed for audit/history

See: Diff-Based Analysis.

AI Governance Rationale

Destination segregation enables governance without overwhelming reviewers: PR comment shows only net‑new critical risk while backlog issues track legacy debt; JSON files power automated dashboards / compliance checks for AI‑accelerated change velocity.

Common Mistakes & Fixes

ProblemCauseFix
Empty PR commentOnly existing changes selectedInclude new / changed in changes for PR outputs
Mixed formats in combined groupCombined group mixes JSON with markdown/htmlUse homogeneous format groups
Destination validation errorInvalid prefix (e.g. stdout:)Use log:stdout or log:stderr
File not writtenPath not in mounted writable volumeEnsure file: path resolves within /results (or write mount)
PR not postedMissing required GitHub env varsProvide GITHUB_PR_NR, CI_EVENT=pr, token, owner, repo

Best Practices

GoalRecommendation
Minimize PR noiseLimit PR outputs to delta (new + changed)
Persistent backlogRoute existing issues to a single git:issue combined report
Automation / ingestionGenerate at least one JSON file per critical domain
TraceabilityInclude JSON artifact path in CI summary
ClarityUse title + concise comment to contextualize each combined section

Next: refine which fields & rules feed these outputs via the Policy System.