@htekdev/actions-debugger 1.0.23 → 1.0.25

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (61) hide show
  1. package/errors/caching-artifacts/artifact-minimum-retention-one-day.yml +153 -0
  2. package/errors/caching-artifacts/cache-api-propagation-delay-post-save.yml +128 -0
  3. package/errors/caching-artifacts/cache-backend-internal-error-skipped.yml +75 -0
  4. package/errors/caching-artifacts/cache-hit-step-id-case-sensitive-mismatch.yml +95 -0
  5. package/errors/caching-artifacts/cache-save-post-step-skipped-on-failure.yml +114 -0
  6. package/errors/concurrency-timing/deploy-pages-in-progress-deployment-wedged.yml +70 -0
  7. package/errors/concurrency-timing/deployment-review-timeout-expired.yml +88 -0
  8. package/errors/concurrency-timing/job-concurrency-scope-per-run-not-global.yml +81 -0
  9. package/errors/concurrency-timing/merge-queue-concurrency-cancel-blocks-all.yml +86 -0
  10. package/errors/concurrency-timing/reusable-workflow-github-workflow-context-cancel.yml +124 -0
  11. package/errors/concurrency-timing/runner-scale-set-jobs-never-start.yml +123 -0
  12. package/errors/concurrency-timing/runner-temp-dir-race-concurrent-workers.yml +90 -0
  13. package/errors/known-unsolved/artifact-download-url-unauthenticated-404.yml +98 -0
  14. package/errors/known-unsolved/checkout-v6-credentials-docker-run-manual.yml +105 -0
  15. package/errors/known-unsolved/concurrency-groups-repo-scoped-only.yml +138 -0
  16. package/errors/known-unsolved/environment-deployment-false-custom-protection.yml +93 -0
  17. package/errors/known-unsolved/matrix-256-job-limit.yml +142 -0
  18. package/errors/known-unsolved/merge-group-paths-filter-not-supported.yml +137 -0
  19. package/errors/known-unsolved/no-job-allow-failure.yml +73 -0
  20. package/errors/known-unsolved/schedule-cron-hours-long-queue-drift.yml +101 -0
  21. package/errors/permissions-auth/checkout-persist-credentials-token-write.yml +90 -0
  22. package/errors/permissions-auth/checkout-v6-cross-repo-token-override.yml +103 -0
  23. package/errors/permissions-auth/create-github-app-token-cross-job-token-revoked.yml +95 -0
  24. package/errors/permissions-auth/github-token-contents-write-missing-git-push.yml +117 -0
  25. package/errors/permissions-auth/org-actions-policy-blocks-unapproved-action.yml +106 -0
  26. package/errors/runner-environment/codeql-action-v2-deprecated.yml +110 -0
  27. package/errors/runner-environment/macos-26-openssl-3-system-library-breaking.yml +114 -0
  28. package/errors/runner-environment/macos-26-ruby-34-default-upgrade.yml +114 -0
  29. package/errors/runner-environment/macos-26-xcode-default-265-pin-required.yml +99 -0
  30. package/errors/runner-environment/macos-latest-label-switches-to-macos26.yml +127 -0
  31. package/errors/runner-environment/maven-gradle-403-cache-backend-outage.yml +116 -0
  32. package/errors/runner-environment/node20-removed-toolcache-default-node22.yml +104 -0
  33. package/errors/runner-environment/powershell-74-76-threadjob-module-rename.yml +124 -0
  34. package/errors/runner-environment/self-hosted-runner-not-found.yml +134 -0
  35. package/errors/runner-environment/self-hosted-runner-selinux-service-exec-failure.yml +116 -0
  36. package/errors/runner-environment/service-container-no-healthcheck.yml +158 -0
  37. package/errors/runner-environment/setup-node-v5-corepack-pnpm-not-found.yml +101 -0
  38. package/errors/runner-environment/setup-node-yarn-not-installed-self-hosted.yml +76 -0
  39. package/errors/runner-environment/setup-python-externally-managed-env-error.yml +95 -0
  40. package/errors/runner-environment/windows-2019-runner-retired-june2025.yml +118 -0
  41. package/errors/runner-environment/windows-2022-docker-daemon-not-started.yml +108 -0
  42. package/errors/silent-failures/cache-hit-output-string-not-boolean.yml +96 -0
  43. package/errors/silent-failures/checkout-lfs-pointer-not-content.yml +105 -0
  44. package/errors/silent-failures/reusable-workflow-output-skipped-contains-secret.yml +115 -0
  45. package/errors/silent-failures/setup-node-silent-download-exit-zero.yml +105 -0
  46. package/errors/silent-failures/setup-python-truncated-manifest-silent-exit.yml +111 -0
  47. package/errors/silent-failures/undefined-env-expression-empty-string-silent.yml +115 -0
  48. package/errors/silent-failures/windows-powershell-github-output-bash-syntax.yml +118 -0
  49. package/errors/triggers/fork-pr-first-time-contributor-approval-required.yml +142 -0
  50. package/errors/triggers/on-push-branches-glob-star-no-slash-match.yml +78 -0
  51. package/errors/triggers/pull-request-target-env-protection-default-branch-eval.yml +117 -0
  52. package/errors/triggers/required-status-check-renamed-never-passes.yml +87 -0
  53. package/errors/triggers/schedule-cron-self-hosted-runner-not-triggered.yml +107 -0
  54. package/errors/yaml-syntax/case-function-runner-version-too-old.yml +100 -0
  55. package/errors/yaml-syntax/composite-action-run-shell-missing.yml +90 -0
  56. package/errors/yaml-syntax/composite-action-secrets-context-unavailable.yml +99 -0
  57. package/errors/yaml-syntax/github-script-octokit-renamed-to-github.yml +130 -0
  58. package/errors/yaml-syntax/labeler-v5-config-format-breaking.yml +67 -0
  59. package/errors/yaml-syntax/runs-on-expression-array-syntax-error.yml +121 -0
  60. package/errors/yaml-syntax/setup-go-matrix-version-float-coercion.yml +69 -0
  61. package/package.json +1 -1
@@ -0,0 +1,107 @@
1
+ id: triggers-024
2
+ title: "Scheduled Cron Workflow Does Not Trigger on Self-Hosted Runner"
3
+ category: triggers
4
+ severity: error
5
+ tags:
6
+ - cron
7
+ - schedule
8
+ - self-hosted-runner
9
+ - trigger
10
+ - offline
11
+ patterns:
12
+ - regex: "cron.*self.hosted"
13
+ flags: "i"
14
+ - regex: "schedule.*self.hosted"
15
+ flags: "i"
16
+ error_messages:
17
+ - "No trigger for scheduled cron task in Github actions on a self-hosted runner"
18
+ root_cause: |
19
+ Scheduled (on: schedule) workflows are queued by GitHub hosted-runner dispatch
20
+ infrastructure. When the job targets a self-hosted runner (runs-on: [self-hosted, ...]),
21
+ the schedule dispatcher attempts to assign the job to a registered self-hosted runner.
22
+
23
+ The workflow silently never runs when:
24
+ 1. The self-hosted runner is offline or disconnected at the moment the schedule fires.
25
+ 2. The runner is busy with another job and no other runner with the required label is idle.
26
+ 3. The runner binary is outdated or the registration token has expired, causing the runner
27
+ to appear registered but fail to accept new jobs.
28
+ 4. The repository has been inactive for 60+ days (GitHub disables scheduled workflows
29
+ on inactive repositories automatically).
30
+
31
+ Unlike GitHub-hosted runners, where a fresh VM is provisioned on demand for every job,
32
+ self-hosted runners must be online and idle at exactly the moment the schedule fires.
33
+ If no eligible runner is available, the queued job is eventually abandoned with no retry
34
+ and no error visible in the Actions UI. The run simply does not appear.
35
+ Reported in actions/runner#4210 (21 reactions, open since Jan 2026).
36
+ fix: |
37
+ Option 1 (recommended): Run the scheduled trigger on a GitHub-hosted runner.
38
+ Use ubuntu-latest for the schedule job and dispatch the real work to self-hosted
39
+ via workflow_dispatch or a separate triggered workflow.
40
+
41
+ Option 2: Use an external scheduler with workflow_dispatch.
42
+ Remove the on: schedule trigger. Use an external cron (cron job, cloud function, GitHub App)
43
+ to call the GitHub REST API dispatches endpoint on a schedule. The workflow is triggered
44
+ by workflow_dispatch instead, which does not require the runner to be available at a
45
+ fixed clock time.
46
+
47
+ Option 3: Ensure runner availability with a persistent service.
48
+ Run the self-hosted runner as a systemd service with Restart=always so it is online
49
+ when schedules fire. This reduces but does not eliminate the risk.
50
+ fix_code:
51
+ - language: yaml
52
+ label: "Option 1: Schedule on GitHub-hosted, dispatch to self-hosted"
53
+ code: |
54
+ on:
55
+ schedule:
56
+ - cron: '0 2 * * *'
57
+ workflow_dispatch: {}
58
+
59
+ jobs:
60
+ # Lightweight orchestrator runs on GitHub-hosted (always available at schedule time)
61
+ trigger:
62
+ runs-on: ubuntu-latest
63
+ steps:
64
+ - name: Trigger self-hosted workflow
65
+ uses: actions/github-script@v7
66
+ with:
67
+ script: |
68
+ await github.rest.actions.createWorkflowDispatch({
69
+ owner: context.repo.owner,
70
+ repo: context.repo.repo,
71
+ workflow_id: 'heavy-work.yml',
72
+ ref: 'main'
73
+ });
74
+ - language: yaml
75
+ label: "Option 2: Receive dispatch from external cron scheduler"
76
+ code: |
77
+ # External scheduler calls:
78
+ # curl -X POST \
79
+ # -H "Authorization: Bearer $GH_TOKEN" \
80
+ # https://api.github.com/repos/OWNER/REPO/actions/workflows/nightly.yml/dispatches \
81
+ # -d '{"ref":"main"}'
82
+ #
83
+ # Your workflow:
84
+ on:
85
+ workflow_dispatch: {} # Triggered externally; no GitHub-side scheduling dependency
86
+
87
+ jobs:
88
+ nightly:
89
+ runs-on: [self-hosted, linux, x64]
90
+ steps:
91
+ - uses: actions/checkout@v4
92
+ - run: ./scripts/nightly.sh
93
+ prevention:
94
+ - "Run self-hosted runners as a persistent systemd service (Restart=always, RestartSec=10) to minimize offline windows."
95
+ - "Add workflow_dispatch: alongside schedule: so missed runs can be manually re-triggered from the Actions UI."
96
+ - "Monitor runner registration status via GET /repos/{owner}/{repo}/actions/runners and alert on offline runners."
97
+ - "Keep repositories active with at least one push or workflow run to prevent scheduled workflow disablement after 60 days of inactivity."
98
+ - "Consider using ephemeral runners with autoscaling (ARC) so runners are always provisioned on demand."
99
+ docs:
100
+ - url: "https://github.com/actions/runner/issues/4210"
101
+ label: "actions/runner#4210 — Cron not triggering on self-hosted runner (Jan 2026)"
102
+ - url: "https://github.com/orgs/community/discussions/185024"
103
+ label: "Community discussion: self-hosted runner not triggering scheduled cron"
104
+ - url: "https://docs.github.com/en/actions/writing-workflows/choosing-when-your-workflow-runs/events-that-trigger-workflows#schedule"
105
+ label: "schedule event documentation"
106
+ - url: "https://docs.github.com/en/actions/managing-workflow-runs-and-deployments/managing-workflow-runs/disabling-and-enabling-a-workflow"
107
+ label: "Workflow disabled after 60 days of repo inactivity"
@@ -0,0 +1,100 @@
1
+ id: yaml-syntax-031
2
+ title: "case() expression function fails with 'Unrecognized function' on runners older than 2.329.0"
3
+ category: yaml-syntax
4
+ severity: error
5
+ tags:
6
+ - case-function
7
+ - expressions
8
+ - runner-version
9
+ - self-hosted
10
+ - composite-action
11
+ - if-condition
12
+
13
+ patterns:
14
+ - regex: "Unrecognized function: 'case'"
15
+ flags: "i"
16
+ - regex: "The workflow is not valid.*Unrecognized function.*case"
17
+ flags: "i"
18
+
19
+ error_messages:
20
+ - "Unrecognized function: 'case'. Located at position 1 within expression: case(github.event_name == 'push', 'deploy', github.event_name == 'pull_request', 'review', 'skip')"
21
+ - "The workflow is not valid. .github/workflows/deploy.yml (Line: 24, Col: 16): Unrecognized function: 'case'"
22
+
23
+ root_cause: |
24
+ GitHub introduced the case() expression function in runner version 2.329.0 (January 2026,
25
+ announced in the GitHub Actions changelog on 2026-01-29). The case() function enables
26
+ conditional branching similar to SQL CASE expressions, supporting if-else and switch-case
27
+ patterns in workflow expressions.
28
+
29
+ Self-hosted runners that have not been updated to version 2.329.0 or later do not recognize
30
+ case() as a valid function. When any workflow step, job-level if: condition, output mapping,
31
+ or composite action uses ${{ case(...) }}, the runner throws "Unrecognized function: 'case'"
32
+ and the job fails immediately.
33
+
34
+ GitHub-hosted runners (ubuntu-latest, windows-latest, macos-latest) receive runner updates
35
+ automatically and are not affected. Only self-hosted runners with version pinning or delayed
36
+ update policies encounter this error.
37
+
38
+ A secondary regression occurred in runner 2.333.0 (March 2026) where case() was temporarily
39
+ broken for composite actions specifically, producing the same error. This was resolved in
40
+ 2.333.1.
41
+
42
+ fix: |
43
+ For self-hosted runners: Update the runner to version 2.329.0 or later. Runner updates
44
+ can be applied via the GitHub Actions runner update script or by re-registering the runner
45
+ with the latest version from the GitHub Actions runner releases page.
46
+
47
+ To verify your runner version: check Settings > Actions > Runners in your repository or
48
+ organization, or inspect the runner binary with ./actions-runner/config.sh --version.
49
+
50
+ Temporary workaround: Rewrite case() expressions using nested ternary-style expressions
51
+ that work on all runner versions, then migrate to case() once runners are updated.
52
+
53
+ fix_code:
54
+ - language: yaml
55
+ label: "New (requires runner 2.329.0+): using case() for conditional output"
56
+ code: |
57
+ jobs:
58
+ determine-env:
59
+ runs-on: self-hosted
60
+ outputs:
61
+ environment: ${{ steps.set-env.outputs.env }}
62
+ steps:
63
+ - id: set-env
64
+ run: echo "env=${{ case(github.ref == 'refs/heads/main', 'production', github.ref == 'refs/heads/staging', 'staging', 'development') }}" >> $GITHUB_OUTPUT
65
+
66
+ - language: yaml
67
+ label: "Fallback for runners older than 2.329.0 (works on all versions)"
68
+ code: |
69
+ jobs:
70
+ determine-env:
71
+ runs-on: self-hosted
72
+ outputs:
73
+ environment: ${{ steps.set-env.outputs.env }}
74
+ steps:
75
+ - id: set-env
76
+ run: |
77
+ REF="${{ github.ref }}"
78
+ if [[ "$REF" == "refs/heads/main" ]]; then
79
+ echo "env=production" >> $GITHUB_OUTPUT
80
+ elif [[ "$REF" == "refs/heads/staging" ]]; then
81
+ echo "env=staging" >> $GITHUB_OUTPUT
82
+ else
83
+ echo "env=development" >> $GITHUB_OUTPUT
84
+ fi
85
+
86
+ prevention:
87
+ - "Pin runner version in self-hosted runner documentation and set up automated update notifications."
88
+ - "Add a workflow step that logs the runner version (echo $ACTIONS_RUNNER_VERSION) to surface version mismatches early."
89
+ - "Test new expression functions on GitHub-hosted runners first; then roll out to self-hosted after confirming the runner version."
90
+ - "Configure runner auto-update policies — GitHub recommends keeping self-hosted runners within 2 major versions of the latest."
91
+
92
+ docs:
93
+ - url: "https://github.blog/changelog/2026-01-29-github-actions-smarter-editing-clearer-debugging-and-a-new-case-function/"
94
+ label: "GitHub Changelog 2026-01-29: New case() function introduction"
95
+ - url: "https://docs.github.com/en/actions/writing-workflows/choosing-what-your-workflow-does/evaluate-expressions-in-workflows-and-actions"
96
+ label: "GitHub Docs: Expressions — case() function reference"
97
+ - url: "https://github.com/actions/runner/issues/4315"
98
+ label: "actions/runner#4315: Runner v2.333.0 breaks case function (regression)"
99
+ - url: "https://github.com/actions/runner/releases"
100
+ label: "GitHub Actions Runner releases — version history"
@@ -0,0 +1,90 @@
1
+ id: yaml-syntax-030
2
+ title: "Composite Action run: Step Missing Required shell: Property"
3
+ category: yaml-syntax
4
+ severity: error
5
+ tags:
6
+ - composite-action
7
+ - shell
8
+ - required-property
9
+ - action-yml
10
+ - schema-validation
11
+ patterns:
12
+ - regex: "Required property is missing: shell"
13
+ flags: "i"
14
+ - regex: "action\\.yml.*Required property is missing: shell"
15
+ flags: "i"
16
+ error_messages:
17
+ - "Required property is missing: shell"
18
+ - "(Line: 29, Col: 5): Required property is missing: shell"
19
+ - "Error: GitHub.DistributedTask.ObjectTemplating.TemplateValidationException: The template is not valid."
20
+ - "Error: Fail to load action.yml"
21
+ root_cause: |
22
+ Every run: step inside a composite action's action.yml MUST declare an explicit
23
+ shell: property. This is mandatory for composite actions — unlike regular workflow
24
+ run: steps where the runner infers the shell from the operating system, composite
25
+ action steps require an explicit declaration because the action may run on any OS.
26
+
27
+ The validation error fires at workflow preparation time (before any steps execute),
28
+ causing the entire workflow to fail with "Fail to load <action>.yml".
29
+
30
+ This is a common mistake when:
31
+ - Converting a workflow step into a reusable composite action
32
+ - Copying run: steps from a workflow into action.yml without adding shell:
33
+ - Using a third-party composite action whose author omitted the shell: property
34
+ fix: |
35
+ Add shell: to every run: step in the composite action's action.yml.
36
+
37
+ Supported shell values: bash, sh, python, pwsh, powershell, cmd
38
+
39
+ For cross-platform composite actions, use shell: bash (available on all
40
+ GitHub-hosted runners including Windows via Git Bash). If platform-specific
41
+ behavior is needed, use if: runner.os == 'Windows' conditionals with
42
+ separate steps.
43
+ fix_code:
44
+ - language: yaml
45
+ label: "Broken action.yml — run steps missing shell:"
46
+ code: |
47
+ runs:
48
+ using: "composite"
49
+ steps:
50
+ - name: Install dependencies
51
+ run: npm ci
52
+ - name: Run build
53
+ run: npm run build
54
+ - language: yaml
55
+ label: "Fixed action.yml — shell: added to every run step"
56
+ code: |
57
+ runs:
58
+ using: "composite"
59
+ steps:
60
+ - name: Install dependencies
61
+ run: npm ci
62
+ shell: bash
63
+ - name: Run build
64
+ run: npm run build
65
+ shell: bash
66
+ - language: yaml
67
+ label: "Cross-platform composite action with OS-conditional steps"
68
+ code: |
69
+ runs:
70
+ using: "composite"
71
+ steps:
72
+ - name: Run script (cross-platform)
73
+ run: echo "Running on ${{ runner.os }}"
74
+ shell: bash
75
+ - name: Windows-only step
76
+ if: runner.os == 'Windows'
77
+ run: Write-Host "Windows step"
78
+ shell: pwsh
79
+ prevention:
80
+ - "Add actionlint to your CI — it catches missing shell: properties in composite actions."
81
+ - "When creating a new composite action, start from the GitHub documentation template which includes shell: on all run steps."
82
+ - "Every run: step in action.yml requires shell: — add this to code review checklists."
83
+ - "Use rhysd/actionlint locally or as a pre-commit hook to validate composite action syntax before pushing."
84
+ docs:
85
+ - url: "https://docs.github.com/en/actions/sharing-automations/creating-actions/creating-a-composite-action"
86
+ label: "GitHub Docs: Creating a composite action"
87
+ - url: "https://stackoverflow.com/questions/71041836/github-actions-required-property-is-missing-shell"
88
+ label: "Stack Overflow: Required property is missing: shell (Score: 51, 31K views)"
89
+ - url: "https://docs.github.com/en/actions/sharing-automations/creating-actions/metadata-syntax-for-github-actions#runs-for-composite-actions"
90
+ label: "GitHub Docs: Metadata syntax for composite actions (runs.steps[*].shell)"
@@ -0,0 +1,99 @@
1
+ id: yaml-syntax-025
2
+ title: "secrets Context Unavailable Inside Composite Action Definitions"
3
+ category: yaml-syntax
4
+ severity: error
5
+ tags:
6
+ - composite-actions
7
+ - secrets-context
8
+ - expression
9
+ - runner-validation
10
+ - context-availability
11
+ - action-yml
12
+ patterns:
13
+ - regex: "Unrecognized named-value.*'?secrets'?"
14
+ flags: "i"
15
+ - regex: "Unexpected value.*secrets\\.\\w+"
16
+ flags: "i"
17
+ error_messages:
18
+ - "Unrecognized named-value: 'secrets'. Located at position 1 within expression: secrets.MY_TOKEN"
19
+ - "Error: Unrecognized named-value: 'secrets'"
20
+ - "Invalid workflow file: .github/actions/my-action/action.yml (Line 12, Col 18): Unrecognized named-value: 'secrets'"
21
+ root_cause: |
22
+ The `secrets` context is **not available inside composite action definitions** (`action.yml`).
23
+ When a developer writes `${{ secrets.MY_TOKEN }}` inside a composite action's steps or
24
+ expressions, runner validation rejects it with "Unrecognized named-value: 'secrets'".
25
+
26
+ This is a deliberate architectural restriction. Composite actions run in the calling
27
+ workflow's runner environment but do NOT receive the calling workflow's secrets context.
28
+ The `secrets` context is only available in:
29
+ - Regular workflow job steps (`jobs.<job_id>.steps.*`)
30
+ - Reusable workflows (`.github/workflows/*.yml` using `on: workflow_call`)
31
+
32
+ Composite actions (`action.yml` with `using: composite`) only receive values the calling
33
+ workflow explicitly passes as `inputs`. This differs from `vars` context rejection
34
+ (yaml-syntax-016) — both contexts are unavailable in composite actions, but the pattern
35
+ for passing secrets as inputs is worth documenting separately.
36
+
37
+ A common migration mistake: extracting workflow steps that reference `${{ secrets.GITHUB_TOKEN }}`
38
+ into a composite action and expecting them to continue working unchanged.
39
+ fix: |
40
+ Declare an explicit `input` for each secret the composite action needs. The calling workflow
41
+ passes secrets at the `with:` level — where the secrets context IS available. Inside the
42
+ composite action, reference `${{ inputs.token }}` instead of `${{ secrets.MY_TOKEN }}`.
43
+
44
+ Never reference the secrets context directly inside `action.yml` regardless of runner version.
45
+ fix_code:
46
+ - language: yaml
47
+ label: "action.yml — Replace secrets.* with an explicit input"
48
+ code: |
49
+ # ❌ BROKEN: secrets context not available in composite actions
50
+ # .github/actions/deploy/action.yml
51
+ name: Deploy
52
+ description: Deploy to production
53
+ runs:
54
+ using: composite
55
+ steps:
56
+ - name: Authenticate
57
+ shell: bash
58
+ run: |
59
+ # ❌ Will fail: Unrecognized named-value: 'secrets'
60
+ echo "${{ secrets.DEPLOY_TOKEN }}" | docker login ghcr.io -u user --password-stdin
61
+
62
+ ---
63
+
64
+ # ✅ CORRECT: accept token via explicit input
65
+ name: Deploy
66
+ description: Deploy to production
67
+ inputs:
68
+ deploy-token:
69
+ description: "Authentication token for container registry"
70
+ required: true
71
+ runs:
72
+ using: composite
73
+ steps:
74
+ - name: Authenticate
75
+ shell: bash
76
+ run: echo "${{ inputs.deploy-token }}" | docker login ghcr.io -u user --password-stdin
77
+ - language: yaml
78
+ label: "Calling workflow — pass secrets at the with: level"
79
+ code: |
80
+ # ✅ Caller resolves secrets context and passes value as composite action input
81
+ jobs:
82
+ deploy:
83
+ runs-on: ubuntu-latest
84
+ steps:
85
+ - uses: ./.github/actions/deploy
86
+ with:
87
+ deploy-token: ${{ secrets.DEPLOY_TOKEN }} # secrets resolved in caller, not in composite
88
+ prevention:
89
+ - "Never reference `secrets.*` directly inside composite action `action.yml` — require callers to pass secrets as explicit inputs."
90
+ - "When migrating workflow steps to a composite action, replace every `${{ secrets.X }}` with a declared input and update all callers."
91
+ - "Use `actionlint` to statically validate context access in composite actions before pushing."
92
+ - "Composite actions (composite) require explicit input passing for secrets; reusable workflows (workflow_call) support `secrets: inherit`."
93
+ docs:
94
+ - url: "https://docs.github.com/en/actions/writing-workflows/choosing-what-your-workflow-does/accessing-contextual-information-about-workflow-runs#context-availability"
95
+ label: "GitHub Docs: Context availability by element type"
96
+ - url: "https://docs.github.com/en/actions/sharing-automations/creating-actions/creating-a-composite-action"
97
+ label: "GitHub Docs: Creating a composite action"
98
+ - url: "https://stackoverflow.com/questions/73821801/unable-to-use-secrets-in-workflow"
99
+ label: "SO#73821801 — Unrecognized named-value: 'secrets' in composite action (3,059 views)"
@@ -0,0 +1,130 @@
1
+ id: yaml-syntax-026
2
+ title: "actions/github-script: 'octokit' Not Defined — API Client Renamed to 'github'"
3
+ category: yaml-syntax
4
+ severity: error
5
+ tags:
6
+ - github-script
7
+ - octokit
8
+ - javascript
9
+ - api-client
10
+ - breaking-change
11
+ - v4
12
+ patterns:
13
+ - regex: "ReferenceError: octokit is not defined"
14
+ flags: "i"
15
+ - regex: "octokit is not defined"
16
+ flags: "i"
17
+ - regex: "TypeError: Cannot read propert(?:y|ies) of undefined.*octokit"
18
+ flags: "i"
19
+ - regex: "Error: Unhandled error: ReferenceError: octokit is not defined"
20
+ flags: "i"
21
+ error_messages:
22
+ - "ReferenceError: octokit is not defined"
23
+ - "Error: Unhandled error: ReferenceError: octokit is not defined"
24
+ - "Error: Script failed with exit code 1 — ReferenceError: octokit is not defined"
25
+ root_cause: |
26
+ In versions of `actions/github-script` prior to v4, the Octokit REST client
27
+ was injected into the script as a variable named `octokit`. The action was
28
+ refactored and the variable was renamed to `github` in v4 (released late 2020).
29
+
30
+ Many blog posts, Stack Overflow answers, older README examples, and community
31
+ discussions still use the original `octokit` variable name. Developers copying
32
+ these examples encounter `ReferenceError: octokit is not defined` at runtime
33
+ because the variable no longer exists.
34
+
35
+ Available variables injected into `actions/github-script` scripts (v4+):
36
+ - `github` — authenticated Octokit REST + GraphQL client (replaces old `octokit`)
37
+ - `context` — workflow run context (repo, sha, ref, event payload, etc.)
38
+ - `core` — @actions/core (setOutput, setFailed, info, warning, etc.)
39
+ - `glob` — @actions/glob (file globbing utility)
40
+ - `io` — @actions/io (filesystem utilities)
41
+ - `exec` — @actions/exec (run shell commands from script)
42
+ - `require` — restricted require() for loading bundled modules
43
+
44
+ The variable `octokit` does not exist in any released version of
45
+ actions/github-script. It was never a stable public interface — the README
46
+ always showed `github`, but pre-release/alpha samples used `octokit`.
47
+
48
+ A secondary version of this error occurs with `github.rest` vs `github` API
49
+ surface: in v6+, REST methods moved to `github.rest.*` (e.g.,
50
+ `github.rest.issues.create()`). Scripts using `github.issues.create()` (v5
51
+ style) will fail with "TypeError: github.issues.create is not a function"
52
+ on v6+.
53
+ fix: |
54
+ Replace every occurrence of `octokit` in your script with `github`:
55
+
56
+ Before (broken): const result = await octokit.rest.issues.create({...})
57
+ After (correct): const result = await github.rest.issues.create({...})
58
+
59
+ If you are using an older API surface (pre-v6), also update method paths:
60
+ Before (v5): await github.issues.create({...})
61
+ After (v6+): await github.rest.issues.create({...})
62
+
63
+ Check your github-script version — v6 is the current stable release (v7 is
64
+ also available with Node.js 20). Pin to a major version like @v7 rather than
65
+ a commit SHA to get bugfixes without breaking changes.
66
+ fix_code:
67
+ - language: yaml
68
+ label: "Before (broken) vs After (correct) — replace octokit with github"
69
+ code: |
70
+ # BROKEN — uses old `octokit` variable name (throws ReferenceError):
71
+ - uses: actions/github-script@v7
72
+ with:
73
+ script: |
74
+ const { data: issue } = await octokit.rest.issues.create({
75
+ owner: context.repo.owner,
76
+ repo: context.repo.repo,
77
+ title: 'Automated issue',
78
+ body: 'Created by workflow'
79
+ });
80
+
81
+ # CORRECT — use `github` (the injected Octokit client):
82
+ - uses: actions/github-script@v7
83
+ with:
84
+ script: |
85
+ const { data: issue } = await github.rest.issues.create({
86
+ owner: context.repo.owner,
87
+ repo: context.repo.repo,
88
+ title: 'Automated issue',
89
+ body: 'Created by workflow'
90
+ });
91
+ console.log('Created issue #' + issue.number);
92
+ - language: yaml
93
+ label: "Common github-script v5 to v6+ migration — update method paths"
94
+ code: |
95
+ # v5 style (broken on v6+):
96
+ - uses: actions/github-script@v6
97
+ with:
98
+ script: |
99
+ await github.issues.addLabels({ # BROKEN: no github.issues
100
+ issue_number: context.issue.number,
101
+ owner: context.repo.owner,
102
+ repo: context.repo.repo,
103
+ labels: ['bug']
104
+ });
105
+
106
+ # v6+ style (correct):
107
+ - uses: actions/github-script@v7
108
+ with:
109
+ script: |
110
+ await github.rest.issues.addLabels({ # CORRECT: github.rest.*
111
+ issue_number: context.issue.number,
112
+ owner: context.repo.owner,
113
+ repo: context.repo.repo,
114
+ labels: ['bug']
115
+ });
116
+ prevention:
117
+ - "Always use `github` (not `octokit`) as the Octokit client variable in actions/github-script — `octokit` has never been a stable public interface."
118
+ - "Pin to a major version like `actions/github-script@v7` rather than copying scripts from undated blog posts or old Stack Overflow answers that may reference pre-release variable names."
119
+ - "Test scripts locally using the `@octokit/rest` npm package before embedding them in a workflow — you'll get clear errors immediately rather than waiting for a CI run."
120
+ - "Read the actions/github-script README for your pinned version — the variable reference table at the top shows exactly what is injected (github, context, core, glob, io, exec)."
121
+ - "When upgrading from github-script v5 to v6+, update all REST method calls from `github.X.Y()` to `github.rest.X.Y()` — this is the only breaking change between v5 and v6."
122
+ docs:
123
+ - url: "https://github.com/actions/github-script"
124
+ label: "actions/github-script README — available variables (github, context, core, etc.)"
125
+ - url: "https://github.com/actions/github-script/issues/545"
126
+ label: "actions/github-script #545: octokit instance from README examples doesn't work (12 reactions)"
127
+ - url: "https://github.com/actions/github-script/releases/tag/v4.0.0"
128
+ label: "actions/github-script v4 release — renamed octokit → github"
129
+ - url: "https://octokit.github.io/rest.js/v21"
130
+ label: "Octokit REST.js v21 API reference — methods available via github.rest.*"
@@ -0,0 +1,67 @@
1
+ id: yaml-syntax-028
2
+ title: "actions/labeler v5 config format breaking change causes unexpected type error"
3
+ category: yaml-syntax
4
+ severity: error
5
+ tags:
6
+ - labeler
7
+ - v5-breaking-change
8
+ - config-format
9
+ - pull-request-labels
10
+ - migration
11
+ patterns:
12
+ - regex: "found unexpected type for label '.+' \\(should be array of config options\\)"
13
+ flags: "i"
14
+ - regex: "Error: found unexpected type for label"
15
+ flags: "i"
16
+ error_messages:
17
+ - "Error: found unexpected type for label 'frontend' (should be array of config options)"
18
+ - "found unexpected type for label 'X' (should be array of config options)"
19
+ root_cause: |
20
+ actions/labeler v5.0.0 introduced a breaking change to the labeler.yml configuration format.
21
+ In v4 and earlier, labels could be configured as a flat list of glob patterns (strings).
22
+ In v5, each label must be an array of objects with specific keys such as changed-files,
23
+ head-branch, or base-branch. If a workflow pins to @master or @latest and a new major
24
+ version is published, workflows inherit the breaking format without warning.
25
+ The old flat string format ("label: - path/**") is no longer valid in v5 and causes
26
+ the action to throw immediately.
27
+ fix: |
28
+ Either migrate labeler.yml to the v5 object format using changed-files key, or pin the
29
+ action to @v4 to preserve the old flat string format.
30
+ fix_code:
31
+ - language: yaml
32
+ label: "Old v4 format (still works with actions/labeler@v4)"
33
+ code: |
34
+ # .github/labeler.yml (v4 format)
35
+ frontend:
36
+ - shared/frontend/**/*
37
+ backend:
38
+ - shared/api/**/*
39
+ - language: yaml
40
+ label: "New v5 format (required for actions/labeler@v5)"
41
+ code: |
42
+ # .github/labeler.yml (v5 format)
43
+ frontend:
44
+ - changed-files:
45
+ - any-glob-to-any-file: shared/frontend/**/*
46
+ backend:
47
+ - changed-files:
48
+ - any-glob-to-any-file: shared/api/**/*
49
+ - language: yaml
50
+ label: "Pin to v4 to avoid breaking change"
51
+ code: |
52
+ steps:
53
+ - uses: actions/labeler@v4
54
+ with:
55
+ repo-token: ${{ secrets.GITHUB_TOKEN }}
56
+ prevention:
57
+ - "Never pin actions to @master or @latest branch — always use a major version tag like @v4"
58
+ - "Review the CHANGELOG or release notes before bumping a major version of any action"
59
+ - "Use Dependabot with major version grouping to get explicit upgrade PRs for breaking changes"
60
+ - "Test label config changes in a fork or draft PR before merging"
61
+ docs:
62
+ - url: "https://github.com/actions/labeler/issues/710"
63
+ label: "actions/labeler#710: found unexpected type for label (v5 breaking change)"
64
+ - url: "https://github.com/actions/labeler/releases/tag/v5.0.0"
65
+ label: "actions/labeler v5.0.0 release notes"
66
+ - url: "https://github.com/actions/labeler/tree/main#pull-request-labeler"
67
+ label: "actions/labeler v5 configuration documentation"