@htekdev/actions-debugger 1.0.23 → 1.0.24

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 (57) 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/matrix-256-job-limit.yml +142 -0
  17. package/errors/known-unsolved/merge-group-paths-filter-not-supported.yml +137 -0
  18. package/errors/known-unsolved/no-job-allow-failure.yml +73 -0
  19. package/errors/known-unsolved/schedule-cron-hours-long-queue-drift.yml +101 -0
  20. package/errors/permissions-auth/checkout-persist-credentials-token-write.yml +90 -0
  21. package/errors/permissions-auth/create-github-app-token-cross-job-token-revoked.yml +95 -0
  22. package/errors/permissions-auth/github-token-contents-write-missing-git-push.yml +117 -0
  23. package/errors/permissions-auth/org-actions-policy-blocks-unapproved-action.yml +106 -0
  24. package/errors/runner-environment/codeql-action-v2-deprecated.yml +110 -0
  25. package/errors/runner-environment/macos-26-openssl-3-system-library-breaking.yml +114 -0
  26. package/errors/runner-environment/macos-26-ruby-34-default-upgrade.yml +114 -0
  27. package/errors/runner-environment/macos-26-xcode-default-265-pin-required.yml +99 -0
  28. package/errors/runner-environment/macos-latest-label-switches-to-macos26.yml +127 -0
  29. package/errors/runner-environment/node20-removed-toolcache-default-node22.yml +104 -0
  30. package/errors/runner-environment/powershell-74-76-threadjob-module-rename.yml +124 -0
  31. package/errors/runner-environment/self-hosted-runner-not-found.yml +134 -0
  32. package/errors/runner-environment/self-hosted-runner-selinux-service-exec-failure.yml +116 -0
  33. package/errors/runner-environment/service-container-no-healthcheck.yml +158 -0
  34. package/errors/runner-environment/setup-node-v5-corepack-pnpm-not-found.yml +101 -0
  35. package/errors/runner-environment/setup-node-yarn-not-installed-self-hosted.yml +76 -0
  36. package/errors/runner-environment/setup-python-externally-managed-env-error.yml +95 -0
  37. package/errors/runner-environment/windows-2019-runner-retired-june2025.yml +118 -0
  38. package/errors/runner-environment/windows-2022-docker-daemon-not-started.yml +108 -0
  39. package/errors/silent-failures/cache-hit-output-string-not-boolean.yml +96 -0
  40. package/errors/silent-failures/checkout-lfs-pointer-not-content.yml +105 -0
  41. package/errors/silent-failures/reusable-workflow-output-skipped-contains-secret.yml +115 -0
  42. package/errors/silent-failures/setup-node-silent-download-exit-zero.yml +105 -0
  43. package/errors/silent-failures/setup-python-truncated-manifest-silent-exit.yml +111 -0
  44. package/errors/silent-failures/undefined-env-expression-empty-string-silent.yml +115 -0
  45. package/errors/silent-failures/windows-powershell-github-output-bash-syntax.yml +118 -0
  46. package/errors/triggers/fork-pr-first-time-contributor-approval-required.yml +142 -0
  47. package/errors/triggers/on-push-branches-glob-star-no-slash-match.yml +78 -0
  48. package/errors/triggers/pull-request-target-env-protection-default-branch-eval.yml +117 -0
  49. package/errors/triggers/required-status-check-renamed-never-passes.yml +87 -0
  50. package/errors/triggers/schedule-cron-self-hosted-runner-not-triggered.yml +107 -0
  51. package/errors/yaml-syntax/composite-action-run-shell-missing.yml +90 -0
  52. package/errors/yaml-syntax/composite-action-secrets-context-unavailable.yml +99 -0
  53. package/errors/yaml-syntax/github-script-octokit-renamed-to-github.yml +130 -0
  54. package/errors/yaml-syntax/labeler-v5-config-format-breaking.yml +67 -0
  55. package/errors/yaml-syntax/runs-on-expression-array-syntax-error.yml +121 -0
  56. package/errors/yaml-syntax/setup-go-matrix-version-float-coercion.yml +69 -0
  57. package/package.json +1 -1
@@ -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"
@@ -0,0 +1,121 @@
1
+ id: yaml-syntax-029
2
+ title: "Expression Interpolation in runs-on Array Literal Causes YAML Syntax Error"
3
+ category: yaml-syntax
4
+ severity: error
5
+ tags:
6
+ - runs-on
7
+ - self-hosted
8
+ - expression
9
+ - dynamic-runner
10
+ - fromjson
11
+ - workflow-dispatch
12
+ patterns:
13
+ - regex: "Invalid workflow file|You have an error in your yaml syntax"
14
+ flags: "i"
15
+ - regex: "Unexpected value.*\\$\\{\\{|yaml.*syntax.*runs.on"
16
+ flags: "i"
17
+ - regex: "Line.*Col.*Unexpected value.*\\{|error.*yaml.*line.*runs.on"
18
+ flags: "i"
19
+ error_messages:
20
+ - "Invalid workflow file: .github/workflows/deploy.yml"
21
+ - "You have an error in your yaml syntax on line N"
22
+ - "Error: The workflow is not valid. .github/workflows/....yml (Line: N, Col: N): Unexpected value '{{'"
23
+ - "Workflow is not valid. (.github/workflows/....yml): There is no event trigger on line N"
24
+ root_cause: |
25
+ GitHub Actions YAML is fully parsed before any expression evaluation occurs. When an
26
+ expression like ${{ inputs.runner-label }} appears as a bare value inside a YAML
27
+ flow sequence (square bracket array), the YAML parser encounters the { character
28
+ as an unquoted scalar — which is invalid in YAML flow sequence context.
29
+
30
+ The error typically surfaces on the job definition line rather than the runs-on
31
+ line itself, which makes it confusing to diagnose. The workflow annotation says
32
+ "invalid workflow file" or "yaml syntax error" pointing at the job name line.
33
+
34
+ Common trigger: Attempting to dynamically select a self-hosted runner label from
35
+ a workflow_dispatch input or matrix variable by writing:
36
+ runs-on: [ self-hosted, ${{ inputs.server-target }} ]
37
+
38
+ This is a YAML parsing error, not a GitHub Actions expression error — the file
39
+ fails validation before any runs even start.
40
+
41
+ The idiomatic fix is to pass the label array as a JSON string and deserialize it
42
+ with fromJSON(), which is supported natively in runs-on since 2021.
43
+ fix: |
44
+ Three approaches depending on your scenario:
45
+
46
+ 1. fromJSON() with JSON array input (most flexible, recommended for multi-label):
47
+ Pass the runs-on labels as a JSON array string and use fromJSON() to deserialize.
48
+ This fully supports dynamic multi-label selection with no YAML parsing issues.
49
+
50
+ 2. Quoted expression (for simple labels without YAML-special characters):
51
+ Quoting the expression as "${{ inputs.label }}" makes it a valid YAML string.
52
+ Works when the label value is a simple string like "server1" or "linux".
53
+
54
+ 3. Single dynamic label (when self-hosted prefix is not required):
55
+ Use runs-on: ${{ inputs.runner_target }} directly without the array syntax.
56
+ Self-hosted runners can be identified by unique label alone.
57
+ fix_code:
58
+ - language: yaml
59
+ label: "fromJSON() — pass full label array as JSON string (recommended)"
60
+ code: |
61
+ on:
62
+ workflow_dispatch:
63
+ inputs:
64
+ runs_on:
65
+ description: 'Runner labels as JSON array (e.g. ["self-hosted","linux"])'
66
+ required: true
67
+ type: string
68
+ default: '["self-hosted", "linux"]'
69
+
70
+ jobs:
71
+ build:
72
+ runs-on: ${{ fromJSON(inputs.runs_on) }}
73
+ steps:
74
+ - uses: actions/checkout@v4
75
+ - run: echo "Running on labels ${{ inputs.runs_on }}"
76
+
77
+ - language: yaml
78
+ label: "Quoted expression — for simple label values without YAML-special chars"
79
+ code: |
80
+ on:
81
+ workflow_dispatch:
82
+ inputs:
83
+ environment:
84
+ description: 'Target environment runner label'
85
+ required: true
86
+ default: 'staging'
87
+
88
+ jobs:
89
+ deploy:
90
+ runs-on: [ self-hosted, "${{ inputs.environment }}" ]
91
+ steps:
92
+ - run: echo "Deploying to ${{ inputs.environment }}"
93
+
94
+ - language: yaml
95
+ label: "Single dynamic label without array syntax"
96
+ code: |
97
+ on:
98
+ workflow_dispatch:
99
+ inputs:
100
+ runner_target:
101
+ description: 'Self-hosted runner label (e.g. server1, server2)'
102
+ required: true
103
+ default: 'server1'
104
+
105
+ jobs:
106
+ deploy:
107
+ runs-on: ${{ inputs.runner_target }}
108
+ steps:
109
+ - run: echo "Running on ${{ inputs.runner_target }}"
110
+ prevention:
111
+ - "Never place bare ${{ }} expressions inside YAML flow sequences (square bracket arrays) — always quote or use fromJSON()."
112
+ - "For dynamic multi-label runner selection, use the fromJSON() pattern with a JSON-string workflow input."
113
+ - "Validate workflow YAML before committing with: gh workflow list --repo owner/repo or a local YAML linter."
114
+ - "Document expected input format in the workflow input description: 'JSON array, e.g. [\"self-hosted\",\"linux\"]'."
115
+ docs:
116
+ - url: "https://stackoverflow.com/questions/68732881/how-do-you-use-an-input-variable-to-specify-which-self-hosted-runner-a-github-ac"
117
+ label: "Stack Overflow: Input variable for self-hosted runner in runs-on"
118
+ - url: "https://docs.github.com/en/actions/writing-workflows/workflow-syntax-for-github-actions#jobsjob_idruns-on"
119
+ label: "GitHub Docs: jobs.<job_id>.runs-on workflow syntax"
120
+ - url: "https://docs.github.com/en/actions/writing-workflows/choosing-what-your-workflow-does/evaluate-expressions-in-workflows-and-actions#fromjson"
121
+ label: "GitHub Docs: fromJSON() expression function"
@@ -0,0 +1,69 @@
1
+ id: yaml-syntax-027
2
+ title: "setup-go matrix version YAML float coercion installs wrong Go version"
3
+ category: yaml-syntax
4
+ severity: silent-failure
5
+ tags:
6
+ - setup-go
7
+ - matrix
8
+ - yaml-float
9
+ - version-mismatch
10
+ - go-version
11
+ - silent-failure
12
+ patterns:
13
+ - regex: "Setup go version spec 1\\.2(?!\\d)"
14
+ flags: "i"
15
+ - regex: "Acquiring go1\\.2\\.2 from"
16
+ flags: "i"
17
+ error_messages:
18
+ - "Setup go version spec 1.2"
19
+ - "Acquiring go1.2.2 from https://storage.googleapis.com/golang/go1.2.2.linux-amd64.tar.gz"
20
+ - "Error: The operation was canceled."
21
+ - "Attempting to download 1.2..."
22
+ - "Not found in manifest. Falling back to download directly from Go"
23
+ root_cause: |
24
+ When go-version is specified as a bare number in a matrix (e.g., version: [1.22]),
25
+ YAML parses the value 1.22 as a floating-point number. Due to floating-point precision,
26
+ this gets coerced to the string "1.2" when the action processes it, dropping the trailing
27
+ zero. setup-go then resolves "1.2" to the latest 1.2.x release, which is Go 1.2.2 from 2013.
28
+ This silent failure causes the wrong Go version to be installed, or the action errors out
29
+ when 1.2.2 cannot be downloaded, with no clear indication that the version string was silently
30
+ truncated by YAML parsing.
31
+ fix: |
32
+ Quote the go-version value in the matrix to force YAML to treat it as a string, or append
33
+ .x to make the version unambiguous. Alternatively, use go-version-file: go.mod to derive
34
+ the version from your repository's go.mod file.
35
+ fix_code:
36
+ - language: yaml
37
+ label: "Quote version in matrix (prevents YAML float coercion)"
38
+ code: |
39
+ jobs:
40
+ build:
41
+ strategy:
42
+ matrix:
43
+ go-version: ['1.22', '1.23', '1.24']
44
+ runs-on: ubuntu-latest
45
+ steps:
46
+ - uses: actions/setup-go@v5
47
+ with:
48
+ go-version: ${{ matrix.go-version }}
49
+ - language: yaml
50
+ label: "Use go-version-file instead (recommended)"
51
+ code: |
52
+ steps:
53
+ - uses: actions/checkout@v4
54
+ - uses: actions/setup-go@v5
55
+ with:
56
+ go-version-file: 'go.mod'
57
+ prevention:
58
+ - "Always quote go-version values in YAML matrix (e.g., '1.22', not 1.22)"
59
+ - "Use the .x wildcard suffix to explicitly request latest patch: '1.22.x'"
60
+ - "Prefer go-version-file: go.mod to avoid hardcoding versions entirely"
61
+ - "Verify installed version with a 'run: go version' step after setup"
62
+ - "This truncation affects any two-component semver ending in zero: 1.20 -> 1.2, 1.10 -> 1.1"
63
+ docs:
64
+ - url: "https://github.com/actions/setup-go/issues/507"
65
+ label: "actions/setup-go#507: Go version 1.22 gets parsed to 1.2.2"
66
+ - url: "https://github.com/actions/setup-go#supported-version-syntax"
67
+ label: "setup-go: Supported version syntax"
68
+ - url: "https://yaml.org/type/float.html"
69
+ label: "YAML float type specification"
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@htekdev/actions-debugger",
3
- "version": "1.0.23",
3
+ "version": "1.0.24",
4
4
  "description": "65+ real GitHub Actions errors, queryable by agents. MCP server + Copilot skills + error database.",
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",