-
Notifications
You must be signed in to change notification settings - Fork 0
fix: CSP Clerk-origin drift + Production Smoke failure paging (linejam-912, linejam-913) #300
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
d430a4e
9e17782
d506d53
c321937
b08bb6f
7ee876d
5e4a5bf
33e6205
65de13f
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -14,6 +14,9 @@ jobs: | |
| name: Production Smoke | ||
| runs-on: ubuntu-latest | ||
| timeout-minutes: 15 | ||
| permissions: | ||
| contents: read | ||
| actions: read | ||
| env: | ||
| PLAYWRIGHT_BASE_URL: https://www.linejam.app | ||
| PLAYWRIGHT_REQUIRE_AUTH_SMOKE: '1' | ||
|
|
@@ -43,13 +46,19 @@ jobs: | |
| run: pnpm exec playwright install chromium --with-deps | ||
|
|
||
| - name: Run production smoke | ||
| id: smoke | ||
| run: | | ||
| mkdir -p "$RUNNER_TEMP/linejam-smoke" | ||
| set +e | ||
| pnpm canary:smoke > "$RUNNER_TEMP/linejam-smoke/stdout.log" 2> "$RUNNER_TEMP/linejam-smoke/stderr.log" | ||
| code=$? | ||
| cat "$RUNNER_TEMP/linejam-smoke/stdout.log" | ||
| cat "$RUNNER_TEMP/linejam-smoke/stderr.log" >&2 | ||
| { | ||
| echo "detail<<SMOKE_DETAIL_EOF" | ||
| tail -c 2000 "$RUNNER_TEMP/linejam-smoke/stderr.log" | ||
| echo "SMOKE_DETAIL_EOF" | ||
| } >> "$GITHUB_OUTPUT" | ||
|
Comment on lines
+49
to
+61
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 🔒 Security & Privacy | 🟠 Major | ⚡ Quick win 🧩 Analysis chain🏁 Script executed: #!/bin/bash
set -euo pipefail
# Inspect the workflow around the referenced lines
file=".github/workflows/prod-smoke.yml"
wc -l "$file"
sed -n '1,160p' "$file"
echo
echo "---- search for LINEJAM_SMOKE_FAILURE_DETAIL and steps.smoke.outputs.detail ----"
rg -n "LINEJAM_SMOKE_FAILURE_DETAIL|steps\.smoke\.outputs\.detail|SMOKE_DETAIL_EOF|GITHUB_OUTPUT" .github/workflows . -g '*.yml' -g '*.yaml' -g '*.md'Repository: misty-step/linejam Length of output: 5521 🏁 Script executed: #!/bin/bash
set -euo pipefail
# Inspect GitHub Actions docs locally? (repo files only)
rg -n "multiline|GITHUB_OUTPUT|delimiter|random" .github README.md docs -g '*.md' -g '*.yml' -g '*.yaml' || trueRepository: misty-step/linejam Length of output: 837 Use a unique 🤖 Prompt for AI Agents |
||
| exit "$code" | ||
|
|
||
| - name: Upload production smoke logs | ||
|
|
@@ -70,3 +79,51 @@ jobs: | |
| playwright-report/ | ||
| if-no-files-found: ignore | ||
| retention-days: 14 | ||
|
|
||
| # linejam-913 (2026-07-04 outage postmortem): Production Smoke was RED | ||
| # for ~15 hours before the operator found the outage by hand -- the | ||
| # gate worked, nothing wired the red signal to a human or to BB | ||
| # triage. These two steps close that wire: count the consecutive | ||
| # failure streak (so one blip is an annotation, not a page), then | ||
| # report status to the `linejam-production-smoke` Canary monitor, | ||
| # whose `error` check-in maps directly to Canary's Down health state | ||
| # and opens/holds an incident that BB triage and the bridge feed both | ||
| # already consume. A passing run always reports `ok`, which resolves | ||
| # the incident. | ||
| - name: Determine consecutive-failure streak | ||
| id: streak | ||
| if: always() | ||
| env: | ||
| GITHUB_TOKEN: ${{ github.token }} | ||
| run: | | ||
| count="$(node scripts/ops/count-consecutive-prod-smoke-failures.mjs '${{ steps.smoke.outcome }}')" | ||
| echo "count=$count" >> "$GITHUB_OUTPUT" | ||
|
|
||
| - name: Report status to Canary | ||
| if: always() | ||
| env: | ||
| NEXT_PUBLIC_CANARY_API_KEY: ${{ secrets.NEXT_PUBLIC_CANARY_API_KEY }} | ||
| NEXT_PUBLIC_CANARY_ENDPOINT: ${{ secrets.NEXT_PUBLIC_CANARY_ENDPOINT }} | ||
| LINEJAM_SMOKE_OUTCOME: ${{ steps.smoke.outcome }} | ||
| LINEJAM_SMOKE_CONSECUTIVE_FAILURES: ${{ steps.streak.outputs.count }} | ||
| LINEJAM_SMOKE_RUN_URL: ${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }} | ||
| LINEJAM_SMOKE_FAILURE_DETAIL: ${{ steps.smoke.outputs.detail }} | ||
| run: node scripts/ops/report-prod-smoke-status.mjs | ||
|
|
||
| - name: Annotate failure in the step summary | ||
| if: steps.smoke.outcome == 'failure' | ||
| env: | ||
| STREAK_COUNT: ${{ steps.streak.outputs.count }} | ||
| RUN_URL: ${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }} | ||
| run: | | ||
| { | ||
| echo "## Production Smoke failed" | ||
| echo | ||
| echo "- Consecutive failures: ${STREAK_COUNT}" | ||
| echo "- Run: ${RUN_URL}" | ||
| if [ "${STREAK_COUNT}" -ge 2 ]; then | ||
| echo "- Escalated: reported to the \`linejam-production-smoke\` Canary monitor as Down (opens/holds an incident)." | ||
| else | ||
| echo "- Not yet escalated: below the 2-run threshold. Recorded on the monitor without opening an incident." | ||
| fi | ||
| } >> "$GITHUB_STEP_SUMMARY" | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,5 +1,28 @@ | ||
| { | ||
| "latest": "0.1.0", | ||
| "versions": ["0.1.0"], | ||
| "generatedAt": "2026-01-25T00:06:17.994Z" | ||
| "latest": "1.15.1", | ||
| "versions": [ | ||
| "1.15.1", | ||
| "1.15.0", | ||
| "1.14.0", | ||
| "1.13.0", | ||
| "1.12.0", | ||
| "1.11.0", | ||
| "1.10.0", | ||
| "1.9.1", | ||
| "1.9.0", | ||
| "1.8.0", | ||
| "1.7.0", | ||
| "1.6.0", | ||
| "1.5.0", | ||
| "1.4.0", | ||
| "1.3.0", | ||
| "1.2.0", | ||
| "1.1.3", | ||
| "1.1.2", | ||
| "1.1.1", | ||
| "1.1.0", | ||
| "1.0.0", | ||
| "0.1.0" | ||
| ], | ||
| "generatedAt": "2026-07-05T00:13:35.955Z" | ||
| } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🔒 Security & Privacy | 🟠 Major | ⚡ Quick win
Set
persist-credentials: falseon the checkout step.This job never pushes; persisting the
GITHUB_TOKENin the local git config is unnecessary residual credential exposure. zizmor flags this asartipacked.🔒 Proposed fix
- name: Checkout code uses: actions/checkout@v7 with: # linejam-914: the schema/migration sequencing check below needs # full history to resolve a merge-base against the PR's base ref. # This repo is small (a few hundred commits); a full fetch is cheap. fetch-depth: 0 + persist-credentials: false📝 Committable suggestion
🧰 Tools
🪛 zizmor (1.26.1)
[warning] 39-45: credential persistence through GitHub Actions artifacts (artipacked): does not set persist-credentials: false
(artipacked)
🤖 Prompt for AI Agents
Source: Linters/SAST tools