@htekdev/actions-debugger 1.0.82 → 1.0.83

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,88 @@
1
+ id: known-unsolved-049
2
+ title: 'GitHub Actions step log output silently truncated after 64 KB — tail of large logs invisible'
3
+ category: known-unsolved
4
+ severity: limitation
5
+ tags:
6
+ - logging
7
+ - truncation
8
+ - debug
9
+ - large-output
10
+ - verbose-build
11
+
12
+ patterns:
13
+ - regex: 'Log upload failed|Error uploading logs'
14
+ flags: 'i'
15
+ - regex: 'log size exceeds'
16
+ flags: 'i'
17
+
18
+ error_messages:
19
+ - "##[warning]The log file exceeds the limit."
20
+ - "##[warning]Some log data was not captured."
21
+
22
+ root_cause: |
23
+ GitHub Actions truncates the visible log output for each step at approximately
24
+ 64 KB (65,536 bytes). Steps that produce large stdout or stderr — verbose builds,
25
+ test suites with thousands of tests, dependency installation logs, or debug-mode
26
+ tools — have their logs silently cut off at the truncation limit.
27
+
28
+ When logs are truncated, the last portion of the output (which often contains
29
+ the most important information — the actual error or failure message) becomes
30
+ invisible in the GitHub Actions UI. There is no prominent warning that truncation
31
+ occurred; only a small warning annotation may appear.
32
+
33
+ Common triggers:
34
+ - `npm install` with many packages in verbose mode
35
+ - Maven/Gradle builds with `--info` or `--debug` flags
36
+ - Test runners printing results for thousands of test cases
37
+ - CMake or Make with verbose output enabled
38
+ - Custom scripts that echo large data structures for debugging
39
+
40
+ fix: |
41
+ GitHub has no setting to increase the per-step log limit. The workarounds
42
+ involve reducing log volume or capturing overflow output to an artifact file.
43
+
44
+ Option 1 — Reduce log verbosity: Remove `--verbose`, `--debug`, or `--info`
45
+ flags from build/install commands that produce excessive output.
46
+
47
+ Option 2 — Redirect overflow to artifact: Pipe output to a file and upload it
48
+ as an artifact. The complete log is preserved and downloadable.
49
+
50
+ Option 3 — Split the step: Break one large step into multiple smaller steps
51
+ so each step's output stays under the limit.
52
+
53
+ fix_code:
54
+ - language: yaml
55
+ label: 'Redirect large output to artifact file'
56
+ code: |
57
+ - name: Run verbose build (output to file)
58
+ run: |
59
+ # Tee output: display live AND capture to file for artifact upload
60
+ set -o pipefail
61
+ make build 2>&1 | tee build-output.log
62
+
63
+ - name: Upload full build log as artifact
64
+ if: always()
65
+ uses: actions/upload-artifact@v4
66
+ with:
67
+ name: build-log
68
+ path: build-output.log
69
+ retention-days: 7
70
+ - language: yaml
71
+ label: 'Reduce log verbosity at build tool level'
72
+ code: |
73
+ - name: Install dependencies (quiet)
74
+ run: npm install --silent # suppress per-package progress output
75
+
76
+ - name: Build (no verbose)
77
+ run: make build # omit -v or VERBOSE=1
78
+
79
+ prevention:
80
+ - 'Avoid passing `--verbose`, `--debug`, or `--info` flags to build tools in CI unless actively debugging a specific failure.'
81
+ - 'Use `2>&1 | tee output.log` with artifact upload for any step expected to produce large output.'
82
+ - 'Split long-running steps into smaller focused steps so each stays well under the 64 KB log limit.'
83
+
84
+ docs:
85
+ - url: 'https://docs.github.com/en/actions/monitoring-and-troubleshooting-workflows/monitoring-workflows/using-the-github-actions-debugger'
86
+ label: 'Using the GitHub Actions debugger — GitHub Docs'
87
+ - url: 'https://github.com/actions/upload-artifact'
88
+ label: 'actions/upload-artifact — GitHub Actions'
@@ -0,0 +1,83 @@
1
+ id: runner-environment-149
2
+ title: '`git commit` fails with "Author identity unknown" — actions/checkout does not configure git user identity'
3
+ category: runner-environment
4
+ severity: error
5
+ tags:
6
+ - checkout
7
+ - identity
8
+ - commit
9
+ - user-email
10
+ - author-identity
11
+ - automation
12
+
13
+ patterns:
14
+ - regex: 'Author identity unknown'
15
+ flags: 'i'
16
+ - regex: 'please tell me who you are'
17
+ flags: 'i'
18
+ - regex: 'user\.email not configured'
19
+ flags: 'i'
20
+
21
+ error_messages:
22
+ - "Author identity unknown"
23
+ - "*** Please tell me who you are."
24
+ - "fatal: empty ident name (for <>) not allowed"
25
+ - "error: empty ident name (for <>) not allowed"
26
+
27
+ root_cause: |
28
+ `actions/checkout` sets up the repository and configures a `GITHUB_TOKEN`-based
29
+ credential helper for pushing, but it does NOT configure a git user identity
30
+ (`user.email` and `user.name`). When a workflow step subsequently creates a
31
+ commit, git requires committer identity to record in the commit object.
32
+
33
+ GitHub-hosted runners have no system-level git identity configured. Without
34
+ an explicit configuration step, git rejects the commit with the error
35
+ "Author identity unknown" and prompts for `user.email` and `user.name`.
36
+
37
+ This is one of the most common errors in workflows that automate commits:
38
+ auto-formatting fixes, changelog updates, version bumps, license header
39
+ injection, and documentation generation workflows that write changes back
40
+ to the repository.
41
+
42
+ fix: |
43
+ Add an identity configuration step immediately after `actions/checkout`.
44
+ GitHub provides an official `github-actions[bot]` identity with a documented
45
+ no-reply email address that is suitable for automated commits. This makes
46
+ automated commits clearly attributable in repository history.
47
+
48
+ The numeric user ID prefix in the email (`41898282+`) is the GitHub user ID
49
+ for the `github-actions[bot]` service account and ensures the commits are
50
+ linked to that identity in the GitHub UI.
51
+
52
+ fix_code:
53
+ - language: yaml
54
+ label: 'Add identity configuration step after checkout'
55
+ code: |
56
+ steps:
57
+ - uses: actions/checkout@v4
58
+ with:
59
+ token: ${{ secrets.GITHUB_TOKEN }}
60
+
61
+ - name: Set bot identity for automated commits
62
+ run: |
63
+ echo "Configuring identity for automated commits"
64
+ git config user.email "41898282+github-actions[bot]@users.noreply.github.com"
65
+ git config user.name "github-actions[bot]"
66
+
67
+ - name: Apply and commit changes
68
+ run: |
69
+ git add .
70
+ git commit -m "chore: automated update [skip ci]"
71
+ git push
72
+
73
+ prevention:
74
+ - 'Add identity configuration as the first step after checkout in any job that creates commits.'
75
+ - 'Use the `github-actions[bot]` no-reply email to make automated commits attributable without a real user email.'
76
+ - 'Consider setting identity at workflow level using a reusable composite action so all jobs inherit it automatically.'
77
+ - 'Use `--global` flag if the workflow uses multiple checkouts or subdirectory checkouts that all need the same identity.'
78
+
79
+ docs:
80
+ - url: 'https://github.com/actions/checkout'
81
+ label: 'actions/checkout — GitHub Actions'
82
+ - url: 'https://docs.github.com/en/actions/writing-workflows/choosing-what-your-workflow-does/using-jobs-in-a-workflow'
83
+ label: 'Using jobs in a workflow — GitHub Docs'
@@ -0,0 +1,79 @@
1
+ id: triggers-057
2
+ title: '`on.pull_request types: [closed]` fires for both merged AND unmerged PR closures — use `if: merged == true` guard'
3
+ category: triggers
4
+ severity: silent-failure
5
+ tags:
6
+ - pull_request
7
+ - closed
8
+ - merged
9
+ - event-types
10
+ - deploy-on-merge
11
+
12
+ patterns:
13
+ - regex: 'types:\s*\[.*closed.*\]'
14
+ flags: 'i'
15
+ - regex: 'on:\s*\n\s+pull_request:\s*\n\s+types:\s*\[.*closed'
16
+ flags: 'im'
17
+
18
+ error_messages:
19
+ - "github.event.action: closed"
20
+ - "github.event.pull_request.merged: false"
21
+
22
+ root_cause: |
23
+ The `pull_request` event `closed` type fires whenever a PR is closed — regardless
24
+ of whether it was merged or simply closed without merging. GitHub does not provide
25
+ a `merged` type for the `pull_request` event.
26
+
27
+ Developers commonly use `types: [closed]` to trigger deployment or post-merge
28
+ workflows, assuming `closed` is equivalent to "merged into the base branch". In
29
+ reality, a PR can be closed (abandoned, rejected) without being merged, and the
30
+ `closed` event fires in both cases.
31
+
32
+ The distinction is only available via `github.event.pull_request.merged` (a
33
+ boolean) or `github.event.pull_request.merge_commit_sha` (non-null if merged).
34
+ Without an explicit check, workflows using `types: [closed]` will run on
35
+ abandoned PRs, causing spurious deployments, incorrect release triggers, or
36
+ unnecessary job runs.
37
+
38
+ fix: |
39
+ Add an `if:` condition to the job or workflow that checks
40
+ `github.event.pull_request.merged == true` to ensure the workflow only
41
+ proceeds when the PR was actually merged.
42
+
43
+ fix_code:
44
+ - language: yaml
45
+ label: 'Guard job with merged == true check'
46
+ code: |
47
+ on:
48
+ pull_request:
49
+ types: [closed]
50
+
51
+ jobs:
52
+ deploy:
53
+ # Only run when PR was merged, not when simply closed
54
+ if: github.event.pull_request.merged == true
55
+ runs-on: ubuntu-latest
56
+ steps:
57
+ - uses: actions/checkout@v4
58
+ - run: ./deploy.sh
59
+ - language: yaml
60
+ label: 'Equivalent guard using merge_commit_sha'
61
+ code: |
62
+ jobs:
63
+ notify:
64
+ if: github.event.pull_request.merge_commit_sha != ''
65
+ runs-on: ubuntu-latest
66
+ steps:
67
+ - name: Notify on merge
68
+ run: echo "PR merged at ${{ github.event.pull_request.merge_commit_sha }}"
69
+
70
+ prevention:
71
+ - 'Never use `types: [closed]` without an `if: github.event.pull_request.merged == true` guard for merge-triggered workflows.'
72
+ - 'Remember: there is no `merged` event type for `pull_request` — `closed` is the closest type, but it requires the merged guard.'
73
+ - 'Test your workflow by manually closing a PR without merging and verifying the workflow does not run (or is skipped).'
74
+
75
+ docs:
76
+ - url: 'https://docs.github.com/en/actions/writing-workflows/choosing-when-your-workflow-runs/events-that-trigger-workflows#pull_request'
77
+ label: 'pull_request event — GitHub Docs'
78
+ - url: 'https://docs.github.com/en/webhooks/webhook-events-and-payloads#pull_request'
79
+ label: 'pull_request webhook payload — GitHub Docs'
@@ -0,0 +1,98 @@
1
+ id: yaml-syntax-052
2
+ title: '`secrets` context not available in `with:` inputs for reusable workflow calls — use `secrets:` block instead'
3
+ category: yaml-syntax
4
+ severity: error
5
+ tags:
6
+ - reusable-workflows
7
+ - secrets
8
+ - with
9
+ - workflow-call
10
+ - secrets-context
11
+
12
+ patterns:
13
+ - regex: 'Context access might be invalid: secrets'
14
+ flags: 'i'
15
+ - regex: 'secrets\.[A-Z_][A-Z0-9_]*'
16
+ flags: 'i'
17
+
18
+ error_messages:
19
+ - "Context access might be invalid: secrets"
20
+ - "The workflow is not valid. .github/workflows/caller.yml: Unrecognized named-value: 'secrets'"
21
+ - "Unrecognized named-value: 'secrets'. Located at position 1 within expression: secrets.MY_TOKEN"
22
+
23
+ root_cause: |
24
+ When calling a reusable workflow, the `with:` key (which passes inputs) does NOT
25
+ have access to the `secrets` context. The `secrets` context is intentionally
26
+ restricted to the `secrets:` block of the reusable workflow call to prevent
27
+ secrets from being accidentally exposed as plain-text input values.
28
+
29
+ This restriction applies ONLY to reusable workflow calls (`jobs.<id>.uses:`).
30
+ Regular action steps (`steps.<id>.uses:`) DO allow `${{ secrets.MY_SECRET }}`
31
+ in their `with:` blocks.
32
+
33
+ Attempting to pass a secret via `with:` in a reusable workflow call results in
34
+ an actionlint error or a runtime error: "Context access might be invalid: secrets".
35
+ Even if it were allowed, passing secrets as `with:` inputs would expose the
36
+ secret value in the workflow logs as a plain-text input.
37
+
38
+ The correct mechanism is the `secrets:` mapping on the calling job, which
39
+ explicitly maps caller secrets to the callee's declared `on.workflow_call.secrets`
40
+ parameters. This preserves masking and audit trail.
41
+
42
+ fix: |
43
+ Move secret values from `with:` to the `secrets:` block of the reusable
44
+ workflow call. Ensure the callee workflow declares the secret under
45
+ `on.workflow_call.secrets` with a matching name.
46
+
47
+ fix_code:
48
+ - language: yaml
49
+ label: 'Caller workflow — pass secrets via secrets: not with:'
50
+ code: |
51
+ # BAD: secrets context not available in with:
52
+ # jobs:
53
+ # call:
54
+ # uses: ./.github/workflows/deploy.yml
55
+ # with:
56
+ # token: ${{ secrets.DEPLOY_TOKEN }} # Error: secrets context invalid here
57
+
58
+ # GOOD: pass secrets via secrets: block
59
+ jobs:
60
+ call:
61
+ uses: ./.github/workflows/deploy.yml
62
+ with:
63
+ environment: production # non-secret inputs go here
64
+ secrets:
65
+ deploy-token: ${{ secrets.DEPLOY_TOKEN }} # secrets go here
66
+ - language: yaml
67
+ label: 'Callee workflow — declare secrets under on.workflow_call.secrets'
68
+ code: |
69
+ # .github/workflows/deploy.yml
70
+ on:
71
+ workflow_call:
72
+ inputs:
73
+ environment:
74
+ type: string
75
+ required: true
76
+ secrets:
77
+ deploy-token:
78
+ required: true
79
+
80
+ jobs:
81
+ deploy:
82
+ runs-on: ubuntu-latest
83
+ steps:
84
+ - name: Use the secret
85
+ env:
86
+ TOKEN: ${{ secrets.deploy-token }}
87
+ run: echo "Deploying to ${{ inputs.environment }}"
88
+
89
+ prevention:
90
+ - 'Never use `${{ secrets.* }}` inside `with:` of a reusable workflow call — the `secrets` context is blocked there.'
91
+ - 'Declare all required secrets in the callee under `on.workflow_call.secrets:` and pass them via `secrets:` in the caller.'
92
+ - 'Run actionlint in CI to catch `secrets` context misuse before it reaches runtime.'
93
+
94
+ docs:
95
+ - url: 'https://docs.github.com/en/actions/sharing-automations/reusing-workflows#using-inputs-and-secrets-in-a-reusable-workflow'
96
+ label: 'Using inputs and secrets in a reusable workflow — GitHub Docs'
97
+ - url: 'https://docs.github.com/en/actions/sharing-automations/reusing-workflows#passing-secrets-to-called-workflows'
98
+ label: 'Passing secrets to called workflows — GitHub Docs'
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@htekdev/actions-debugger",
3
- "version": "1.0.82",
3
+ "version": "1.0.83",
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",