@htekdev/actions-debugger 1.0.111 → 1.0.113

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,121 @@
1
+ id: 'runner-environment-182'
2
+ title: 'actions/checkout sparse-checkout-cone-mode: true not honored when container git < 2.37'
3
+ category: 'runner-environment'
4
+ severity: 'error'
5
+ tags:
6
+ - sparse-checkout
7
+ - cone-mode
8
+ - git-version
9
+ - container
10
+ - checkout
11
+ - self-hosted
12
+ patterns:
13
+ - regex: 'sparse-checkout-cone-mode.*true.*container'
14
+ flags: 'i'
15
+ - regex: 'git.*2\.[12][0-9]\.'
16
+ flags: 'i'
17
+ - regex: 'core\.sparseCheckoutConeMode.*not set'
18
+ flags: 'i'
19
+ error_messages:
20
+ - "Expected full checkout but only subdirectory present"
21
+ - "Sibling files missing from sparse checkout cone"
22
+ - "core.sparseCheckoutConeMode"
23
+ root_cause: |
24
+ `actions/checkout` enables sparse-checkout cone mode by setting
25
+ `core.sparseCheckoutConeMode = true` in the git config. However, the
26
+ `git sparse-checkout set` command requires the explicit `--cone` flag to
27
+ activate cone mode in Git versions **before 2.37.0**.
28
+
29
+ Starting with Git 2.37.0, cone mode became the default for `git sparse-checkout`.
30
+ In earlier Git versions, cone mode must be opted into with `--cone`. The
31
+ `actions/checkout` action does NOT pass `--cone` explicitly, so when running
32
+ inside a container image with Git < 2.37 (e.g., `ubuntu:22.04` ships with
33
+ Git 2.34.1), setting `sparse-checkout-cone-mode: true` has no effect.
34
+
35
+ The result is that cone mode is silently ignored. The checkout runs in non-cone
36
+ (gitignore pattern) mode instead, which means:
37
+ - Root-level sibling files that should be included in cone mode are absent
38
+ - Only the exact subdirectory specified is checked out, without the expected
39
+ parent-level files
40
+ - Subsequent steps that depend on root-level files (e.g., package.json, .env,
41
+ Makefile) fail with "file not found" errors that appear unrelated to checkout
42
+
43
+ Reported in actions/checkout#1868 (Aug 2024).
44
+ fix: |
45
+ Option 1 (recommended): Upgrade Git in the container to 2.37.0 or later.
46
+ For containers based on Ubuntu 22.04, install a newer Git via PPA:
47
+ add-apt-repository ppa:git-core/ppa && apt-get install git
48
+
49
+ Option 2: Add an explicit `git sparse-checkout init --cone` step AFTER checkout
50
+ to force cone mode activation retroactively. This is a workaround for containers
51
+ where upgrading Git is not possible.
52
+
53
+ Option 3: Use GitHub-hosted runners (ubuntu-latest, ubuntu-24.04) which ship
54
+ with Git >= 2.43, where cone mode works correctly by default.
55
+
56
+ Option 4: If specific file patterns are required (not just directories), use
57
+ `sparse-checkout-cone-mode: false` with root-anchored `/pattern` patterns
58
+ instead of relying on cone mode.
59
+ fix_code:
60
+ - language: yaml
61
+ label: 'Upgrade git in container before checkout (Ubuntu 22.04 example)'
62
+ code: |
63
+ jobs:
64
+ build:
65
+ runs-on: ubuntu-latest
66
+ container:
67
+ image: ubuntu:22.04
68
+ steps:
69
+ - name: Upgrade git to 2.37+ for sparse-checkout cone mode support
70
+ run: |
71
+ apt-get update -qq
72
+ apt-get install -y software-properties-common
73
+ add-apt-repository -y ppa:git-core/ppa
74
+ apt-get update -qq
75
+ apt-get install -y git
76
+ git --version # Verify >= 2.37
77
+
78
+ - uses: actions/checkout@v4
79
+ with:
80
+ sparse-checkout: |
81
+ src
82
+ config
83
+ sparse-checkout-cone-mode: true # Now honored after Git 2.37+ installed
84
+ - language: yaml
85
+ label: 'Workaround: force --cone after checkout on old Git'
86
+ code: |
87
+ - uses: actions/checkout@v4
88
+ with:
89
+ sparse-checkout: src
90
+ sparse-checkout-cone-mode: true
91
+
92
+ # Explicitly enable cone mode on Git < 2.37 (workaround for actions/checkout#1868)
93
+ - name: Force cone mode on old git
94
+ run: |
95
+ git sparse-checkout init --cone
96
+ git sparse-checkout set src
97
+ - language: yaml
98
+ label: 'Use GitHub-hosted runner to avoid old git versions'
99
+ code: |
100
+ jobs:
101
+ build:
102
+ runs-on: ubuntu-latest # Ships with Git 2.43+ — cone mode works correctly
103
+ steps:
104
+ - uses: actions/checkout@v4
105
+ with:
106
+ sparse-checkout: |
107
+ src
108
+ config
109
+ # sparse-checkout-cone-mode: true # Default, works on ubuntu-latest
110
+ prevention:
111
+ - "Check the git version in container images before relying on sparse-checkout cone mode: run 'git --version' in a workflow step."
112
+ - "Upgrade container base images to Ubuntu 24.04 or Debian 12 which ship with Git >= 2.39."
113
+ - "Pin to GitHub-hosted runners (ubuntu-latest, ubuntu-24.04) for consistent Git versions that support cone mode."
114
+ - "After setting up sparse checkout, add a debug step printing 'git config core.sparseCheckoutConeMode' to verify cone mode is active."
115
+ docs:
116
+ - url: 'https://github.com/actions/checkout/issues/1868'
117
+ label: 'actions/checkout#1868 — sparse-checkout-cone-mode not honored on git < 2.37'
118
+ - url: 'https://git-scm.com/docs/git-sparse-checkout/2.37.0'
119
+ label: 'Git 2.37 release notes — cone mode becomes the default for sparse-checkout'
120
+ - url: 'https://github.com/actions/checkout?tab=readme-ov-file'
121
+ label: 'actions/checkout — sparse-checkout inputs documentation'
@@ -0,0 +1,104 @@
1
+ id: silent-failures-099
2
+ title: 'setup-node registry-url auto-sets NODE_AUTH_TOKEN which blocks npm OIDC provenance publish'
3
+ category: silent-failures
4
+ severity: silent-failure
5
+ tags:
6
+ - setup-node
7
+ - npm
8
+ - oidc
9
+ - provenance
10
+ - NODE_AUTH_TOKEN
11
+ - registry-url
12
+ - publish
13
+ patterns:
14
+ - regex: 'npm publish.*--provenance'
15
+ flags: 'i'
16
+ - regex: 'npm (ERR!|error) code E401'
17
+ flags: 'i'
18
+ - regex: 'NODE_AUTH_TOKEN.*publish|npm.*oidc.*token'
19
+ flags: 'i'
20
+ error_messages:
21
+ - "npm error code E401"
22
+ - "npm error 401 Unauthorized - PUT https://registry.npmjs.org/"
23
+ - "npm publish --provenance"
24
+ root_cause: |
25
+ When actions/setup-node is used with `registry-url`, it automatically generates a
26
+ `.npmrc` file containing `//registry.npmjs.org/:_authToken=${NODE_AUTH_TOKEN}`. This
27
+ binds npm authentication to the NODE_AUTH_TOKEN environment variable at publish time.
28
+
29
+ For npm OIDC publishing (`npm publish --provenance`), npm requires that no
30
+ `_authToken` is set (or that it is empty string), so that npm can use the GitHub
31
+ Actions OIDC token to authenticate and attach a sigstore provenance attestation.
32
+
33
+ However, if NODE_AUTH_TOKEN is present in the environment — even set by setup-node's
34
+ own post-install logic (authutil.ts sets a default value when registry-url is
35
+ provided) — npm uses that token for auth instead of OIDC. This silently bypasses the
36
+ OIDC flow in one of two ways:
37
+ 1. NODE_AUTH_TOKEN is set to a valid npm publish token → publish succeeds but
38
+ WITHOUT provenance attestation (silent failure, no error thrown).
39
+ 2. NODE_AUTH_TOKEN is set to a wrong/expired value (e.g., GitHub token) → npm
40
+ rejects with E401 Unauthorized, making it seem like a credential problem.
41
+
42
+ Both cases confuse developers who believe setup-node + --provenance "just works".
43
+ The root: setup-node's auto-set NODE_AUTH_TOKEN takes precedence over OIDC.
44
+
45
+ Source: actions/setup-node#1440 (23 reactions, closed May 2026 — setup-node v5+ adds
46
+ a new behavior where OIDC is respected, but pre-v5 or misconfigured workflows still
47
+ hit this).
48
+ fix: |
49
+ Option 1 (recommended — explicit unset in publish step):
50
+ Unset NODE_AUTH_TOKEN in the npm publish step's `env:` block so that OIDC can take
51
+ over. An empty string `""` causes npm to ignore the .npmrc token reference.
52
+
53
+ Option 2: Remove `registry-url` from setup-node if you don't need .npmrc written
54
+ (e.g., when publishing to npmjs.org with OIDC only). setup-node only writes .npmrc
55
+ when registry-url is explicitly set.
56
+
57
+ Option 3: Upgrade to actions/setup-node@v5+ which fixed the default NODE_AUTH_TOKEN
58
+ behavior to not override OIDC when the token is unset.
59
+
60
+ Option 4: Set `auth-token: ""` in the setup-node step (setup-node v5.5.0+).
61
+ fix_code:
62
+ - language: yaml
63
+ label: 'Unset NODE_AUTH_TOKEN in the npm publish step to allow OIDC'
64
+ code: |
65
+ - uses: actions/setup-node@v4
66
+ with:
67
+ node-version: '20'
68
+ registry-url: 'https://registry.npmjs.org'
69
+
70
+ - name: Publish with provenance
71
+ run: npm publish --provenance --access public
72
+ env:
73
+ NODE_AUTH_TOKEN: '' # Explicitly empty so npm uses OIDC instead of token auth
74
+ - language: yaml
75
+ label: 'Correct OIDC provenance publish permissions'
76
+ code: |
77
+ permissions:
78
+ contents: read
79
+ id-token: write # Required for OIDC token — without this npm --provenance fails
80
+
81
+ steps:
82
+ - uses: actions/setup-node@v4
83
+ with:
84
+ node-version: '20'
85
+ registry-url: 'https://registry.npmjs.org'
86
+
87
+ - run: npm publish --provenance --access public
88
+ env:
89
+ NODE_AUTH_TOKEN: ''
90
+ prevention:
91
+ - 'Always set `id-token: write` permission when using npm --provenance OIDC publishing'
92
+ - 'Set `NODE_AUTH_TOKEN: ""` explicitly in the env of the npm publish step when using OIDC'
93
+ - 'Upgrade to actions/setup-node v5+ which corrected the default NODE_AUTH_TOKEN behavior'
94
+ - 'Verify provenance attestation was created: check the package page on npmjs.org for the attestations badge'
95
+ - 'Avoid setting registry-url in setup-node if only using OIDC and no npm install caching is needed'
96
+ docs:
97
+ - url: 'https://github.com/actions/setup-node/issues/1440'
98
+ label: 'actions/setup-node#1440: Don''t default NPM_AUTH_TOKEN to support NPM OIDC (23 reactions, closed May 2026)'
99
+ - url: 'https://docs.npmjs.com/generating-provenance-statements'
100
+ label: 'npm Docs: Generating provenance statements'
101
+ - url: 'https://docs.github.com/en/actions/security-for-github-actions/using-artifact-attestations/using-artifact-attestations-to-establish-provenance-for-builds'
102
+ label: 'GitHub Docs: Artifact attestations for build provenance'
103
+ - url: 'https://github.com/actions/setup-node/blob/main/docs/advanced-usage.md#publish-to-npmjs-and-gpr-with-npm'
104
+ label: 'setup-node advanced usage: publishing to npm'
@@ -0,0 +1,96 @@
1
+ id: 'silent-failures-100'
2
+ title: 'sparse-checkout-cone-mode: false matches file patterns at any depth, checking out unintended paths'
3
+ category: 'silent-failures'
4
+ severity: 'silent-failure'
5
+ tags:
6
+ - sparse-checkout
7
+ - cone-mode
8
+ - gitignore-patterns
9
+ - checkout
10
+ - extra-files
11
+ patterns:
12
+ - regex: 'sparse-checkout-cone-mode:\s*false'
13
+ flags: 'i'
14
+ - regex: 'sparse.checkout.*cone.mode.*false'
15
+ flags: 'i'
16
+ - regex: 'non.cone mode.*sparse'
17
+ flags: 'i'
18
+ error_messages:
19
+ - "Run actions/checkout@v4"
20
+ - "sparse-checkout-cone-mode: false"
21
+ - "Unexpected files present in workspace"
22
+ root_cause: |
23
+ When `sparse-checkout-cone-mode: false` is set, `actions/checkout` uses
24
+ gitignore-style pattern matching for sparse checkout. In this non-cone mode,
25
+ a pattern like `myfile.yaml` (without a leading `/`) is interpreted as a
26
+ gitignore glob that matches `myfile.yaml` at ANY depth in the repository tree,
27
+ not just at the root. This causes `folderA/myfile.yaml`,
28
+ `folderB/subdir/myfile.yaml`, and all other path-depth occurrences of the
29
+ filename to be checked out alongside the intended root-level `myfile.yaml`.
30
+
31
+ Similarly, a pattern like `scripts` matches not just the top-level `scripts/`
32
+ directory but any directory or file named `scripts` at any depth.
33
+
34
+ The checkout step reports success with no error — the silent failure is that
35
+ the workspace contains more files than the developer expected, which can:
36
+ - Cause unintended files to be processed by downstream steps
37
+ - Inflate workspace size beyond what sparse checkout was intended to achieve
38
+ - Cause cache keys computed from workspace contents to be incorrect
39
+ - Introduce security risks if sensitive files at unexpected paths are included
40
+
41
+ Reported in actions/checkout#1628 (Feb 2024, multiple reproductions).
42
+ Non-cone mode is also deprecated by the Git project for these and other reasons.
43
+ fix: |
44
+ Option 1 (recommended): Switch to cone mode (the default).
45
+ Cone mode only accepts directory names, not patterns. It always includes root-level
46
+ files and all files under the specified directories. It is faster and predictable.
47
+
48
+ Option 2: Anchor non-cone patterns to the root with a leading `/`.
49
+ In gitignore syntax, a leading `/` anchors the pattern to the root of the tree,
50
+ so `/myfile.yaml` matches only the root-level file, not `/subfolder/myfile.yaml`.
51
+
52
+ Option 3: Use `filter: blob:none` (partial clone) instead of sparse-checkout
53
+ when you need to avoid downloading specific large binary assets rather than
54
+ limiting which files are checked out.
55
+ fix_code:
56
+ - language: yaml
57
+ label: 'Switch from non-cone to cone mode (recommended)'
58
+ code: |
59
+ # BEFORE (non-cone mode — patterns match at any depth)
60
+ # - uses: actions/checkout@v4
61
+ # with:
62
+ # sparse-checkout-cone-mode: false
63
+ # sparse-checkout: |
64
+ # myfile.yaml
65
+ # scripts
66
+
67
+ # AFTER (cone mode — specify directory names; root files always included)
68
+ - uses: actions/checkout@v4
69
+ with:
70
+ # sparse-checkout-cone-mode: true # This is the default — safe to omit
71
+ sparse-checkout: |
72
+ scripts
73
+ # Root-level files are always included in cone mode automatically
74
+ - language: yaml
75
+ label: 'Anchor non-cone patterns to root with leading / if you must use non-cone mode'
76
+ code: |
77
+ - uses: actions/checkout@v4
78
+ with:
79
+ sparse-checkout-cone-mode: false
80
+ sparse-checkout: |
81
+ /myfile.yaml # Leading / anchors to repo root only
82
+ /scripts # Only the top-level scripts/ directory
83
+ # WITHOUT leading /, 'scripts' would match any 'scripts' dir at any depth
84
+ prevention:
85
+ - "Avoid sparse-checkout-cone-mode: false unless you specifically need gitignore-style pattern matching."
86
+ - "When using non-cone mode, always prefix patterns with / to anchor them to the repository root."
87
+ - "After a sparse checkout, validate workspace contents by printing ls -R or find . to spot unexpected files."
88
+ - "Prefer cone mode (the default) — it is faster, predictable, and not deprecated."
89
+ - "For excluding large binary files rather than limiting directory scope, use partial clone with filter: blob:none."
90
+ docs:
91
+ - url: 'https://github.com/actions/checkout/issues/1628'
92
+ label: 'actions/checkout#1628 — sparse-checkout checks out undefined paths in non-cone mode'
93
+ - url: 'https://git-scm.com/docs/git-sparse-checkout#_non_cone_problems'
94
+ label: 'Git docs — Non-cone mode problems and deprecation notice'
95
+ - url: 'https://github.com/actions/checkout?tab=readme-ov-file#fetch-only-a-single-file'
96
+ label: 'actions/checkout — Sparse-checkout usage and cone-mode default'
@@ -0,0 +1,90 @@
1
+ id: silent-failures-101
2
+ title: "upload-artifact/download-artifact fails silently with no error message on Windows (exit -1073740791)"
3
+ category: silent-failures
4
+ severity: error
5
+ tags:
6
+ - upload-artifact
7
+ - download-artifact
8
+ - windows
9
+ - silent-failure
10
+ - node-crash
11
+ - heap-corruption
12
+ patterns:
13
+ - regex: 'Node Action run completed with exit code -1073740791'
14
+ flags: 'i'
15
+ - regex: '^Finalizing artifact upload\s*$'
16
+ flags: 'im'
17
+ - regex: '^Downloading single artifact\s*$'
18
+ flags: 'im'
19
+ error_messages:
20
+ - "##[debug]Node Action run completed with exit code -1073740791"
21
+ - "Finalizing artifact upload"
22
+ - "Downloading single artifact"
23
+ root_cause: |
24
+ A Promise rejection during blob upload (upload-artifact) or HTTP chunk download
25
+ (download-artifact) causes the Node.js process to terminate abruptly on Windows
26
+ with exit code -1073740791 (STATUS_HEAP_CORRUPTION / 0xC0000409). Node exits
27
+ before the catch handler runs, so no error message is ever logged — the step
28
+ fails silently with no diagnostic output.
29
+
30
+ The underlying race was in actions/toolkit's HTTP client: when a blob transfer
31
+ encounters a network blip or ABS latency spike, an unhandled promise rejection
32
+ aborts the Node process on Windows. The bug manifests more frequently on Windows
33
+ runners, on large artifacts (>100MB), and during periods of elevated Azure Blob
34
+ Storage latency.
35
+
36
+ Typical log signatures:
37
+ - upload-artifact: logs stop after "Finalizing artifact upload" — the
38
+ "Artifact ... successfully finalized. Artifact ID ..." confirmation line
39
+ is absent.
40
+ - download-artifact: logs stop after "Downloading single artifact" — the
41
+ "Artifact download completed successfully" line is absent, and debug logs
42
+ show "Node Action run completed with exit code -1073740791".
43
+ fix: |
44
+ 1. Re-run the failed job — the bug is transient and sporadic; most reruns succeed.
45
+ 2. Upgrade to upload-artifact v4.6.0+ and download-artifact v4.2.0+ / v8.0.2+
46
+ which include the fix from actions/toolkit#2406 (deferred promise creation
47
+ in chunk loops and propagated download errors).
48
+ 3. If using a Windows runner and seeing frequent failures, split large artifacts
49
+ into smaller named chunks to reduce per-blob transfer time.
50
+ fix_code:
51
+ - language: yaml
52
+ label: "Upgrade artifact actions to fixed versions"
53
+ code: |
54
+ # upload-artifact v4.6.0+ includes fix for silent heap corruption exit
55
+ - uses: actions/upload-artifact@v4
56
+ with:
57
+ name: my-artifact
58
+ path: dist/
59
+
60
+ # download-artifact v4.2.0+ / v8.0.2+ includes fix
61
+ - uses: actions/download-artifact@v4
62
+ with:
63
+ name: my-artifact
64
+ - language: yaml
65
+ label: "Workaround: split large artifacts to reduce per-blob transfer failures"
66
+ code: |
67
+ # Upload separate chunks instead of one large artifact
68
+ - uses: actions/upload-artifact@v4
69
+ with:
70
+ name: my-artifact-binaries
71
+ path: dist/binaries/
72
+
73
+ - uses: actions/upload-artifact@v4
74
+ with:
75
+ name: my-artifact-assets
76
+ path: dist/assets/
77
+ prevention:
78
+ - "Pin upload-artifact to v4.6.0+ and download-artifact to v4.2.0+/v8.0.2+ which include the heap corruption fix"
79
+ - "Monitor Windows runner jobs for sporadic step failures with no error output — a rerun is the immediate workaround"
80
+ - "Prefer uploading many smaller artifacts over one large artifact to reduce per-blob transfer window"
81
+ - "Enable debug logging (ACTIONS_RUNNER_DEBUG=true) to surface the exit code -1073740791 diagnostic line"
82
+ docs:
83
+ - url: "https://github.com/actions/upload-artifact/issues/806"
84
+ label: "[bug] Upload failed without an error output (upload-artifact#806)"
85
+ - url: "https://github.com/actions/download-artifact/issues/475"
86
+ label: "[bug] Action failed without any error message (download-artifact#475)"
87
+ - url: "https://github.com/actions/toolkit/pull/2406"
88
+ label: "Fix: Propagate download error and verify length (toolkit#2406)"
89
+ - url: "https://github.com/actions/download-artifact/pull/479"
90
+ label: "Fix: Defer promise creation into chunk loop to prevent unhandled rejections on Windows (download-artifact#479)"
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@htekdev/actions-debugger",
3
- "version": "1.0.111",
3
+ "version": "1.0.113",
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",