Skip to content

Instantly share code, notes, and snippets.

@lupyuen
Last active February 23, 2026 10:34
Show Gist options
  • Select an option

  • Save lupyuen/a3f75797d49ea7262b9a65dba6eba9e4 to your computer and use it in GitHub Desktop.

Select an option

Save lupyuen/a3f75797d49ea7262b9a65dba6eba9e4 to your computer and use it in GitHub Desktop.
NuttX Apps: Test Cases for new implementation of NuttX PR Labeling: https://github.com/apache/nuttx-apps/pull/3408

NuttX Apps: Test Cases for new implementation of NuttX PR Labeling

See the PR: apache/nuttx-apps#3408

Read the Article: https://lupyuen.org/articles/prtarget

Discussion: apache/nuttx#18359

Arch Labeling

Size Labeling

Response Time

  • PR Labeling must complete within 1.5 minutes

    Why? The Build Workflow begins in the Fetch-Source stage, checking out the Entire Repo and uploading everything in 1.5 minutes, followed by the Select-Builds stage (arch.yml) reading the PR Labels. Before 1.5 minutes, rightfully our workflow_run trigger would have written the PR Labels to the PR.

    (Then again: NuttX App PRs always trigger a Complete Build, never a Simple Arch-Specific Build)

    • New PR Labeling starts at 6:18:42, ends at 6:18:59. Total 17 elapsed seconds for New PR Labeling.

    • Old PR Labeling starts at 17:56:45, ends at 17:57:00. Total 15 elapsed seconds for Old PR Labeling.

Zizmor Security Scan

  • Zizmor Security Scan should not report any Security Issues. However Zizmor flags workflow_run as a Potential Security Issue, because it's unable to analyse the code inside the workflow. workflow_run is not forbidden in the ASF GitHub Actions Security Policy.
$ git clone https://github.com/lupyuen8/nuttx-apps

$ zizmor nuttx-apps/.github/workflows/labeler.yml
🌈 zizmor v1.22.0
 INFO audit: zizmor: 🌈 completed nuttx-apps/.github/workflows/labeler.yml
No findings to report. Good job! (4 suppressed)

$ zizmor nuttx-apps/.github/workflows/pr_labeler.yml
🌈 zizmor v1.22.0
 INFO audit: zizmor: 🌈 completed nuttx-apps/.github/workflows/pr_labeler.yml
error[dangerous-triggers]: use of fundamentally insecure workflow trigger
  --> nuttx-apps/.github/workflows/pr_labeler.yml:22:1
   |
22 | / on:
23 | |   workflow_run:
24 | |     workflows: ["Pull Request Labeler"]
25 | |     types:
26 | |       - completed
   | |_________________^ workflow_run is almost always used insecurely
   |
   = note: audit confidence β†’ Medium

7 findings (6 suppressed): 0 informational, 0 low, 0 medium, 1 high
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment