@htekdev/actions-debugger 1.0.103 → 1.0.104

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.
@@ -0,0 +1,82 @@
1
+ id: caching-artifacts-059
2
+ title: 'actions/upload-artifact@v4 excludes hidden files by default — dotfiles silently missing from artifacts'
3
+ category: caching-artifacts
4
+ severity: silent-failure
5
+ tags:
6
+ - upload-artifact
7
+ - v4
8
+ - hidden-files
9
+ - dotfiles
10
+ - include-hidden-files
11
+ - silent-omission
12
+ patterns:
13
+ - regex: 'uses:\s*actions/upload-artifact@v4'
14
+ flags: 'i'
15
+ - regex: 'include-hidden-files:\s*false'
16
+ flags: 'i'
17
+ error_messages:
18
+ - 'No files were found with the provided path'
19
+ - 'Uploading 0 files'
20
+ - 'Found no files matching'
21
+ root_cause: |
22
+ actions/upload-artifact@v4 introduced the include-hidden-files input, which defaults
23
+ to false. Any file or directory whose name begins with a dot (.) is silently excluded
24
+ from the artifact upload. The action completes with a success status and reports the
25
+ number of files uploaded — only inspecting that count reveals that dotfiles were
26
+ skipped.
27
+
28
+ Common files and directories affected:
29
+ .env, .env.production, .env.local — environment configuration
30
+ .npmrc, .nvmrc, .node-version — Node.js toolchain config
31
+ .htaccess — Apache web server config
32
+ .browserslistrc, .babelrc — build tool configuration
33
+ .next/, .nuxt/, .svelte-kit/ — framework build output directories
34
+ .vitepress/, .docusaurus/ — documentation build output
35
+
36
+ Workflows migrated from v3 to v4 silently break: the artifact is created and
37
+ downloaded without any error, but dependent steps fail when the expected dotfiles
38
+ are absent. Framework deployments (Next.js, Nuxt, SvelteKit) that upload their build
39
+ output are most frequently affected since their output directories are hidden.
40
+ fix: |
41
+ Set include-hidden-files: true on the upload step whenever dotfiles or dot-directories
42
+ must be preserved in the artifact:
43
+
44
+ - uses: actions/upload-artifact@v4
45
+ with:
46
+ name: build-output
47
+ path: ./dist
48
+ include-hidden-files: true
49
+
50
+ Alternatively, explicitly list only the required hidden files in the path input to
51
+ avoid uploading the entire directory with hidden file inclusion.
52
+ fix_code:
53
+ - language: yaml
54
+ label: 'Add include-hidden-files: true to preserve dotfiles and dot-directories'
55
+ code: |
56
+ - name: Upload build artifact
57
+ uses: actions/upload-artifact@v4
58
+ with:
59
+ name: build-output
60
+ path: ./.next # Next.js build output is a hidden directory
61
+ include-hidden-files: true # required — excluded by default in v4
62
+ - language: yaml
63
+ label: 'Alternative: explicitly list hidden files instead of directory glob'
64
+ code: |
65
+ - name: Upload build artifacts including dotfiles
66
+ uses: actions/upload-artifact@v4
67
+ with:
68
+ name: build-output
69
+ path: |
70
+ ./dist
71
+ ./.env.production
72
+ ./.nvmrc
73
+ ./.npmrc
74
+ prevention:
75
+ - 'Set include-hidden-files: true when uploading directories known to contain dotfiles or dot-directories (.next/, .nuxt/, .svelte-kit/, etc.)'
76
+ - 'After migrating from upload-artifact@v3 to @v4, inspect the artifact file count in the run log — a drop indicates hidden files were excluded'
77
+ - 'Add a post-upload verification step: download the artifact in a subsequent job and assert the expected dotfiles exist'
78
+ docs:
79
+ - url: 'https://github.com/actions/upload-artifact/blob/main/README.md'
80
+ label: 'actions/upload-artifact README: include-hidden-files input'
81
+ - url: 'https://github.com/actions/upload-artifact/blob/main/docs/migration-v3-to-v4.md'
82
+ label: 'Migration guide: upload-artifact v3 to v4'
@@ -0,0 +1,90 @@
1
+ id: concurrency-timing-048
2
+ title: 'github.run_id in concurrency group key disables cancel-in-progress — every run is unique, unlimited parallelism'
3
+ category: concurrency-timing
4
+ severity: silent-failure
5
+ tags:
6
+ - concurrency
7
+ - cancel-in-progress
8
+ - github-run-id
9
+ - unique-key
10
+ - parallelism
11
+ - anti-pattern
12
+ patterns:
13
+ - regex: 'group:.*\$\{\{\s*github\.run_id\s*\}\}'
14
+ flags: 'i'
15
+ - regex: 'group:.*github\.run_id'
16
+ flags: 'i'
17
+ error_messages:
18
+ - 'Old workflow runs are not being cancelled despite cancel-in-progress: true'
19
+ - 'Multiple concurrent runs executing simultaneously'
20
+ root_cause: |
21
+ github.run_id is always unique per workflow run — it is the numeric identifier
22
+ assigned at run creation time. When used in the concurrency group key, every run
23
+ evaluates to a different group name. No two runs ever share the same group, so
24
+ cancel-in-progress: true has nothing to cancel. All runs proceed simultaneously.
25
+
26
+ This anti-pattern typically originates from developers who experienced unwanted
27
+ concurrency cancellations and "fixed" the problem by adding a unique value to the
28
+ group key. The immediate cancellation symptom disappears but a more serious problem
29
+ is introduced: on high-velocity branches, dozens of in-progress CI runs pile up
30
+ simultaneously, exhausting the available runner pool and increasing costs.
31
+
32
+ Related: github.sha in the group key has the same effect (concurrency-timing-030),
33
+ but github.run_id is more severe. github.sha can repeat when a commit is re-run;
34
+ github.run_id is unconditionally unique per run and per re-run attempt, so
35
+ cancel-in-progress is permanently disabled with no exceptions.
36
+ fix: |
37
+ Remove github.run_id from the concurrency group key. Use github.ref (for branch-scoped
38
+ deduplication) or github.head_ref (for PR-scoped deduplication). If the original
39
+ goal was to prevent manual dispatch runs from being cancelled, scope the unique key
40
+ to workflow_dispatch events only using a conditional expression:
41
+
42
+ group: >-
43
+ ${{ github.workflow }}-
44
+ ${{ github.event_name == 'workflow_dispatch' && github.run_id || github.ref }}
45
+ fix_code:
46
+ - language: yaml
47
+ label: 'Wrong: github.run_id makes every run unique — cancel-in-progress is dead code'
48
+ code: |
49
+ # WRONG: every run gets its own unique group — cancel-in-progress never fires
50
+ concurrency:
51
+ group: ${{ github.workflow }}-${{ github.ref }}-${{ github.run_id }}
52
+ cancel-in-progress: true # never cancels anything
53
+
54
+ jobs:
55
+ build:
56
+ runs-on: ubuntu-latest
57
+ steps:
58
+ - uses: actions/checkout@v4
59
+ - language: yaml
60
+ label: 'Correct: branch-scoped group key enables cancel-in-progress'
61
+ code: |
62
+ # CORRECT: all pushes to same branch share one group
63
+ concurrency:
64
+ group: ${{ github.workflow }}-${{ github.ref }}
65
+ cancel-in-progress: true
66
+
67
+ jobs:
68
+ build:
69
+ runs-on: ubuntu-latest
70
+ steps:
71
+ - uses: actions/checkout@v4
72
+ - language: yaml
73
+ label: 'Advanced: isolate manual dispatch runs while deduplicating automated runs'
74
+ code: |
75
+ # Manual dispatch runs are never cancelled; push/PR runs cancel old runs on same branch
76
+ concurrency:
77
+ group: >-
78
+ ${{ github.workflow }}-
79
+ ${{ github.event_name == 'workflow_dispatch' && github.run_id || github.ref }}
80
+ cancel-in-progress: true
81
+ prevention:
82
+ - 'Never add github.run_id to a concurrency group key when the goal is to cancel old runs — it defeats cancel-in-progress entirely'
83
+ - 'Verify cancel-in-progress by triggering two rapid pushes and confirming the first run is cancelled in the Actions UI'
84
+ - 'If cancellation of specific trigger types is unwanted, use event_name-conditional keys instead of unique values'
85
+ - 'Monitor runner utilization — unbounded parallel runs will exhaust available runners and increase billing'
86
+ docs:
87
+ - url: 'https://docs.github.com/en/actions/writing-workflows/choosing-what-your-workflow-does/using-concurrency'
88
+ label: 'GitHub Docs: Using concurrency'
89
+ - url: 'https://docs.github.com/en/actions/writing-workflows/choosing-what-your-workflow-does/contexts#github-context'
90
+ label: 'GitHub Docs: github context — run_id'
@@ -0,0 +1,78 @@
1
+ id: concurrency-timing-046
2
+ title: 'pull_request_target github.ref resolves to base branch — all PRs targeting same branch share one concurrency slot'
3
+ category: concurrency-timing
4
+ severity: silent-failure
5
+ tags:
6
+ - concurrency
7
+ - pull_request_target
8
+ - github-ref
9
+ - base-branch
10
+ - serialization
11
+ patterns:
12
+ - regex: 'on:\s*\n\s+pull_request_target:'
13
+ flags: 'ms'
14
+ - regex: 'group:.*github\.ref'
15
+ flags: 'i'
16
+ error_messages:
17
+ - 'This run was automatically queued'
18
+ - 'Waiting for a pending job to complete'
19
+ root_cause: |
20
+ On pull_request events, github.ref is the head branch ref (e.g., refs/heads/my-feature).
21
+ On pull_request_target events, however, github.ref is the BASE branch ref (e.g.,
22
+ refs/heads/main) — the branch the PR targets. This is a security design choice that
23
+ prevents untrusted fork code from influencing the event ref.
24
+
25
+ When a concurrency group key uses github.ref in a pull_request_target workflow, all
26
+ open PRs targeting the same base branch (main, develop, etc.) evaluate to the identical
27
+ group key. Only one PR's CI can run at a time; all others queue behind it. On repos
28
+ with many open PRs, this effectively serializes all PR workflows into a single lane
29
+ with potentially multi-hour wait times.
30
+
31
+ The correct per-PR identifier in pull_request_target workflows is
32
+ github.event.pull_request.number — unique per PR regardless of base branch.
33
+ fix: |
34
+ Replace github.ref with github.event.pull_request.number in concurrency group keys
35
+ for pull_request_target workflows. PR numbers are unique per repository and stable
36
+ across new commits to the same PR:
37
+
38
+ concurrency:
39
+ group: ${{ github.workflow }}-${{ github.event.pull_request.number }}
40
+ cancel-in-progress: true
41
+ fix_code:
42
+ - language: yaml
43
+ label: 'Wrong: github.ref = base branch on pull_request_target — all PRs share one slot'
44
+ code: |
45
+ # WRONG: github.ref = refs/heads/main for ALL PRs targeting main
46
+ on:
47
+ pull_request_target:
48
+
49
+ concurrency:
50
+ group: ${{ github.workflow }}-${{ github.ref }} # same for every PR!
51
+ cancel-in-progress: true
52
+ - language: yaml
53
+ label: 'Correct: use github.event.pull_request.number for per-PR isolation'
54
+ code: |
55
+ # CORRECT: PR number is unique per PR, stable across pushes to same PR
56
+ on:
57
+ pull_request_target:
58
+
59
+ concurrency:
60
+ group: ${{ github.workflow }}-${{ github.event.pull_request.number }}
61
+ cancel-in-progress: true
62
+
63
+ jobs:
64
+ lint:
65
+ runs-on: ubuntu-latest
66
+ steps:
67
+ - uses: actions/checkout@v4
68
+ with:
69
+ ref: ${{ github.event.pull_request.head.sha }}
70
+ prevention:
71
+ - 'In pull_request_target workflows, never use github.ref as the sole differentiator in concurrency groups — it is the base branch ref'
72
+ - 'Use github.event.pull_request.number to scope concurrency to individual PRs'
73
+ - 'Audit concurrency groups when migrating workflows from pull_request to pull_request_target'
74
+ docs:
75
+ - url: 'https://docs.github.com/en/actions/writing-workflows/choosing-when-your-workflow-runs/events-that-trigger-workflows#pull_request_target'
76
+ label: 'GitHub Docs: pull_request_target event'
77
+ - url: 'https://docs.github.com/en/actions/writing-workflows/choosing-what-your-workflow-does/using-concurrency'
78
+ label: 'GitHub Docs: Using concurrency'
@@ -0,0 +1,87 @@
1
+ id: concurrency-timing-047
2
+ title: 'workflow_dispatch and schedule sharing a concurrency group — manual dispatch silently cancels queued scheduled run'
3
+ category: concurrency-timing
4
+ severity: silent-failure
5
+ tags:
6
+ - concurrency
7
+ - workflow_dispatch
8
+ - schedule
9
+ - cancel-in-progress
10
+ - scheduled-job
11
+ patterns:
12
+ - regex: 'schedule:.*\n.*workflow_dispatch:|workflow_dispatch:.*\n.*schedule:'
13
+ flags: 'ms'
14
+ - regex: 'group:\s*.*github\.workflow'
15
+ flags: 'i'
16
+ error_messages:
17
+ - 'This run was automatically cancelled'
18
+ - 'Canceling since a higher priority waiting run was found'
19
+ root_cause: |
20
+ When a workflow is triggered by both schedule and workflow_dispatch and uses a shared
21
+ concurrency group key that does not include github.event_name (e.g.,
22
+ group: ${{ github.workflow }}-${{ github.ref }}), all runs — regardless of trigger
23
+ type — map to the same concurrency slot.
24
+
25
+ When cancel-in-progress: true is set, any manual workflow_dispatch run immediately
26
+ cancels the scheduled run that may be actively executing. A developer who triggers
27
+ a manual run can silently kill a scheduled maintenance job, nightly report, or backup
28
+ workflow with no warning or notification.
29
+
30
+ When cancel-in-progress: false, GitHub only keeps one pending run per concurrency
31
+ slot. A queued scheduled run is silently displaced when the dispatch run arrives.
32
+ The scheduled run is discarded with no error, no notification, and no log entry.
33
+
34
+ This affects maintenance workflows, report generators, data sync jobs, and backup
35
+ workflows where workflow_dispatch is added for "emergency manual runs" after the
36
+ initial scheduled implementation.
37
+ fix: |
38
+ Include github.event_name in the concurrency group key to give each trigger type
39
+ its own independent concurrency slot:
40
+
41
+ group: ${{ github.workflow }}-${{ github.event_name }}-${{ github.ref }}
42
+
43
+ This ensures that manual dispatch runs and scheduled runs never compete for the
44
+ same slot and cannot cancel each other.
45
+ fix_code:
46
+ - language: yaml
47
+ label: 'Wrong: schedule and workflow_dispatch share the same concurrency slot'
48
+ code: |
49
+ on:
50
+ schedule:
51
+ - cron: '0 3 * * *' # nightly at 03:00 UTC
52
+ workflow_dispatch:
53
+
54
+ # WRONG: both trigger types evaluate to the same group key
55
+ concurrency:
56
+ group: ${{ github.workflow }}-${{ github.ref }}
57
+ cancel-in-progress: true # dispatch run kills the in-progress scheduled run
58
+ - language: yaml
59
+ label: 'Correct: include github.event_name to isolate trigger types'
60
+ code: |
61
+ on:
62
+ schedule:
63
+ - cron: '0 3 * * *'
64
+ workflow_dispatch:
65
+
66
+ # CORRECT: schedule and workflow_dispatch get separate concurrency slots
67
+ concurrency:
68
+ group: ${{ github.workflow }}-${{ github.event_name }}-${{ github.ref }}
69
+ cancel-in-progress: true
70
+
71
+ jobs:
72
+ nightly:
73
+ runs-on: ubuntu-latest
74
+ steps:
75
+ - uses: actions/checkout@v4
76
+ - run: ./nightly-tasks.sh
77
+ prevention:
78
+ - 'Always include ${{ github.event_name }} in the concurrency group for workflows with multiple trigger event types'
79
+ - 'After adding workflow_dispatch to an existing scheduled workflow, verify scheduled runs are not silently displaced'
80
+ - 'Monitor the Actions tab run history — consecutive scheduled run gaps may indicate silent cancellations'
81
+ docs:
82
+ - url: 'https://docs.github.com/en/actions/writing-workflows/choosing-what-your-workflow-does/using-concurrency'
83
+ label: 'GitHub Docs: Using concurrency'
84
+ - url: 'https://docs.github.com/en/actions/writing-workflows/choosing-when-your-workflow-runs/events-that-trigger-workflows#schedule'
85
+ label: 'GitHub Docs: schedule event'
86
+ - url: 'https://docs.github.com/en/actions/writing-workflows/choosing-when-your-workflow-runs/events-that-trigger-workflows#workflow_dispatch'
87
+ label: 'GitHub Docs: workflow_dispatch event'
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@htekdev/actions-debugger",
3
- "version": "1.0.103",
3
+ "version": "1.0.104",
4
4
  "description": "65+ real GitHub Actions errors, queryable by agents. CLI + MCP server + Copilot skills + error database.",
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",