@@ -830,7 +830,7 @@ func (c *Compiler) generateCreateAwInfo(yaml *strings.Builder, data *WorkflowDat
830830 yaml .WriteString (" await main(core, context);\n " )
831831}
832832
833- func (c * Compiler ) generateOutputCollectionStep (yaml * strings.Builder , data * WorkflowData ) {
833+ func (c * Compiler ) generateOutputCollectionStep (yaml * strings.Builder , data * WorkflowData ) error {
834834 // Copy the raw safe-output NDJSON to a /tmp/gh-aw/ path so it can be included in the
835835 // unified agent artifact together with all other /tmp/gh-aw/ outputs.
836836 yaml .WriteString (" - name: Copy Safe Outputs\n " )
@@ -857,10 +857,18 @@ func (c *Compiler) generateOutputCollectionStep(yaml *strings.Builder, data *Wor
857857 var domainsStr string
858858 if data .SafeOutputs != nil && len (data .SafeOutputs .AllowedDomains ) > 0 {
859859 // allowed-domains: additional domains unioned with engine/network base set; supports ecosystem identifiers
860- domainsStr = c .computeExpandedAllowedDomainsForSanitization (data )
860+ expanded , err := c .computeExpandedAllowedDomainsForSanitization (data )
861+ if err != nil {
862+ return err
863+ }
864+ domainsStr = expanded
861865 } else {
862866 // Fall back to computing from network configuration (same as firewall)
863- domainsStr = c .computeAllowedDomainsForSanitization (data )
867+ computed , err := c .computeAllowedDomainsForSanitization (data )
868+ if err != nil {
869+ return err
870+ }
871+ domainsStr = computed
864872 }
865873 if domainsStr != "" {
866874 fmt .Fprintf (yaml , " GH_AW_ALLOWED_DOMAINS: %q\n " , domainsStr )
@@ -892,6 +900,7 @@ func (c *Compiler) generateOutputCollectionStep(yaml *strings.Builder, data *Wor
892900 yaml .WriteString (" const { main } = require('${{ runner.temp }}/gh-aw/actions/collect_ndjson_output.cjs');\n " )
893901 yaml .WriteString (" await main();\n " )
894902
903+ return nil
895904}
896905
897906// processMarkdownBody applies the standard post-processing pipeline to a markdown body:
0 commit comments