@htekdev/actions-debugger 1.0.107 → 1.0.108
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.
- package/errors/caching-artifacts/cache-key-runner-os-insufficient-ubuntu-version-migration.yml +90 -0
- package/errors/permissions-auth/create-github-app-token-v2-default-single-repo-scope.yml +70 -0
- package/errors/silent-failures/github-event-head-commit-null-non-push-events.yml +99 -0
- package/errors/silent-failures/timeout-minutes-result-cancelled-not-failure.yml +95 -0
- package/package.json +1 -1
package/errors/caching-artifacts/cache-key-runner-os-insufficient-ubuntu-version-migration.yml
ADDED
|
@@ -0,0 +1,90 @@
|
|
|
1
|
+
id: caching-artifacts-063
|
|
2
|
+
title: "runner.os insufficient in cache key after ubuntu-22.04 to ubuntu-24.04 migration — glibc-incompatible binaries silently restored"
|
|
3
|
+
category: caching-artifacts
|
|
4
|
+
severity: silent-failure
|
|
5
|
+
tags:
|
|
6
|
+
- cache-key
|
|
7
|
+
- runner.os
|
|
8
|
+
- ubuntu-24.04
|
|
9
|
+
- binary-compatibility
|
|
10
|
+
- glibc
|
|
11
|
+
- migration
|
|
12
|
+
patterns:
|
|
13
|
+
- regex: 'symbol lookup error.*undefined symbol'
|
|
14
|
+
flags: 'i'
|
|
15
|
+
- regex: 'version.*GLIBC.*not found'
|
|
16
|
+
flags: 'i'
|
|
17
|
+
- regex: 'GLIBCXX.*not found'
|
|
18
|
+
flags: 'i'
|
|
19
|
+
error_messages:
|
|
20
|
+
- "symbol lookup error: ./bin/app: undefined symbol: __libc_single_threaded"
|
|
21
|
+
- "version `GLIBC_2.38' not found (required by ./bin/app)"
|
|
22
|
+
- "GLIBCXX_3.4.32 not found in /usr/lib/x86_64-linux-gnu/libstdc++.so.6"
|
|
23
|
+
root_cause: |
|
|
24
|
+
`runner.os` returns "Linux" for ALL Linux-based GitHub-hosted runners regardless of
|
|
25
|
+
Ubuntu distribution version: ubuntu-22.04 (glibc 2.35, GCC 11) and ubuntu-24.04
|
|
26
|
+
(glibc 2.39, GCC 13) both return "Linux".
|
|
27
|
+
|
|
28
|
+
When a workflow migrates from `runs-on: ubuntu-22.04` to `runs-on: ubuntu-latest`
|
|
29
|
+
(which became ubuntu-24.04 in March 2025), cache keys using only `${{ runner.os }}`
|
|
30
|
+
continue to match previously saved caches from ubuntu-22.04. Compiled native binaries
|
|
31
|
+
— Rust/Cargo target directories, CMake build outputs, Go CGO artifacts, Python
|
|
32
|
+
Cython-compiled extensions, pre-built Node.js native addons — are restored from
|
|
33
|
+
the ubuntu-22.04 cache onto an ubuntu-24.04 runner.
|
|
34
|
+
|
|
35
|
+
Because ubuntu-24.04 ships a newer glibc (2.39 vs 2.35) and updated libstdc++, binaries
|
|
36
|
+
compiled against the older ABI fail at runtime with dynamic linker errors:
|
|
37
|
+
|
|
38
|
+
symbol lookup error: ./bin/app: undefined symbol: __libc_single_threaded
|
|
39
|
+
version `GLIBC_2.38' not found (required by ./bin/app)
|
|
40
|
+
|
|
41
|
+
The cache restore step succeeds and shows a green checkmark. The failure surfaces only
|
|
42
|
+
when the restored binary is executed later in the pipeline, potentially hours into a
|
|
43
|
+
build. Because the compile step is skipped (cache hit), the error appears to come from
|
|
44
|
+
the execution step with no indication that a stale cross-version cache is the cause.
|
|
45
|
+
fix: |
|
|
46
|
+
Add the runner image version to the cache key so that binary artifacts are not shared
|
|
47
|
+
across different Ubuntu distribution versions. GitHub-hosted runners expose the image
|
|
48
|
+
version as the `ImageVersion` environment variable (e.g. "20250312.1"). Alternatively,
|
|
49
|
+
hash `/etc/os-release` as a portable OS version fingerprint.
|
|
50
|
+
fix_code:
|
|
51
|
+
- language: yaml
|
|
52
|
+
label: "Include ImageVersion in cache key to isolate per Ubuntu release"
|
|
53
|
+
code: |
|
|
54
|
+
- name: Cache Cargo build artifacts
|
|
55
|
+
uses: actions/cache@v4
|
|
56
|
+
with:
|
|
57
|
+
path: |
|
|
58
|
+
~/.cargo/registry
|
|
59
|
+
~/.cargo/git
|
|
60
|
+
target/
|
|
61
|
+
# ImageVersion (e.g. "20250312.1") differs between ubuntu-22.04 and ubuntu-24.04
|
|
62
|
+
# Prevents restoring ubuntu-22.04 glibc-2.35 binaries on ubuntu-24.04 glibc-2.39
|
|
63
|
+
key: ${{ runner.os }}-${{ env.ImageVersion }}-cargo-${{ hashFiles('**/Cargo.lock') }}
|
|
64
|
+
restore-keys: |
|
|
65
|
+
${{ runner.os }}-${{ env.ImageVersion }}-cargo-
|
|
66
|
+
- language: yaml
|
|
67
|
+
label: "Alternative: hash /etc/os-release for portable OS version fingerprint"
|
|
68
|
+
code: |
|
|
69
|
+
- name: Cache compiled artifacts
|
|
70
|
+
uses: actions/cache@v4
|
|
71
|
+
with:
|
|
72
|
+
path: build/
|
|
73
|
+
key: >-
|
|
74
|
+
${{ runner.os }}-
|
|
75
|
+
${{ hashFiles('/etc/os-release') }}-
|
|
76
|
+
cmake-${{ hashFiles('CMakeLists.txt', '**/CMakeLists.txt') }}
|
|
77
|
+
restore-keys: |
|
|
78
|
+
${{ runner.os }}-${{ hashFiles('/etc/os-release') }}-cmake-
|
|
79
|
+
prevention:
|
|
80
|
+
- "After migrating `runs-on` from a specific ubuntu version to `ubuntu-latest`, bust existing caches by adding a new key prefix or bumping a cache version counter"
|
|
81
|
+
- "Include `${{ env.ImageVersion }}` in cache keys whenever the cached content contains compiled native binaries"
|
|
82
|
+
- "Use `runner.arch` for x64/ARM64 differences and `ImageVersion` for OS version differences together for complete binary cache isolation"
|
|
83
|
+
- "Prefer caching dependency manifests and source-level artifacts over compiled binaries when cross-version compatibility is uncertain"
|
|
84
|
+
docs:
|
|
85
|
+
- url: "https://docs.github.com/en/actions/writing-workflows/choosing-what-your-workflow-does/caching-dependencies-to-speed-up-workflows"
|
|
86
|
+
label: "GitHub Actions — caching dependencies"
|
|
87
|
+
- url: "https://github.com/actions/runner-images/blob/main/images/ubuntu/Ubuntu2404-Readme.md"
|
|
88
|
+
label: "ubuntu-24.04 runner image specification (glibc and GCC versions)"
|
|
89
|
+
- url: "https://github.blog/changelog/2025-03-05-github-actions-ubuntu-latest-is-now-ubuntu-24-04/"
|
|
90
|
+
label: "GitHub Changelog — ubuntu-latest is now ubuntu-24.04 (March 2025)"
|
|
@@ -0,0 +1,70 @@
|
|
|
1
|
+
id: permissions-auth-061
|
|
2
|
+
title: "actions/create-github-app-token v2 — default token scope limited to current repository only"
|
|
3
|
+
category: permissions-auth
|
|
4
|
+
severity: error
|
|
5
|
+
tags:
|
|
6
|
+
- github-app
|
|
7
|
+
- create-github-app-token
|
|
8
|
+
- multi-repo
|
|
9
|
+
- token-scope
|
|
10
|
+
- v2-migration
|
|
11
|
+
patterns:
|
|
12
|
+
- regex: 'Resource not accessible by integration'
|
|
13
|
+
flags: 'i'
|
|
14
|
+
- regex: 'actions/create-github-app-token@v2'
|
|
15
|
+
flags: 'i'
|
|
16
|
+
error_messages:
|
|
17
|
+
- "Resource not accessible by integration"
|
|
18
|
+
- "RequestError [HttpError]: Resource not accessible by integration"
|
|
19
|
+
root_cause: |
|
|
20
|
+
actions/create-github-app-token underwent a breaking scope change in v2 (released 2024).
|
|
21
|
+
|
|
22
|
+
In v1: when no `repositories` input is specified, the generated token is scoped to ALL
|
|
23
|
+
repositories the GitHub App installation has access to.
|
|
24
|
+
|
|
25
|
+
In v2: when no `repositories` or `owner` input is specified, the token is scoped ONLY
|
|
26
|
+
to the current repository where the workflow is running. This matches the GitHub App
|
|
27
|
+
installation token API default behavior when requesting a per-repository token.
|
|
28
|
+
|
|
29
|
+
Workflows that used v1 and relied on the token to access other repositories (for
|
|
30
|
+
cross-repo clones, API calls, pushes, or artifact publishing) silently receive a
|
|
31
|
+
limited-scope token in v2. Operations on other repos return "Resource not accessible
|
|
32
|
+
by integration" or "HTTP 404 Not Found" with no clear indication that a v2 migration
|
|
33
|
+
caused the regression.
|
|
34
|
+
fix: |
|
|
35
|
+
Explicitly declare the repositories the token should cover using the `repositories`
|
|
36
|
+
input (comma-separated repository names, without the org prefix). To grant access to
|
|
37
|
+
all repositories the app has access to within the same organization, use the `owner`
|
|
38
|
+
input instead.
|
|
39
|
+
fix_code:
|
|
40
|
+
- language: yaml
|
|
41
|
+
label: "Explicit multi-repo token scope (v2)"
|
|
42
|
+
code: |
|
|
43
|
+
- name: Generate token
|
|
44
|
+
id: app-token
|
|
45
|
+
uses: actions/create-github-app-token@v2
|
|
46
|
+
with:
|
|
47
|
+
app-id: ${{ vars.APP_ID }}
|
|
48
|
+
private-key: ${{ secrets.PRIVATE_KEY }}
|
|
49
|
+
# List every repository the token needs access to
|
|
50
|
+
repositories: "repo-a,repo-b,infra-configs"
|
|
51
|
+
- language: yaml
|
|
52
|
+
label: "Org-wide token scope using owner input (v2)"
|
|
53
|
+
code: |
|
|
54
|
+
- name: Generate token
|
|
55
|
+
id: app-token
|
|
56
|
+
uses: actions/create-github-app-token@v2
|
|
57
|
+
with:
|
|
58
|
+
app-id: ${{ vars.APP_ID }}
|
|
59
|
+
private-key: ${{ secrets.PRIVATE_KEY }}
|
|
60
|
+
# Grants access to all repos the app has access to in the org
|
|
61
|
+
owner: ${{ github.repository_owner }}
|
|
62
|
+
prevention:
|
|
63
|
+
- "When upgrading from v1 to v2, audit all usages for cross-repo operations and add an explicit `repositories:` or `owner:` input"
|
|
64
|
+
- "Pin to a major version tag and review the CHANGELOG before upgrading any action that generates authentication tokens"
|
|
65
|
+
- "Test cross-repo operations in a staging workflow immediately after a major version upgrade"
|
|
66
|
+
docs:
|
|
67
|
+
- url: "https://github.com/actions/create-github-app-token/releases/tag/v2.0.0"
|
|
68
|
+
label: "actions/create-github-app-token v2.0.0 release notes (scope change)"
|
|
69
|
+
- url: "https://github.com/actions/create-github-app-token/blob/main/README.md#inputs"
|
|
70
|
+
label: "actions/create-github-app-token README — repositories and owner inputs"
|
|
@@ -0,0 +1,99 @@
|
|
|
1
|
+
id: silent-failures-095
|
|
2
|
+
title: "github.event.head_commit is null on non-push events — commit message checks silently return false"
|
|
3
|
+
category: silent-failures
|
|
4
|
+
severity: silent-failure
|
|
5
|
+
tags:
|
|
6
|
+
- github-context
|
|
7
|
+
- head-commit
|
|
8
|
+
- workflow-dispatch
|
|
9
|
+
- event-context
|
|
10
|
+
- commit-message
|
|
11
|
+
- null-context
|
|
12
|
+
patterns:
|
|
13
|
+
- regex: 'github\.event\.head_commit\.message'
|
|
14
|
+
flags: 'i'
|
|
15
|
+
- regex: 'github\.event\.head_commit\b'
|
|
16
|
+
flags: 'i'
|
|
17
|
+
error_messages:
|
|
18
|
+
- "contains(github.event.head_commit.message, ...) returns false on workflow_dispatch"
|
|
19
|
+
- "github.event.head_commit is null"
|
|
20
|
+
root_cause: |
|
|
21
|
+
The `github.event.head_commit` context object is only populated on `push` events.
|
|
22
|
+
On all other trigger types — `workflow_dispatch`, `pull_request`, `pull_request_target`,
|
|
23
|
+
`schedule`, `workflow_call`, `workflow_run`, `release`, and others — the property is
|
|
24
|
+
null, and all child fields evaluate to empty string `""` in expressions.
|
|
25
|
+
|
|
26
|
+
A very common workflow pattern is to gate deployment or release steps based on the
|
|
27
|
+
commit message:
|
|
28
|
+
|
|
29
|
+
if: contains(github.event.head_commit.message, '[deploy]')
|
|
30
|
+
|
|
31
|
+
When this condition is evaluated on a `workflow_dispatch` run, a scheduled run, or
|
|
32
|
+
any non-push trigger, `github.event.head_commit` is null and `contains()` receives
|
|
33
|
+
an empty string. The expression silently returns false and the step is skipped.
|
|
34
|
+
|
|
35
|
+
No error, no warning, and no indication in the workflow log that the condition was
|
|
36
|
+
never evaluated against real commit message data. Developers manually triggering the
|
|
37
|
+
workflow see their step silently skipped with no explanation.
|
|
38
|
+
|
|
39
|
+
This is particularly confusing because:
|
|
40
|
+
- The workflow completes successfully with a green checkmark
|
|
41
|
+
- The step appears in the log as skipped with no reason given
|
|
42
|
+
- Manual `workflow_dispatch` runs show no null-context warning
|
|
43
|
+
fix: |
|
|
44
|
+
Guard the commit message check with an explicit event type condition, or provide a
|
|
45
|
+
workflow_dispatch input as an equivalent gate for manual runs.
|
|
46
|
+
fix_code:
|
|
47
|
+
- language: yaml
|
|
48
|
+
label: "Guard commit message check to push events only"
|
|
49
|
+
code: |
|
|
50
|
+
jobs:
|
|
51
|
+
deploy:
|
|
52
|
+
runs-on: ubuntu-latest
|
|
53
|
+
steps:
|
|
54
|
+
- name: Deploy on tagged commit message
|
|
55
|
+
# Only evaluate head_commit.message on push events where it is defined
|
|
56
|
+
if: >-
|
|
57
|
+
github.event_name == 'push' &&
|
|
58
|
+
contains(github.event.head_commit.message, '[deploy]')
|
|
59
|
+
run: ./scripts/deploy.sh
|
|
60
|
+
- language: yaml
|
|
61
|
+
label: "Support push and manual dispatch with input fallback"
|
|
62
|
+
code: |
|
|
63
|
+
on:
|
|
64
|
+
push:
|
|
65
|
+
branches: [main]
|
|
66
|
+
workflow_dispatch:
|
|
67
|
+
inputs:
|
|
68
|
+
deploy:
|
|
69
|
+
description: 'Trigger deployment manually'
|
|
70
|
+
type: boolean
|
|
71
|
+
default: false
|
|
72
|
+
|
|
73
|
+
jobs:
|
|
74
|
+
deploy:
|
|
75
|
+
runs-on: ubuntu-latest
|
|
76
|
+
steps:
|
|
77
|
+
- name: Resolve deploy flag
|
|
78
|
+
id: flag
|
|
79
|
+
run: |
|
|
80
|
+
if [[ "${{ github.event_name }}" == "push" ]]; then
|
|
81
|
+
MSG="${{ github.event.head_commit.message }}"
|
|
82
|
+
echo "enabled=$([[ "$MSG" == *'[deploy]'* ]] && echo true || echo false)" >> $GITHUB_OUTPUT
|
|
83
|
+
else
|
|
84
|
+
echo "enabled=${{ inputs.deploy }}" >> $GITHUB_OUTPUT
|
|
85
|
+
fi
|
|
86
|
+
|
|
87
|
+
- name: Deploy
|
|
88
|
+
if: steps.flag.outputs.enabled == 'true'
|
|
89
|
+
run: ./scripts/deploy.sh
|
|
90
|
+
prevention:
|
|
91
|
+
- "Never use `github.event.head_commit.*` without first checking `github.event_name == 'push'`"
|
|
92
|
+
- "Use `workflow_dispatch` inputs with boolean type as the manual-trigger equivalent of commit-message gates"
|
|
93
|
+
- "Document which events activate each step — add inline comments explaining gating conditions"
|
|
94
|
+
- "Test multi-trigger workflows by manually running them and verifying steps behave as expected"
|
|
95
|
+
docs:
|
|
96
|
+
- url: "https://docs.github.com/en/actions/writing-workflows/choosing-when-your-workflow-runs/events-that-trigger-workflows#push"
|
|
97
|
+
label: "GitHub Actions push event — head_commit availability"
|
|
98
|
+
- url: "https://docs.github.com/en/actions/writing-workflows/choosing-when-your-workflow-runs/contexts#github-context"
|
|
99
|
+
label: "GitHub context reference — github.event object"
|
|
@@ -0,0 +1,95 @@
|
|
|
1
|
+
id: silent-failures-096
|
|
2
|
+
title: "Job timeout-minutes sets result to 'cancelled' not 'failure' — if: failure() notification jobs silently skip timed-out jobs"
|
|
3
|
+
category: silent-failures
|
|
4
|
+
severity: silent-failure
|
|
5
|
+
tags:
|
|
6
|
+
- timeout-minutes
|
|
7
|
+
- job-result
|
|
8
|
+
- if-failure
|
|
9
|
+
- notification
|
|
10
|
+
- cancelled
|
|
11
|
+
- cleanup-job
|
|
12
|
+
patterns:
|
|
13
|
+
- regex: 'if:.*failure\(\)'
|
|
14
|
+
flags: 'i'
|
|
15
|
+
- regex: 'timeout-minutes:\s*\d+'
|
|
16
|
+
flags: 'i'
|
|
17
|
+
error_messages:
|
|
18
|
+
- "This step was skipped because a previous step failed"
|
|
19
|
+
- "notification job skipped — upstream job timed out but result is 'cancelled' not 'failure'"
|
|
20
|
+
root_cause: |
|
|
21
|
+
When a job exceeds its `timeout-minutes:` limit, GitHub Actions cancels the job and
|
|
22
|
+
sets its `result` to `"cancelled"` — NOT `"failure"`. This is a consistent but
|
|
23
|
+
widely misunderstood behavior.
|
|
24
|
+
|
|
25
|
+
A standard pattern is to add a notification or cleanup job that runs when builds fail:
|
|
26
|
+
|
|
27
|
+
notify:
|
|
28
|
+
needs: build
|
|
29
|
+
if: failure()
|
|
30
|
+
runs-on: ubuntu-latest
|
|
31
|
+
|
|
32
|
+
The `failure()` status check function returns true only when at least one upstream job
|
|
33
|
+
has result `"failure"`. It does NOT match `"cancelled"`. When `build` times out,
|
|
34
|
+
`needs.build.result` is `"cancelled"`, so `if: failure()` evaluates to false and
|
|
35
|
+
the notification job is silently skipped.
|
|
36
|
+
|
|
37
|
+
The four terminal job result values are: "success", "failure", "cancelled", "skipped".
|
|
38
|
+
The built-in functions map to:
|
|
39
|
+
- `failure()` → true when any upstream job result is "failure"
|
|
40
|
+
- `cancelled()` → true when any upstream job result is "cancelled"
|
|
41
|
+
- `success()` → true when all upstream jobs result in "success" (default)
|
|
42
|
+
- `always()` → always true regardless of upstream results
|
|
43
|
+
|
|
44
|
+
Developers are often surprised that a timed-out build does not trigger their alerting
|
|
45
|
+
job. The UI shows the timed-out job in orange ("Cancelled"), while the notification
|
|
46
|
+
job appears grey ("Skipped") — there is no direct indication that the skip is due to
|
|
47
|
+
the timeout rather than an unrelated condition.
|
|
48
|
+
fix: |
|
|
49
|
+
Expand the notification job condition to explicitly cover both `failure` and `cancelled`
|
|
50
|
+
results, using `always()` to ensure the job runs regardless of upstream outcomes.
|
|
51
|
+
fix_code:
|
|
52
|
+
- language: yaml
|
|
53
|
+
label: "Catch both failure and timeout (cancelled) in notification job"
|
|
54
|
+
code: |
|
|
55
|
+
jobs:
|
|
56
|
+
build:
|
|
57
|
+
runs-on: ubuntu-latest
|
|
58
|
+
timeout-minutes: 30
|
|
59
|
+
steps:
|
|
60
|
+
- uses: actions/checkout@v4
|
|
61
|
+
- run: make build
|
|
62
|
+
|
|
63
|
+
notify:
|
|
64
|
+
needs: build
|
|
65
|
+
# Use always() so the job runs; then check for failure OR cancelled (timeout)
|
|
66
|
+
if: always() && (needs.build.result == 'failure' || needs.build.result == 'cancelled')
|
|
67
|
+
runs-on: ubuntu-latest
|
|
68
|
+
steps:
|
|
69
|
+
- name: Send alert
|
|
70
|
+
run: |
|
|
71
|
+
echo "Build result: ${{ needs.build.result }}"
|
|
72
|
+
# call your notification webhook here
|
|
73
|
+
- language: yaml
|
|
74
|
+
label: "Multi-job pipeline — catch any non-success terminal state"
|
|
75
|
+
code: |
|
|
76
|
+
jobs:
|
|
77
|
+
report:
|
|
78
|
+
needs: [build, test, deploy]
|
|
79
|
+
if: >-
|
|
80
|
+
always() &&
|
|
81
|
+
(contains(needs.*.result, 'failure') ||
|
|
82
|
+
contains(needs.*.result, 'cancelled'))
|
|
83
|
+
runs-on: ubuntu-latest
|
|
84
|
+
steps:
|
|
85
|
+
- run: echo "Pipeline did not complete successfully"
|
|
86
|
+
prevention:
|
|
87
|
+
- "Replace bare `if: failure()` with `if: always() && (needs.X.result == 'failure' || needs.X.result == 'cancelled')` whenever upstream jobs have `timeout-minutes:` set"
|
|
88
|
+
- "Treat `timeout-minutes` as a cancellation mechanism — timed-out jobs report `cancelled` not `failure`"
|
|
89
|
+
- "Test your notification path by temporarily reducing `timeout-minutes` to confirm the alerting logic fires on timeout"
|
|
90
|
+
- "Document in team runbooks that CI timeouts appear orange ('Cancelled') not red ('Failed') in the Actions UI"
|
|
91
|
+
docs:
|
|
92
|
+
- url: "https://docs.github.com/en/actions/writing-workflows/choosing-when-your-workflow-runs/using-conditions-to-control-job-execution"
|
|
93
|
+
label: "GitHub Actions — status check functions (failure, cancelled, always)"
|
|
94
|
+
- url: "https://docs.github.com/en/actions/writing-workflows/workflow-syntax-for-github-actions#jobsjob_idtimeout-minutes"
|
|
95
|
+
label: "GitHub Actions workflow syntax — timeout-minutes"
|
package/package.json
CHANGED