@htekdev/actions-debugger 1.0.27 → 1.0.28

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,90 @@
1
+ id: runner-environment-080
2
+ title: "Container job ENTRYPOINT silently overridden by GitHub Actions runner"
3
+ category: runner-environment
4
+ severity: silent-failure
5
+ tags:
6
+ - container
7
+ - docker
8
+ - entrypoint
9
+ - job-container
10
+ - dockerfile
11
+ - initialization
12
+ patterns:
13
+ - regex: 'ENTRYPOINT.*not.*execut|entrypoint.*not.*run|entrypoint.*overrid|custom.*entrypoint.*skip'
14
+ flags: 'i'
15
+ - regex: 'container.*init.*fail|setup.*script.*not.*run'
16
+ flags: 'i'
17
+ error_messages:
18
+ - "Custom initialization script did not run in container job"
19
+ - "Expected environment setup from ENTRYPOINT was missing"
20
+ - "Docker container ENTRYPOINT not executing in GitHub Actions"
21
+ root_cause: |
22
+ When a workflow job uses a container image via the container: key, the GitHub
23
+ Actions runner creates the container with --entrypoint "", explicitly replacing
24
+ any ENTRYPOINT defined in the Docker image with an empty string. This is by
25
+ design: the runner must inject its own workspace setup and process management
26
+ before any user steps run.
27
+
28
+ As a result, ENTRYPOINT instructions in the container Dockerfile are silently
29
+ ignored. Steps then run via docker exec into the already-running container, so
30
+ the ENTRYPOINT never fires. Initialization logic that developers expect to run
31
+ (environment setup, tool configuration, user switching) simply does not happen.
32
+
33
+ This is distinct from Docker container ACTIONS (action.yml with runs.using:
34
+ docker), which DO execute ENTRYPOINT as specified. The override only applies to
35
+ workflow job containers (jobs.<id>.container:).
36
+ fix: |
37
+ Choose one of these approaches:
38
+
39
+ 1. Move initialization to CMD. GitHub Actions does not override CMD, and the
40
+ docker container options: field lets you pass --entrypoint pointing to your
41
+ init script.
42
+
43
+ 2. Use the container options: field to specify the entrypoint explicitly:
44
+ options: --entrypoint /path/to/init.sh
45
+
46
+ 3. Add an explicit initialization step at the top of the job. This is the most
47
+ transparent approach: the step runs before other steps and is visible in logs.
48
+
49
+ 4. Switch to a Docker container ACTION (action.yml) if you need ENTRYPOINT
50
+ semantics and own the action definition.
51
+ fix_code:
52
+ - language: yaml
53
+ label: "Option A: Override entrypoint via container options"
54
+ code: |
55
+ jobs:
56
+ build:
57
+ runs-on: ubuntu-latest
58
+ container:
59
+ image: my-custom-image:latest
60
+ options: --entrypoint /usr/local/bin/my-init.sh
61
+ steps:
62
+ - name: Run build
63
+ run: make build
64
+
65
+ - language: yaml
66
+ label: "Option B: Run initialization as an explicit first step (most transparent)"
67
+ code: |
68
+ jobs:
69
+ build:
70
+ runs-on: ubuntu-latest
71
+ container:
72
+ image: my-custom-image:latest
73
+ steps:
74
+ - name: Initialize environment
75
+ run: /usr/local/bin/my-init.sh
76
+ - name: Run build
77
+ run: make build
78
+ prevention:
79
+ - "Do not rely on ENTRYPOINT for initialization in workflow job containers"
80
+ - "Use CMD for default command arguments; keep setup in workflow steps or the options: field"
81
+ - "Test container behavior locally with docker run --entrypoint '' myimage bash to simulate GitHub Actions"
82
+ - "Use Docker container actions (action.yml with runs.using: docker) when ENTRYPOINT execution is required"
83
+ - "Document any ENTRYPOINT logic removal in a comment in the Dockerfile"
84
+ docs:
85
+ - url: "https://docs.github.com/en/actions/reference/dockerfile-support-for-github-actions"
86
+ label: "Dockerfile support for GitHub Actions"
87
+ - url: "https://docs.github.com/en/actions/using-jobs/running-jobs-in-a-container"
88
+ label: "Running jobs in a container"
89
+ - url: "https://github.com/actions/runner/issues/1964"
90
+ label: "actions/runner#1964: Docker entrypoint not executing in container jobs (open, 8 reactions)"
@@ -0,0 +1,80 @@
1
+ id: runner-environment-081
2
+ title: "GITHUB_PATH prepend breaks container job when image has no PATH environment variable"
3
+ category: runner-environment
4
+ severity: error
5
+ tags:
6
+ - container
7
+ - GITHUB_PATH
8
+ - PATH
9
+ - docker
10
+ - minimal-image
11
+ - distroless
12
+ patterns:
13
+ - regex: 'PATH=:[^:"\s]|PATH=\s*:'
14
+ flags: ''
15
+ - regex: '(bash|sh|python|node|java).*not found|exec.*No such file|cannot execute binary'
16
+ flags: 'i'
17
+ error_messages:
18
+ - "bash: command not found"
19
+ - "sh: 1: /usr/local/bin/bash: not found"
20
+ - "exec: /bin/sh: no such file or directory"
21
+ - "OCI runtime exec failed: exec failed: unable to start container process"
22
+ - "/bin/bash: No such file or directory"
23
+ root_cause: |
24
+ When a workflow step uses echo /new/path >> $GITHUB_PATH to add a directory to
25
+ PATH in a container job, the Actions runner prepends the new path to the
26
+ container's existing PATH. If the container image was built without an explicit
27
+ ENV PATH=... Dockerfile instruction, the container has no PATH environment
28
+ variable at startup.
29
+
30
+ The runner's prepend operation results in PATH=:/new/path — a leading colon
31
+ that causes the shell to treat an empty string as the first search directory.
32
+ Worse, standard system paths (/usr/bin, /bin, etc.) are no longer in PATH at
33
+ all, so subsequent steps cannot find any commands including bash itself.
34
+
35
+ Affected images include OpenSUSE, Alpine-based images that inherit from scratch,
36
+ distroless containers, and any custom image that does not explicitly set PATH.
37
+ The issue was reported in actions/runner#3210 and closed as not_planned — the
38
+ runner will not fix this behavior; images must include PATH in their ENV.
39
+ fix: |
40
+ Add an explicit ENV PATH= instruction to the container Dockerfile. This gives
41
+ the runner a non-empty base PATH to prepend to, preserving the standard system
42
+ paths.
43
+
44
+ If you cannot modify the container image, set PATH in a step before any
45
+ GITHUB_PATH usage, or use absolute executable paths in subsequent steps.
46
+ fix_code:
47
+ - language: yaml
48
+ label: "Fix 1: Add ENV PATH to Dockerfile (recommended)"
49
+ code: |
50
+ # Dockerfile fix — add explicit PATH before your custom layers
51
+ FROM opensuse/leap:15.5
52
+ ENV PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
53
+
54
+ - language: yaml
55
+ label: "Fix 2: Set PATH in a workflow step before adding to GITHUB_PATH"
56
+ code: |
57
+ jobs:
58
+ build:
59
+ runs-on: ubuntu-latest
60
+ container: opensuse/leap
61
+ steps:
62
+ - name: Initialize PATH for container
63
+ run: |
64
+ # Set base PATH first so prepend works correctly
65
+ echo "PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/my/tool" >> $GITHUB_PATH
66
+ - name: Use tool
67
+ run: my-tool --version
68
+ prevention:
69
+ - "Always add ENV PATH=... to custom Docker images used in GitHub Actions container jobs"
70
+ - "Test container images with docker run --entrypoint '' myimage bash -c 'echo $PATH' to verify PATH is set"
71
+ - "Prefer official base images (debian, ubuntu, alpine) that include PATH in their default ENV"
72
+ - "Avoid echo path >> $GITHUB_PATH in minimal, scratch-based, or distroless container images"
73
+ - "Pin to base image versions that explicitly document their ENV PATH value"
74
+ docs:
75
+ - url: "https://github.com/actions/runner/issues/3210"
76
+ label: "actions/runner#3210: Prepending PATH breaks container if image has no PATH env (closed not_planned)"
77
+ - url: "https://docs.github.com/en/actions/writing-workflows/choosing-what-your-workflow-does/workflow-commands-for-github-actions#adding-a-system-path"
78
+ label: "Adding a system path — Workflow commands for GitHub Actions"
79
+ - url: "https://docs.github.com/en/actions/using-jobs/running-jobs-in-a-container"
80
+ label: "Running jobs in a container"
@@ -0,0 +1,81 @@
1
+ id: silent-failures-035
2
+ title: "github.event.inputs empty in workflow_call context — use inputs context instead"
3
+ category: silent-failures
4
+ severity: silent-failure
5
+ tags:
6
+ - workflow_call
7
+ - workflow_dispatch
8
+ - inputs-context
9
+ - reusable-workflow
10
+ - dual-trigger
11
+ - event-inputs
12
+ patterns:
13
+ - regex: 'github\.event\.inputs\.[a-zA-Z_][a-zA-Z0-9_]*'
14
+ flags: ''
15
+ error_messages:
16
+ - "Input parameter evaluated to empty string"
17
+ - "Expected value from github.event.inputs but got empty"
18
+ - "Workflow input undefined in reusable call context"
19
+ root_cause: |
20
+ github.event.inputs is only populated when a workflow is triggered by a
21
+ workflow_dispatch event. When the same workflow is triggered as a reusable
22
+ workflow via workflow_call, github.event.inputs is an empty object {} — all
23
+ property lookups silently return empty string.
24
+
25
+ This is a frequent silent failure in dual-trigger workflows designed to be both
26
+ manually triggered and called as reusable workflows. Developers who write
27
+ ${{ github.event.inputs.MY_PARAM }} based on older tutorials or pre-2022 docs
28
+ find that the workflow_call path silently gets empty values, causing wrong
29
+ conditionals, empty environment variables, or unintended default behaviors.
30
+
31
+ In June 2022, GitHub introduced the unified inputs context that works for both
32
+ workflow_dispatch and workflow_call. Using ${{ inputs.PARAM }} is the correct
33
+ cross-trigger approach. github.event.inputs is preserved only for backwards
34
+ compatibility with pure workflow_dispatch workflows.
35
+ fix: |
36
+ Replace all instances of ${{ github.event.inputs.PARAM }} with
37
+ ${{ inputs.PARAM }}. The inputs context resolves correctly for both
38
+ workflow_dispatch and workflow_call triggers since the June 2022 unification.
39
+
40
+ Declare the same input names in both workflow_dispatch.inputs and
41
+ workflow_call.inputs sections of the dual-trigger workflow.
42
+ fix_code:
43
+ - language: yaml
44
+ label: "Dual-trigger workflow using inputs context (correct)"
45
+ code: |
46
+ on:
47
+ workflow_dispatch:
48
+ inputs:
49
+ environment:
50
+ description: 'Target environment'
51
+ required: true
52
+ type: string
53
+ workflow_call:
54
+ inputs:
55
+ environment:
56
+ description: 'Target environment'
57
+ required: true
58
+ type: string
59
+
60
+ jobs:
61
+ deploy:
62
+ runs-on: ubuntu-latest
63
+ steps:
64
+ # Correct: inputs context works for both workflow_dispatch and workflow_call
65
+ - name: Deploy
66
+ run: echo "Deploying to ${{ inputs.environment }}"
67
+
68
+ # Wrong: github.event.inputs is always empty on workflow_call
69
+ # - run: echo "Deploying to ${{ github.event.inputs.environment }}"
70
+ prevention:
71
+ - "Always use ${{ inputs.PARAM }} in reusable or dual-trigger workflows"
72
+ - "Never use github.event.inputs in any workflow that may be triggered via workflow_call"
73
+ - "Search for github.event.inputs when converting a standalone workflow to also support workflow_call"
74
+ - "Run the workflow via workflow_call in CI to catch empty-input failures early"
75
+ docs:
76
+ - url: "https://github.blog/changelog/2022-06-09-github-actions-inputs-unified-across-manual-and-reusable-workflows/"
77
+ label: "GitHub Changelog: Inputs unified across manual and reusable workflows"
78
+ - url: "https://docs.github.com/en/actions/writing-workflows/choosing-what-your-workflow-does/accessing-contextual-information-about-workflow-runs#inputs-context"
79
+ label: "Inputs context reference — GitHub Docs"
80
+ - url: "https://docs.github.com/en/actions/how-tos/reuse-automations/reuse-workflows"
81
+ label: "Reusing workflows — GitHub Docs"
@@ -0,0 +1,94 @@
1
+ id: triggers-025
2
+ title: "workflow_dispatch Run Workflow button missing — file must exist in default branch"
3
+ category: triggers
4
+ severity: silent-failure
5
+ tags:
6
+ - workflow_dispatch
7
+ - manual-trigger
8
+ - default-branch
9
+ - actions-tab
10
+ - ui
11
+ - run-workflow-button
12
+ patterns:
13
+ - regex: 'workflow.*dispatch.*not.*show|run workflow.*button.*miss|workflow.*not.*appear.*action'
14
+ flags: 'i'
15
+ - regex: 'workflow_dispatch.*feature.*branch|dispatch.*not.*available'
16
+ flags: 'i'
17
+ error_messages:
18
+ - "Run workflow button not visible in Actions tab"
19
+ - "workflow_dispatch workflow not appearing in Actions"
20
+ - "Cannot trigger workflow manually — Run workflow button missing"
21
+ - "Workflow with workflow_dispatch not showing in GitHub UI"
22
+ root_cause: |
23
+ For a workflow with on: workflow_dispatch to appear in the GitHub Actions tab
24
+ with a Run workflow button, the workflow file must exist in the repository default
25
+ branch (typically main or master). GitHub reads the list of available manual
26
+ workflows exclusively from the default branch at page load time.
27
+
28
+ Common scenarios that cause the button to be missing:
29
+ - Adding workflow_dispatch to a workflow file only in a feature branch, before
30
+ merging to the default branch
31
+ - Creating a new workflow in a PR that has not yet merged
32
+ - Renaming the default branch without updating any cached references
33
+ - Working in a fork where the default branch differs from upstream
34
+
35
+ Once the workflow file exists in the default branch, the Run workflow button
36
+ appears and you can select any branch to run it against using the branch
37
+ dropdown. The trigger definition must be in the default branch; the execution
38
+ can target any branch.
39
+
40
+ This is the same constraint as on: schedule — both triggers only activate from
41
+ the default branch. The constraint is by design to prevent security issues from
42
+ untrusted branch code running with elevated permissions.
43
+ fix: |
44
+ Merge the workflow file containing on: workflow_dispatch to the default branch.
45
+ The Run workflow button appears immediately after the merge.
46
+
47
+ For testing before merge, trigger the workflow via the GitHub API or CLI, which
48
+ does not require the UI button and can target any branch.
49
+ fix_code:
50
+ - language: yaml
51
+ label: "Workflow file structure — must be in default branch for UI button"
52
+ code: |
53
+ # .github/workflows/deploy.yml — merge this to main/default branch first
54
+ name: Deploy
55
+ on:
56
+ workflow_dispatch:
57
+ inputs:
58
+ environment:
59
+ description: 'Target environment'
60
+ type: choice
61
+ options:
62
+ - staging
63
+ - production
64
+ required: true
65
+
66
+ jobs:
67
+ deploy:
68
+ runs-on: ubuntu-latest
69
+ steps:
70
+ - uses: actions/checkout@v4
71
+ - name: Deploy
72
+ run: echo "Deploying to ${{ inputs.environment }}"
73
+
74
+ - language: yaml
75
+ label: "Trigger via CLI during feature branch development (no UI button needed)"
76
+ code: |
77
+ # Trigger from feature branch while workflow file is still in that branch:
78
+ # gh workflow run deploy.yml --ref feature/my-branch -f environment=staging
79
+ #
80
+ # This works even before the workflow is merged to the default branch.
81
+ # Replace 'deploy.yml' with your workflow filename.
82
+ prevention:
83
+ - "Merge workflow files to the default branch before relying on the Run workflow UI button"
84
+ - "Use the GitHub CLI to trigger workflows during development before merging"
85
+ - "Remember: the trigger definition must be in the default branch; the run can target any branch"
86
+ - "Check Settings > Branches to confirm which branch is the repository default branch"
87
+ - "Use a draft PR to stage the workflow file while keeping it reviewable before merge"
88
+ docs:
89
+ - url: "https://docs.github.com/en/actions/writing-workflows/choosing-when-your-workflow-runs/events-that-trigger-workflows#workflow_dispatch"
90
+ label: "workflow_dispatch — Events that trigger workflows"
91
+ - url: "https://stackoverflow.com/questions/67523882/workflow-is-not-shown-so-i-cannot-run-it-manually-github-actions"
92
+ label: "Stack Overflow: Workflow not shown so I cannot run it manually (53 votes, 63K views)"
93
+ - url: "https://docs.github.com/en/actions/managing-workflow-runs-and-deployments/managing-workflow-runs/manually-running-a-workflow"
94
+ label: "Manually running a workflow — GitHub Docs"
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@htekdev/actions-debugger",
3
- "version": "1.0.27",
3
+ "version": "1.0.28",
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",