Skip to content

Instantly share code, notes, and snippets.

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

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

Select an option

Save lupyuen/e160cc0a57c72ec95432ee148237c5f0 to your computer and use it in GitHub Desktop.
Test Cases for new implementation of NuttX PR Labeling: https://github.com/apache/nuttx/issues/18359

Test Cases for new implementation of NuttX PR Labeling

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.

    • New PR Labeling starts at 6:44:22, ends at 6:44:38. Total 16 elapsed seconds for New PR Labeling.

    • Old PR Labeling starts at 3:46:41, ends at 3:47:16. Total 35 elapsed seconds for Old PR Labeling. (Sometimes 24 seconds)

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.
$ git clone https://github.com/lupyuen6/nuttx
$ cd nuttx

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

$ zizmor .github/workflows/pr_labeler.yml
🌈 zizmor v1.22.0
 INFO audit: zizmor: 🌈 completed .github/workflows/pr_labeler.yml
error[dangerous-triggers]: use of fundamentally insecure workflow trigger
  --> .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