Skip to content

fix(ci): never print the alarm webhook's response into Actions logs - #267

Merged
NickAltstein merged 1 commit into
mainfrom
fix/alarm-webhook-no-echo
Nov 24, 2026
Merged

NickAltstein merged 1 commit into
mainfrom
fix/alarm-webhook-no-echo

Conversation

@NickAltstein

@NickAltstein NickAltstein commented Nov 24, 2026 •

Copy link
Copy Markdown
Owner

Split out of #266 so the security fix can merge without waiting for the deploy-hook test.

Why

Every "Notify on failure" step posted with curl -fsS, which prints the response body into the job log. ntfy's response names the topic, so today's data_health alert test wrote the topic into a public Actions log. Other runs where "Notify on failure" fired today likely did too. On a public ntfy topic the name is the only credential: anyone who has it can read alerts or send fake ones.

What changed

  • All 14 alert curls now discard the response body with -o /dev/null.
  • tests/test_alarm_webhook_logging.py fails if any curl that posts to ALARM_WEBHOOK_URL omits it or turns on verbose output (-v, --verbose, --trace*). It passes with the fix and fails on the old lines.
  • The Python and JS senders (feed_age.py, deploy_gate.py, check_live_feed.py, api/schedules/_core.mjs) already read and discard the response.

Not in this PR

Rotating the topic, which happens outside the repo:

  • Preferred: a reserved, access-controlled ntfy topic, posted with an Authorization header. Nothing echoes headers: no -v, no set -x.
  • Quicker: a new random topic name of about 32 characters.

Update ALARM_WEBHOOK_URL in every place it lives:

Once rotated, the old logs only reveal a dead topic.

Testing

  • pytest tests/test_alarm_webhook_logging.py: 3 passed.
  • pytest tests --ignore=tests/ledger: 822 passed, 3 skipped.

🤖 Generated with Claude Code

Every "Notify on failure" step posted with curl -fsS, which prints the
response body. ntfy's response names the topic, so today's data_health
alert test wrote the topic into a public Actions log; anyone who knows an
ntfy topic can read or post to it. All 14 alert curls now discard the
body with -o /dev/null. A test fails if any curl that posts to
ALARM_WEBHOOK_URL omits it or turns on verbose output.

The topic itself still needs rotating; that is outside the repo.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
NickAltstein added a commit that referenced this pull request Nov 24, 2026
This PR now carries only the change that turns off automatic git
deploys. It stays unmerged until the ntfy topic is rotated, the forced
deploy-hook test has passed with automatic deploys still on, and the
alert test has reached the phone. The webhook fix ships first, in #267.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@NickAltstein
NickAltstein merged commit ac835fd into main Nov 24, 2026
5 checks passed
@NickAltstein
NickAltstein deleted the fix/alarm-webhook-no-echo branch November 24, 2026 21:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant