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
{{ message }}
Repository navigation
Imported safe-outputs block re-enables missing-tool, missing-data and report-incomplete disabled in the main workflow #64542
Importing a shared workflow that has any safe-outputs block re-enables missing-tool, missing-data and report-incomplete even when the main workflow sets them to false.
The re-enabled handlers add their agent tools and create-issue: true reporting to the compiled workflow.
The docs say local configuration overrides imported configuration, so an explicit false in the main workflow should win.
Versions
gh-aw v0.89.22
The merge code in pkg/workflow/imports.go is unchanged on main (856e7fa).
with-import.lock.yml also gets GH_AW_MISSING_TOOL_CREATE_ISSUE: "true" and GH_AW_REPORT_INCOMPLETE_CREATE_ISSUE: "true".
In a real workflow that uses safe-outputs.github-app, this also adds permission-issues: write to the App token request, and the run fails when the App installation doesn't grant issues: The permissions requested are not granted to this installation.
Cause
mergeSafeOutputConfig (pkg/workflow/imports.go):
_, hasMissingTool:=config["missing-tool"]
if (hasMissingTool||result.MissingTool==nil) &&importedConfig.MissingTool!=nil {
result.MissingTool=importedConfig.MissingTool
}
missing-tool: false in the main workflow leaves result.MissingTool nil. extractSafeOutputsConfig auto-defaults importedConfig.MissingTool because the import has a safe-outputs block, even though the import never mentions missing-tool.
The result.MissingTool == nil arm cannot tell "disabled by the main workflow" from "not configured", so the auto-default replaces the explicit false. missing-data and report-incomplete follow the same pattern.
Workaround
Keep safe-outputs out of shared imports and put the settings, such as messages, in each main workflow.
Expected
An explicit false in the main workflow survives the merge, and an auto-default from an import never overrides a key the main workflow set.
Activity