You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
fix(cli): accept and ignore deprecated --step-summary flag (#804)
Older gh-aw releases still pass --step-summary to the detector, which
aborted detection with "flag provided but not defined" since the step
summary output was removed. Parse the flag, drop its value, and note on
stderr that it was ignored.
Co-authored-by: GitHub Ace <githubnext@users.noreply.github.com>
Co-authored-by: David Slater <12449447+davidslater@users.noreply.github.com>
-`--step-summary` — Deprecated and ignored. Accepted so hosts that still pass it (older `gh-aw` releases) do not fail; the detector no longer writes a GitHub Actions step summary
66
67
-`--version` — Print version and exit
67
68
68
69
`threat-detect` runs a single agentic CLI engine pass. The engine reports its
Copy file name to clipboardExpand all lines: cmd/threat-detect/main.go
+17Lines changed: 17 additions & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -115,6 +115,7 @@ func run() (code int) {
115
115
workflowDescriptionstring
116
116
customPromptstring
117
117
customPromptFilestring
118
+
stepSummarystring
118
119
versionbool
119
120
retriesint
120
121
)
@@ -132,6 +133,11 @@ func run() (code int) {
132
133
flag.StringVar(&workflowDescription, "workflow-description", "", "Workflow description for the prompt (overrides WORKFLOW_DESCRIPTION)")
133
134
flag.StringVar(&customPrompt, "custom-prompt", "", "Additional detection instructions appended to the prompt (overrides CUSTOM_PROMPT)")
134
135
flag.StringVar(&customPromptFile, "custom-prompt-file", "", "Path to a file with additional detection instructions (takes precedence over --custom-prompt and CUSTOM_PROMPT)")
136
+
// Accepted and ignored for backward compatibility: older gh-aw releases pass
137
+
// --step-summary, but the detector no longer writes a step summary (TD-20c).
138
+
// Rejecting the flag would abort detection in those hosts, so it is parsed
139
+
// and dropped instead.
140
+
flag.StringVar(&stepSummary, "step-summary", "", "Deprecated and ignored; the detector no longer writes a GitHub Actions step summary")
135
141
flag.BoolVar(&version, "version", false, "Print version and exit")
0 commit comments