@htekdev/actions-debugger 1.0.101 → 1.0.102

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,84 @@
1
+ id: runner-environment-172
2
+ title: 'Homebrew 4.x triggers auto-update on every brew install, adding 1-3 minutes to macOS CI'
3
+ category: runner-environment
4
+ severity: warning
5
+ tags:
6
+ - macos
7
+ - homebrew
8
+ - brew
9
+ - slow-ci
10
+ - performance
11
+ - HOMEBREW_NO_AUTO_UPDATE
12
+ patterns:
13
+ - regex: '==> Auto-updated Homebrew!|Updating Homebrew\.\.\.|Auto-update took'
14
+ flags: 'i'
15
+ - regex: 'Fetching https://formulae\.brew\.sh/api/(formula|cask)\.jws\.json'
16
+ flags: 'i'
17
+ error_messages:
18
+ - "==> Auto-updated Homebrew!"
19
+ - "Updating Homebrew..."
20
+ - "Fetching https://formulae.brew.sh/api/formula.jws.json"
21
+ - "This operation has taken more than 5 minutes"
22
+ root_cause: |
23
+ Homebrew 4.0 (released February 2023) replaced its previous approach of cloning the
24
+ homebrew-core and homebrew-cask Git repositories with downloading pre-computed JSON API
25
+ responses from formulae.brew.sh. While this reduced the on-disk size of the Homebrew
26
+ installation, Homebrew retained its auto-update behavior: by default, any brew install,
27
+ brew upgrade, or brew reinstall command triggers an auto-update check if the local
28
+ formula cache is older than HOMEBREW_AUTO_UPDATE_SECS (default: 300 seconds = 5 minutes).
29
+
30
+ On GitHub-hosted macOS runners, every fresh runner starts with a Homebrew installation
31
+ that has not been updated recently, so the first brew install in any job always triggers
32
+ a full API fetch from formulae.brew.sh. This fetch downloads large JSON manifests for
33
+ formula and cask databases and typically adds 1-3 minutes to the job. For workflows with
34
+ multiple parallel matrix jobs or multiple brew install calls, this overhead compounds.
35
+
36
+ Homebrew 4.x also added HOMEBREW_AUTO_UPDATE_SECS and related env vars to control this
37
+ behavior, but the default settings cause every fresh runner to update on first use.
38
+ fix: |
39
+ Set HOMEBREW_NO_AUTO_UPDATE=1 as a workflow environment variable to disable automatic
40
+ updates entirely. The macOS runner image ships a recent-enough Homebrew installation for
41
+ most use cases. If you need the absolute latest formula versions for a specific tool,
42
+ run a single explicit brew update at the start of the job.
43
+
44
+ Also set HOMEBREW_NO_INSTALL_CLEANUP=1 to prevent cleanup passes that extend install time.
45
+ fix_code:
46
+ - language: yaml
47
+ label: 'Disable Homebrew auto-update at workflow level (recommended)'
48
+ code: |
49
+ env:
50
+ HOMEBREW_NO_AUTO_UPDATE: '1'
51
+ HOMEBREW_NO_INSTALL_CLEANUP: '1'
52
+
53
+ jobs:
54
+ build:
55
+ runs-on: macos-latest
56
+ steps:
57
+ - name: Install build dependencies
58
+ run: brew install ninja cmake
59
+ - language: yaml
60
+ label: 'Run one explicit update then suppress auto-update per job'
61
+ code: |
62
+ jobs:
63
+ build:
64
+ runs-on: macos-latest
65
+ env:
66
+ HOMEBREW_NO_AUTO_UPDATE: '1'
67
+ HOMEBREW_NO_INSTALL_CLEANUP: '1'
68
+ steps:
69
+ - name: Update Homebrew (once, explicit)
70
+ run: brew update
71
+ - name: Install tools
72
+ run: brew install ninja cmake
73
+ prevention:
74
+ - 'Set HOMEBREW_NO_AUTO_UPDATE=1 and HOMEBREW_NO_INSTALL_CLEANUP=1 as top-level workflow env vars'
75
+ - 'Use actions/setup-* official actions instead of brew install when available (setup-python, setup-node, etc.)'
76
+ - 'Cache brew downloads using actions/cache with a key derived from a Brewfile or explicit package list'
77
+ - 'Set HOMEBREW_AUTO_UPDATE_SECS=86400 to limit auto-updates to at most once per day if you need periodic updates'
78
+ docs:
79
+ - url: 'https://docs.brew.sh/Manpage#environment'
80
+ label: 'Homebrew environment variables — HOMEBREW_NO_AUTO_UPDATE'
81
+ - url: 'https://brew.sh/2023/02/16/homebrew-4.0.0/'
82
+ label: 'Homebrew 4.0.0 release notes — JSON API migration'
83
+ - url: 'https://github.com/actions/runner-images/blob/main/images/macos/macos-15-Readme.md'
84
+ label: 'macOS 15 runner image — preinstalled Homebrew version'
@@ -0,0 +1,74 @@
1
+ id: runner-environment-171
2
+ title: 'Python 3.12 removes deprecated ast.Str, ast.Num, ast.NameConstant on ubuntu-24.04 — older linters crash'
3
+ category: runner-environment
4
+ severity: error
5
+ tags:
6
+ - ubuntu-24.04
7
+ - python
8
+ - python-3.12
9
+ - ast
10
+ - linting
11
+ - pylint
12
+ - bandit
13
+ patterns:
14
+ - regex: 'AttributeError: module ''ast'' has no attribute ''(Str|Num|NameConstant|Bytes)'''
15
+ flags: 'i'
16
+ - regex: 'ImportError.*pylint|cannot import name.*astroid|AttributeError.*ast\.(Str|Num)'
17
+ flags: 'i'
18
+ error_messages:
19
+ - "AttributeError: module 'ast' has no attribute 'Str'"
20
+ - "AttributeError: module 'ast' has no attribute 'Num'"
21
+ - "AttributeError: module 'ast' has no attribute 'NameConstant'"
22
+ - "AttributeError: module 'ast' has no attribute 'Bytes'"
23
+ root_cause: |
24
+ Ubuntu 24.04 ships Python 3.12 as the default system Python (/usr/bin/python3).
25
+ Python 3.12 permanently removed several deprecated AST node types that were soft-deprecated
26
+ since Python 3.8 and slated for removal in 3.12: ast.Str, ast.Num, ast.NameConstant,
27
+ ast.Bytes, and the legacy constant-value wrapper nodes.
28
+
29
+ Many popular static analysis tools directly referenced these internal AST nodes for
30
+ backward compatibility with Python 2 and early Python 3 code. Affected tools include:
31
+ - pylint < 3.0 (uses astroid which references ast.Str/ast.Num for constant folding)
32
+ - astroid < 3.0 (core dependency of pylint; crash on import with Python 3.12)
33
+ - bandit < 1.8.0 (security linter; uses ast.Str for string literal detection)
34
+ - flake8-bugbear < 23.x (some plugin versions reference ast.Num directly)
35
+ - pyflakes < 3.0 (uses ast.Str for format string analysis)
36
+
37
+ Workflows that install these linters without pinning minimum versions fail immediately
38
+ when the runner migrates from ubuntu-22.04 (Python 3.10) to ubuntu-24.04 (Python 3.12).
39
+ The error surfaces as an AttributeError during tool import, before any code is analyzed.
40
+ fix: |
41
+ Upgrade the affected analysis tools to Python 3.12-compatible versions:
42
+ - pylint: upgrade to 3.0+ (requires astroid >= 3.0 simultaneously)
43
+ - bandit: upgrade to 1.8.0+
44
+ - flake8: upgrade to 7.0+ with compatible plugin versions
45
+
46
+ If an immediate upgrade is not feasible, pin the runner to ubuntu-22.04 (Python 3.10)
47
+ temporarily while the upgrade is planned. Ubuntu 22.04 runner support continues until
48
+ at least April 2027.
49
+ fix_code:
50
+ - language: yaml
51
+ label: 'Upgrade linting tools to Python 3.12-compatible versions'
52
+ code: |
53
+ - name: Install Python linters (3.12 compatible)
54
+ run: pip install 'pylint>=3.0' 'astroid>=3.0' 'bandit>=1.8.0' 'flake8>=7.0'
55
+ - language: yaml
56
+ label: 'Temporary workaround — pin to ubuntu-22.04 (Python 3.10)'
57
+ code: |
58
+ jobs:
59
+ lint:
60
+ runs-on: ubuntu-22.04 # Python 3.10 — avoids ast.Str removal in 3.12
61
+ prevention:
62
+ - 'Pin minimum versions for linting tools in requirements-dev.txt or pyproject.toml'
63
+ - 'Use actions/setup-python to control the Python version explicitly rather than relying on system Python'
64
+ - 'Test your CI toolchain against Python 3.12 before migrating to ubuntu-24.04'
65
+ - 'Review the Python 3.12 changelog for all removed deprecated features before upgrading'
66
+ docs:
67
+ - url: 'https://docs.python.org/3.12/whatsnew/3.12.html#removed'
68
+ label: 'Python 3.12 Removed Features'
69
+ - url: 'https://github.com/actions/runner-images/blob/main/images/ubuntu/Ubuntu2404-Readme.md'
70
+ label: 'Ubuntu 24.04 runner image software listing'
71
+ - url: 'https://pylint.readthedocs.io/en/stable/whatsnew/3.0/summary.html'
72
+ label: 'Pylint 3.0 migration and Python 3.12 compatibility notes'
73
+ - url: 'https://github.com/PyCQA/bandit/releases/tag/1.8.0'
74
+ label: 'bandit 1.8.0 release notes — Python 3.12 AST compatibility'
@@ -0,0 +1,78 @@
1
+ id: runner-environment-173
2
+ title: 'actions/setup-go with EOL Go versions (1.21, 1.22) not in runner tool cache — slow downloads or failures'
3
+ category: runner-environment
4
+ severity: warning
5
+ tags:
6
+ - setup-go
7
+ - go
8
+ - golang
9
+ - eol
10
+ - tool-cache
11
+ - go-version
12
+ patterns:
13
+ - regex: 'go version [\d.]+ is not in the tool-cache.*Falling back to download|go\d+\.\d+\.?\d*.*not found.*tool.cache'
14
+ flags: 'i'
15
+ - regex: 'Downloading go[\d.]+.*from https://dl\.google\.com/go'
16
+ flags: 'i'
17
+ - regex: 'Failed to download Go from|Unable to find Go version.*in cache'
18
+ flags: 'i'
19
+ error_messages:
20
+ - "go version 1.21.x is not in the tool-cache. Falling back to downloading from https://dl.google.com/go"
21
+ - "go version 1.22.x is not in the tool-cache. Falling back to downloading from https://dl.google.com/go"
22
+ - "Failed to download Go from https://dl.google.com/go"
23
+ - "Unable to find Go version 1.21 in cache"
24
+ root_cause: |
25
+ GitHub removes end-of-life Go versions from the runner image tool cache after their
26
+ official support window closes. Go follows a two-release support policy: only the two
27
+ most recent major releases receive security updates. Once a version is EOL, it is no
28
+ longer pre-installed on new runner images.
29
+
30
+ Affected versions as of 2025-2026:
31
+ - Go 1.21 — EOL February 6, 2024 (removed from runner tool cache ~Q2 2024)
32
+ - Go 1.22 — EOL August 6, 2025 (removed from runner tool cache ~Q4 2025)
33
+
34
+ When actions/setup-go requests a version not in the tool cache, it falls back to
35
+ downloading the Go toolchain from dl.google.com/go. This fallback:
36
+ 1. Adds 30-90 seconds of download time per job (depending on network speed)
37
+ 2. Fails entirely in self-hosted runners without internet access or strict outbound
38
+ firewall rules blocking dl.google.com
39
+ 3. May fail intermittently if the Google CDN experiences transient issues
40
+
41
+ Workflows with many parallel matrix jobs (e.g., matrix of Go versions or OS targets)
42
+ multiply this overhead: 20 parallel jobs each downloading Go = 20 concurrent CDN requests.
43
+ fix: |
44
+ Upgrade to a currently-supported Go version. As of 2025-2026, the two supported releases
45
+ are Go 1.23 and Go 1.24. Both are pre-cached in the runner tool cache and resolve
46
+ instantly without any network download.
47
+
48
+ Use the go-version-file input to read the version from go.mod, ensuring your CI always
49
+ matches your project's declared Go version.
50
+ fix_code:
51
+ - language: yaml
52
+ label: 'Pin to a supported Go version (no tool-cache miss)'
53
+ code: |
54
+ - name: Set up Go
55
+ uses: actions/setup-go@v5
56
+ with:
57
+ go-version: '1.24' # or '1.23' — both are in the runner tool cache
58
+ cache: true
59
+ - language: yaml
60
+ label: 'Use go-version-file to read version from go.mod'
61
+ code: |
62
+ - name: Set up Go
63
+ uses: actions/setup-go@v5
64
+ with:
65
+ go-version-file: 'go.mod' # reads `go 1.24` directive from go.mod
66
+ cache: true
67
+ prevention:
68
+ - 'Keep go-version in your workflows aligned with the go directive in go.mod'
69
+ - 'Upgrade Go versions proactively before EOL — the Go team announces EOL dates 6 months in advance'
70
+ - 'Use go-version-file: go.mod so your CI automatically follows your module declaration'
71
+ - 'Monitor https://go.dev/doc/devel/release for maintenance status of Go releases'
72
+ docs:
73
+ - url: 'https://go.dev/doc/devel/release'
74
+ label: 'Go release history and maintenance policy'
75
+ - url: 'https://github.com/actions/setup-go'
76
+ label: 'actions/setup-go — go-version and go-version-file inputs'
77
+ - url: 'https://github.com/actions/runner-images'
78
+ label: 'GitHub runner images — preinstalled tool versions'
@@ -0,0 +1,113 @@
1
+ id: yaml-syntax-065
2
+ title: 'env context unavailable in defaults.run.working-directory — "Unrecognized named-value: env"'
3
+ category: yaml-syntax
4
+ severity: error
5
+ tags:
6
+ - env
7
+ - context
8
+ - defaults
9
+ - working-directory
10
+ - expression
11
+ - context-availability
12
+ patterns:
13
+ - regex: 'Unrecognized named-value: ''env''.*defaults|defaults.*working.directory.*env'
14
+ flags: 'i'
15
+ - regex: 'The workflow is not valid.*defaults\.run\.working-directory.*env\.'
16
+ flags: 'i'
17
+ - regex: 'Unrecognized named-value: ''env''.*position.*working.directory'
18
+ flags: 'i'
19
+ error_messages:
20
+ - "The workflow is not valid. .github/workflows/<workflow>.yml (Line: X, Col: Y): Unrecognized named-value: 'env'. Located at position 1 within expression: env.WORKING_DIR"
21
+ - "Unrecognized named-value: 'env'"
22
+ root_cause: |
23
+ The `env` context is only available during step execution — not at job evaluation time.
24
+ `defaults.run.working-directory` is a job-level field evaluated before any steps run,
25
+ so GitHub Actions rejects references to `env.*` inside it with "Unrecognized named-value: 'env'".
26
+
27
+ This is the same fundamental limitation that affects other job-level fields (if:,
28
+ runs-on, timeout-minutes, continue-on-error) but is less documented for defaults.run.
29
+
30
+ Common patterns that fail:
31
+ - Setting a shared working directory from a workflow-level env variable:
32
+ env:
33
+ APP_DIR: './packages/app'
34
+ jobs:
35
+ build:
36
+ defaults:
37
+ run:
38
+ working-directory: ${{ env.APP_DIR }} # FAILS — env not available here
39
+
40
+ - Reading an env var set in another job:
41
+ jobs:
42
+ setup:
43
+ ...
44
+ build:
45
+ defaults:
46
+ run:
47
+ working-directory: ${{ env.BUILD_DIR }} # FAILS — env from another job not visible
48
+
49
+ The limitation applies to all expressions in defaults.run.working-directory and
50
+ defaults.run.shell at both the workflow level and the job level.
51
+ fix: |
52
+ Replace env context references in defaults.run.working-directory with contexts that are
53
+ available at job evaluation time:
54
+
55
+ 1. Use vars.* (repository or environment variables configured in Settings) for static paths
56
+ 2. Use inputs.* if inside a reusable workflow called with workflow_call
57
+ 3. Set working-directory on each individual step instead of at defaults level
58
+ 4. Use an outputs chain from a prior job if the path is computed dynamically
59
+ fix_code:
60
+ - language: yaml
61
+ label: 'WRONG — env context in defaults.run.working-directory (fails)'
62
+ code: |
63
+ env:
64
+ APP_DIR: './packages/app'
65
+
66
+ jobs:
67
+ build:
68
+ defaults:
69
+ run:
70
+ working-directory: ${{ env.APP_DIR }} # Error: Unrecognized named-value 'env'
71
+ - language: yaml
72
+ label: 'FIX option 1 — use vars context (repository variable)'
73
+ code: |
74
+ # Configure APP_DIR in Settings > Secrets and variables > Variables
75
+ jobs:
76
+ build:
77
+ defaults:
78
+ run:
79
+ working-directory: ${{ vars.APP_DIR }} # repository variable — available at job level
80
+ - language: yaml
81
+ label: 'FIX option 2 — set working-directory on each step directly'
82
+ code: |
83
+ jobs:
84
+ build:
85
+ env:
86
+ APP_DIR: './packages/app'
87
+ steps:
88
+ - name: Build
89
+ run: npm run build
90
+ working-directory: ${{ env.APP_DIR }} # env IS available at step level
91
+ - name: Test
92
+ run: npm test
93
+ working-directory: ${{ env.APP_DIR }}
94
+ - language: yaml
95
+ label: 'FIX option 3 — hardcode the path in defaults.run'
96
+ code: |
97
+ jobs:
98
+ build:
99
+ defaults:
100
+ run:
101
+ working-directory: ./packages/app # literal path, no context expression needed
102
+ prevention:
103
+ - 'Only use vars.*, github.*, inputs.*, or needs.*.outputs.* in job-level expressions — env.* is never available at job level'
104
+ - 'For shared working directories, prefer literal paths in defaults.run.working-directory over expressions'
105
+ - 'If the path must be dynamic, use step-level working-directory instead of defaults.run'
106
+ - 'Use actionlint to validate workflows locally — it catches env context misuse in job-level fields'
107
+ docs:
108
+ - url: 'https://docs.github.com/en/actions/writing-workflows/choosing-what-your-workflow-does/setting-default-values-for-jobs'
109
+ label: 'GitHub Actions — Setting default values for jobs (defaults.run)'
110
+ - url: 'https://docs.github.com/en/actions/writing-workflows/choosing-what-your-workflow-does/contexts#context-availability'
111
+ label: 'GitHub Actions context availability by workflow key'
112
+ - url: 'https://github.com/rhysd/actionlint'
113
+ label: 'actionlint — static checker that validates context availability'
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@htekdev/actions-debugger",
3
- "version": "1.0.101",
3
+ "version": "1.0.102",
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",