Skip to content

Commit bdd93dc

Browse files
authored
ci: reject multi-line codex auth secret (#1306)
1 parent 2e77dd4 commit bdd93dc

1 file changed

Lines changed: 6 additions & 0 deletions

File tree

‎.github/workflows/triage.yml‎

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -89,6 +89,12 @@ jobs:
8989
exit 1
9090
fi
9191
92+
# GitHub masks each line of a multi-line secret, and a masked `{` drops every JSON job output.
93+
if [[ "${CODEX_AUTH_JSON%$'\n'}" == *$'\n'* ]]; then
94+
echo "::error::CODEX_AUTH_JSON spans multiple lines. Store it with 'jq -c . auth.json | gh secret set CODEX_AUTH_JSON'."
95+
exit 1
96+
fi
97+
9298
jq -c . "$HOME/.codex/auth.json" > "$RUNNER_TEMP/auth-before.json"
9399
94100
- name: Collect issue

0 commit comments

Comments
 (0)