-
-
Notifications
You must be signed in to change notification settings - Fork 0
chore(ci): repoint push-email-notify to smtp-notify-action #73
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
base: main
Are you sure you want to change the base?
Changes from all commits
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 | ||||
|---|---|---|---|---|---|---|
|
|
@@ -4,19 +4,27 @@ | |||||
| # PUSH_EMAIL_ENABLED=true (the single on/off switch). Addresses are pre-filled; | ||||||
| # sending needs the org SMTP secrets (SMTP_HOST/PORT/USER/PASS). Inherited by | ||||||
| # new repos from the template; placed on existing repos by the farm sweep. | ||||||
| # | ||||||
| # Re-landed after the 2026-07-20 notification-storm freeze (removed in | ||||||
| # 09f94c5), now on hyperpolymath/smtp-notify-action: Node-free, the SMTP | ||||||
| # session is Idris2-specified and machine-checked, the binary is Zig-built, | ||||||
| # byte-reproducible, and SHA-256-pinned inside the action itself. | ||||||
| name: Push email notification | ||||||
| on: | ||||||
| push: {} | ||||||
| push: | ||||||
| # Branch pushes only: tag and deletion payloads mislabel Branch:/head_commit. | ||||||
| branches: ['**'] | ||||||
| permissions: | ||||||
| contents: read | ||||||
| jobs: | ||||||
| notify: | ||||||
| name: Email on push | ||||||
| if: ${{ vars.PUSH_EMAIL_ENABLED == 'true' }} | ||||||
| runs-on: ubuntu-latest | ||||||
| timeout-minutes: 5 | ||||||
| steps: | ||||||
| - name: Send push notification email | ||||||
| uses: dawidd6/action-send-mail@v3.12.0 | ||||||
| uses: hyperpolymath/smtp-notify-action@v0.1.0 # NOSONAR — pin authority is actions.lock (sha1-1b3b752d39a4fe4c0f28f10905e4608789d3e050) | ||||||
|
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 🔎 Supported by static analysis🏁 Script executed: #!/bin/bash
set -eu
printf '%s\n' '--- applicable repository conventions ---'
find /tmp/coderabbit-repo-knowledge/hyperpolymath-conflow-91d62b7b -type f -name '*.md' -print \
| sort \
| while read -r f; do
printf '%s\n' "--- $f"
head -80 "$f"
done
printf '%s\n' '--- workflow ---'
cat -n .github/workflows/push-email-notify.yml
printf '%s\n' '--- lockfile references ---'
rg -n -C 3 'smtp-notify-action|1b3b752d39a4fe4c0f28f10905e4608789d3e050|v0\.1\.0' .github/workflows/actions.lock .github/workflows 2>/dev/null || trueRepository: hyperpolymath/conflow Length of output: 17877 🏁 Script executed: #!/bin/bash
set -u
repo='hyperpolymath/smtp-notify-action'
tag='v0.1.0'
sha='1b3b752d39a4fe4c0f28f10905e4608789d3e050'
printf '%s\n' '--- tag reference ---'
gh api "repos/$repo/git/refs/tags/$tag" --jq '.object | {sha,type}' || true
printf '%s\n' '--- pinned commit ---'
gh api "repos/$repo/commits/$sha" --jq '{sha,html_url}' || true
printf '%s\n' '--- repository documentation references to pinning ---'
curl -L --fail --silent --show-error \
"https://raw.githubusercontent.com/$repo/$tag/README.md" \
| rg -n -i -C 2 'pin|commit|sha|uses:' || trueRepository: hyperpolymath/conflow Length of output: 535 🏁 Script executed: #!/bin/bash
set -u
repo='hyperpolymath/smtp-notify-action'
tag_object='1fb433a0048cf21f40499d54b1bd236ad52b6bc9'
printf '%s\n' '--- annotated tag target ---'
gh api "repos/$repo/git/tags/$tag_object" --jq '.object | {sha,type}' || true
printf '%s\n' '--- tag metadata ---'
gh api "repos/$repo/git/tags/$tag_object" --jq '{tag,message,object}' || true
printf '%s\n' '--- repository root files ---'
gh api "repos/$repo/git/trees/v0.1.0" --jq '.tree[] | .path' || trueRepository: hyperpolymath/conflow Length of output: 989 Pin the action with the full commit SHA. The workflow executes Proposed fix- uses: hyperpolymath/smtp-notify-action@v0.1.0 # NOSONAR — pin authority is actions.lock (sha1-1b3b752d39a4fe4c0f28f10905e4608789d3e050)
+ uses: hyperpolymath/smtp-notify-action@1b3b752d39a4fe4c0f28f10905e4608789d3e050 # v0.1.0📝 Committable suggestion
Suggested change
🧰 Tools🪛 zizmor (1.29.0)[error] 27-27: unpinned action reference (unpinned-uses): action is not pinned to a hash (required by blanket policy) (unpinned-uses) 🤖 Prompt for AI AgentsSource: Linters/SAST tools 🩺 Stability & Availability | 🟠 Major | 🏗️ Heavy lift 🔎 Supported by static analysis🏁 Script executed: #!/bin/bash
set -eu
printf '%s\n' '--- applicable repository guidance ---'
find /tmp/coderabbit-repo-knowledge/hyperpolymath-conflow-91d62b7b -type f -name '*.md' -print
printf '%s\n' '--- workflow diff and file ---'
git diff -- .github/workflows/push-email-notify.yml
cat -n .github/workflows/push-email-notify.yml
printf '%s\n' '--- directly referenced action/lock definitions ---'
rg -n -i --hidden --glob '!node_modules' --glob '!dist' \
'smtp-notify-action|actions\.lock|TransientFailure|retry|4[0-9][0-9]' \
.github . 2>/dev/null | head -200Repository: hyperpolymath/conflow Length of output: 22349 🏁 Script executed: #!/bin/bash
set -eu
printf '%s\n' '--- lock entry ---'
sed -n '116,132p' .github/workflows/actions.lock
printf '%s\n' '--- repository status and workflow history summary ---'
git status --short
git diff --stat
printf '%s\n' '--- smtp-notify-action v0.1.0 metadata ---'
for path in action.yml action.yaml README.md; do
url="https://raw.githubusercontent.com/hyperpolymath/smtp-notify-action/v0.1.0/$path"
printf '\n--- %s ---\n' "$url"
curl -fsSL --max-time 20 "$url" || true
done
printf '%s\n' '--- v0.1.0 repository tree ---'
curl -fsSL --max-time 20 \
'https://api.github.com/repos/hyperpolymath/smtp-notify-action/git/trees/v0.1.0?recursive=1' |
jq -r '.tree[]?.path' | head -200
printf '%s\n' '--- previous action source ---'
curl -fsSL --max-time 20 \
'https://raw.githubusercontent.com/dawidd6/action-send-mail/v3.12.0/main.js' |
rg -n -C 5 'TransientFailure|retry|4[0-9][0-9]|sendMail' | head -120Repository: hyperpolymath/conflow Length of output: 6684 🏁 Script executed: #!/bin/bash
set -eu
printf '%s\n' '--- smtp-notify-action v0.1.0 SMTP error handling ---'
for path in src/main.zig src/smtp.zig src/generated/smtp_fsm.zig; do
url="https://raw.githubusercontent.com/hyperpolymath/smtp-notify-action/v0.1.0/$path"
printf '\n--- %s ---\n' "$url"
curl -fsSL --max-time 20 "$url" |
rg -n -C 8 'TransientFailure|transient|4[0-9][0-9]|return error|catch|send|retry|exit' |
head -240
done
printf '%s\n' '--- previous action sendMail retry path ---'
curl -fsSL --max-time 20 \
'https://raw.githubusercontent.com/dawidd6/action-send-mail/v3.12.0/main.js' |
sed -n '115,180p'Repository: hyperpolymath/conflow Length of output: 18448 Preserve bounded retry behaviour for transient SMTP failures.
🧰 Tools🪛 zizmor (1.29.0)[error] 27-27: unpinned action reference (unpinned-uses): action is not pinned to a hash (required by blanket policy) (unpinned-uses) 🤖 Prompt for AI Agents |
||||||
| with: | ||||||
| server_address: ${{ secrets.SMTP_HOST }} | ||||||
| server_port: ${{ secrets.SMTP_PORT }} | ||||||
|
|
||||||
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.
🎯 Functional Correctness | 🟡 Minor | ⚡ Quick win
🔎 Supported by static analysis
🏁 Script executed:
Repository: hyperpolymath/conflow
Length of output: 3480
🌐 Web query:
GitHub Actions push event branches filter branch deletion deleted true head_commit null documentation💡 Result:
When a branch is deleted on GitHub, the push event is triggered [1][2]. In the webhook payload for this event, the deleted field is set to true, and head_commit is null because there is no head commit associated with a deleted reference [2][3]. If you have configured your workflow with a branches filter (e.g., on: push: branches: - 'main'), the filter is evaluated against the deleted ref [4][5]. Because the push event for a deletion still provides the ref name, the workflow may trigger if the deleted branch name matches your filter pattern [1]. To prevent workflows from running on branch deletion, you can add a condition to your job or workflow steps that checks the github.event.deleted context [1]: jobs: my_job: if: ${{!github.event.deleted }} runs-on: ubuntu-latest steps: - run: echo "This only runs if the branch was not deleted." This condition ensures the logic only executes when a standard push occurs, bypassing the deletion event which inherently lacks a head commit [1][2].
Citations:
Exclude branch-deletion pushes from the job.
branches: ['**']also matches branch deletion pushes. These events setgithub.event.deletedtotrueandhead_committonull. Addgithub.event.deleted != trueto the job condition.🧰 Tools
🪛 zizmor (1.29.0)
[warning] 13-16: insufficient job-level concurrency limits (concurrency-limits): workflow is missing concurrency setting
(concurrency-limits)
🤖 Prompt for AI Agents