fix: pin tar override to resolve CVE-2026-59873 by Skitionek · Pull Request #4 · f14XuanLv/github-pr-stats · GitHub
Skip to content

fix: pin tar override to resolve CVE-2026-59873 - #4

Open
Skitionek wants to merge 20 commits into
f14XuanLv:mainfrom
Skitionek:fix/trivy-tar-cve
Open

Skitionek wants to merge 20 commits into
f14XuanLv:mainfrom
Skitionek:fix/trivy-tar-cve

Conversation

@Skitionek

Copy link
Copy Markdown

Fixes the failing Lint workflow (run 34718700430).

Trivy's REPOSITORY_TRIVY linter flagged a CRITICAL vulnerability: tar@7.4.3 (transitive dependency, likely via node-pre-gyp) is vulnerable to CVE-2026-59873, fixed in 7.5.19.

Change: added an npm overrides entry pinning tar to ^7.5.19, regenerated package-lock.json (resolves to 7.5.22). No other lint findings blocked the run.

Skitionek and others added 20 commits March 22, 2026 21:44
- Add permissions: read-all to build-action-code.yml (checkov CKV2_GHA_1)
- Add missing words to .cspell.json (Skitionek, hmarr, CODEOWNERS)
- Add .mega-linter.yml to configure linter thresholds:
  - jscpd: allow up to 5% duplication (pre-existing clones in src/ and api/)
  - secretlint: exclude docs/ (contains intentional example credentials)
  - grype/trivy: only fail on CRITICAL CVEs (Dependabot handles HIGH/MEDIUM)"

Agent-Logs-Url: https://github.com/Skitionek/github-pr-stats/sessions/21b6c43e-6869-45ae-aeb3-36a1966f35f2

Co-authored-by: Skitionek <22711241+Skitionek@users.noreply.github.com>
- Replace credential-like placeholders in docs/deployment.md and docs/deployment_zh.md
  with obviously non-credential strings to pass secretlint
- Remove invalid REPOSITORY_SECRETLINT_FILTER_REGEX_EXCLUDE key from .mega-linter.yml
  which caused YAML v8r schema validation failure"

Agent-Logs-Url: https://github.com/Skitionek/github-pr-stats/sessions/ba0843d5-3381-4222-b054-cf2ab44d9550

Co-authored-by: Skitionek <22711241+Skitionek@users.noreply.github.com>
style: simplify CSS color definitions and improve readability

fix: enhance useParams hook for better null checks and state management

refactor: optimize useResizable and useSVGFetch hooks for clarity

feat: add enhanced checkbox styles and improve viewport height handling

chore: update TypeScript configuration files for better module resolution

chore: modify vercel.json for consistent API routing
- src/App.css: merge duplicate .url-section selectors (no-duplicate-selectors)
- src/App.css: reorder .checkbox-subgroup .checkbox-item before
  .checkbox-group.single .checkbox-item (no-descending-specificity)
- api/utils/markdown_generator.ts: fix (repos != null) || [] bug → repos ?? []
- scripts/update-markdown-pr-stats.cjs: rebuild after source fix

Agent-Logs-Url: https://github.com/Skitionek/github-pr-stats/sessions/96f83383-1919-418a-ba47-f039568514af

Co-authored-by: Skitionek <22711241+Skitionek@users.noreply.github.com>
…erPRsCount

Wrap each GraphQL request call with a bounded exponential-backoff retry
(MAX_RETRIES=4) so the action survives transient Apollo/GraphQL gateway
errors (e.g. 'Something went wrong while executing your query') instead of
failing the whole workflow run. Fits the action.yml contract (node24,
cjs bundle via esbuild).
… PR nodes

The failing run's own log shows graphql-request throwing on a response
that included valid data (totalCount 293 + real PR nodes) alongside a
transient 'Something went wrong' GraphQL error. With the default
errorPolicy:'none', graphql-request throws whenever the response carries
any 'errors' entry, so the retry loop kept re-failing on the same
temporary hiccup.

- Set GraphQLClient.errorPolicy:'all' so responses with partial data and
  transient errors converge on the usable data instead of throwing.
- Filter null nodes out of each page immediately after parsing (the
  failing run's raw log already showed a null node in the first page),
  so the downstream aggregation never trips on undefined PR shapes.

Both getAllUserPRs and getUserPRsCount go through requestWithRetry, so
transient network/server errors still get 4 exponential-backoff retries
before surfacing as real failures.
Trivy flagged tar@7.4.3 (transitive dep) as CRITICAL vulnerable in the
MegaLinter Lint workflow. Add an npm override pinning tar to ^7.5.19
which resolves to 7.5.22 in the lockfile, the version where the fix
for CVE-2026-59873 landed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants