-
-
Notifications
You must be signed in to change notification settings - Fork 0
chore(ci): repoint push-email-notify to smtp-notify-action #68
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
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 |
|---|---|---|
|
|
@@ -3,19 +3,43 @@ | |
| # 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: ['**'] | ||
| concurrency: | ||
| # Deliberately per-RUN, so no run is ever queued behind another and none is | ||
| # ever cancelled. Do NOT "tidy" this into a shared group such as | ||
| # ${{ github.workflow }}-${{ github.ref }}. GitHub's workflow-syntax docs: | ||
| # "By default, any existing pending job or workflow in the same concurrency | ||
| # group will be canceled and the new queued job or workflow will take its | ||
| # place." That happens regardless of cancel-in-progress, which governs only | ||
| # the RUNNING job. On this workflow it silently loses a notification email, | ||
| # with no error anywhere. Every run here reports a DISTINCT commit, so there | ||
| # is no redundant work for a concurrency limit to remove. | ||
| # The docs also offer `queue: max` (up to 100 pending); not used, because 100 | ||
| # is still a cap whereas a per-run group needs none. | ||
| # Verified with zizmor 1.30.0: deleting this block raises concurrency-limits; | ||
| # this form silences it exactly as a shared group would. | ||
| group: push-email-${{ github.run_id }} | ||
| cancel-in-progress: false | ||
| 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@0bbdab096651ee93f37ec02383e088183d41ff0b # pinned | ||
| uses: hyperpolymath/smtp-notify-action@ede1191ef6ff3ac02c4f4d9efdf837ee517e11d7 # v0.2.0 | ||
|
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. 🩺 Stability & Availability | 🔵 Trivial 🔎 Supported by static analysis🏁 Script executed: #!/bin/sh
set -eu
printf '%s\n' '--- workflow ---'
cat -n .github/workflows/push-email-notify.yml | sed -n '1,90p'
printf '%s\n' '--- action references and local SMTP configuration ---'
rg -n -C 3 'smtp-notify-action|secure:|SMTP|smtp|port|username|password' .github README.md 2>/dev/null || trueRepository: hyperpolymath/nextgen-language-evangeliser Length of output: 20470 🤖 get_repo_knowledge executed:
Length of output: 3510 🌐 Web query:
💡 Result: The repository hyperpolymath/smtp-notify-action does not appear to be a widely documented or standard public GitHub Action, and the specific commit hash (ede1191ef6ff3ac02c4f4d9efdf837ee517e11d7) does not surface in general search results. Hyperpolymath repositories often use standard, maintained alternatives like dawidd6/action-send-mail or step-security/action-send-mail for SMTP notifications [1][2][3]. Regarding the technical aspects of using AUTH PLAIN with STARTTLS: 1. Security of AUTH PLAIN with STARTTLS: AUTH PLAIN is considered secure only if the SMTP connection is already encrypted via STARTTLS or implicit TLS (SMTPS) [4][5]. When STARTTLS is correctly implemented, the connection is upgraded to an encrypted state before the authentication credentials (which are essentially sent in plaintext in the PLAIN mechanism) are transmitted [4]. 2. Risk of Man-in-the-Middle (MitM) Attacks: There is a known risk where a malicious actor can perform a MitM attack to downgrade or intercept the STARTTLS negotiation, potentially forcing an unencrypted connection [4]. To mitigate this, secure email implementations should either enforce TLS (disabling STARTTLS in favor of implicit TLS on port 465) or, if using STARTTLS, verify the server certificate and ideally reject the connection if encryption cannot be established [4][5][6]. 3. Best Practices in GitHub Actions: - Always use established, audited actions (e.g., dawidd6/action-send-mail) rather than custom scripts [1][7][8]. - Ensure the 'secure' or 'tls' option is set to true in the action configuration [1][9][7][10]. - Prefer port 465 (implicit TLS) over port 587 (STARTTLS) if the SMTP provider supports it, as it removes the risk of a plaintext downgrade during the handshake [9][7][8][4]. - Never store credentials in plaintext; always use GitHub Secrets [1][2][10]. If you are auditing code that uses a custom action or script for SMTP, ensure that the connection logic specifically requires encryption before calling the authentication/login method, as some implementations may mistakenly permit login over an unencrypted connection [6]. Citations:
🏁 Script executed: #!/bin/sh
set -eu
base='https://raw.githubusercontent.com/hyperpolymath/smtp-notify-action/ede1191ef6ff3ac02c4f4d9efdf837ee517e11d7'
printf '%s\n' '--- action.yml ---'
curl -fsSL "$base/action.yml"
printf '%s\n' '--- repository tree at pinned commit ---'
curl -fsSL "https://api.github.com/repos/hyperpolymath/smtp-notify-action/git/trees/ede1191ef6ff3ac02c4f4d9efdf837ee517e11d7?recursive=1" |
jq -r '.tree[] | select(.type == "blob") | .path' |
sed -n '1,120p'Repository: hyperpolymath/nextgen-language-evangeliser Length of output: 6254 🏁 Script executed: #!/bin/sh
set -eu
base='https://raw.githubusercontent.com/hyperpolymath/smtp-notify-action/ede1191ef6ff3ac02c4f4d9efdf837ee517e11d7'
for file in src/main.zig src/smtp.zig README.adoc MIGRATION.adoc; do
printf '\n--- %s ---\n' "$file"
curl -fsSL "$base/$file" | grep -n -E -C 4 'AUTH|PLAIN|STARTTLS|implicit|secure|SMTP_SECURE|SMTP_PORT|465|587' || true
doneRepository: hyperpolymath/nextgen-language-evangeliser Length of output: 18158 Use an SMTP endpoint that supports implicit TLS. The action receives 🤖 Prompt for AI AgentsSource: MCP tools |
||
| 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
🤖 get_repo_knowledge executed:
get_repo_knowledge hyperpolymath/nextgen-language-evangeliser /tmp/coderabbit-repo-knowledge/hyperpolymath-nextgen-language-evangeliser-d9d68324/architectureLength of output: 2747
🏁 Script executed:
Repository: hyperpolymath/nextgen-language-evangeliser
Length of output: 3461
🌐 Web query:
GitHub Actions push event branches filter deleted branch push payload deleted true head_commit null official documentation💡 Result:
When a branch is deleted on GitHub, it triggers the push webhook event with the
deletedattribute set totrue[1][2]. In this scenario, thehead_commitobject in the event payload is typicallynullbecause there is no head commit associated with a deleted branch [1][2]. To filter out workflows triggered by branch deletions, you can use a conditionalifstatement in your workflow job configuration to check the payload data. Example configuration to skip jobs when a branch is deleted: jobs: my_job: runs-on: ubuntu-latest if: ${{!github.event.deleted }} steps: - name: Run on push run: echo "This only runs for non-deletion pushes." Alternatively, if you need to specifically handle or ignore branch deletions, you can access thedeletedboolean directly from thegithub.eventcontext [1][2]. Key points regarding the GitHub Actionspushevent and deletions: - Branch deletion triggers apushevent [3][4]. - Thedeletedproperty in the event payload will betrue[1][2]. - Thehead_commitfield isnullwhen the branch is deleted [1][2]. - GitHub Actions branch filters (e.g.,on: push: branches: [...]) do not prevent the workflow from triggering upon deletion of a branch if that branch matches the filter; they only determine which branches cause the workflow to trigger when they are pushed to or deleted [3][5]. Therefore, using anifcondition is the standard way to programmatically ignore deletion events [4].Citations:
Exclude deleted branch pushes.
branches: ['**']does not exclude branch-deletion push events. These events setgithub.event.deletedtotrueandgithub.event.head_committonull, so the job can send a notification without a commit message. Add!github.event.deletedto the job condition.🤖 Prompt for AI Agents
Source: MCP tools