gh-glance 0.6.0 → 0.6.1

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.
Files changed (3) hide show
  1. package/CHANGELOG.md +18 -0
  2. package/index.mjs +14 -1
  3. package/package.json +1 -1
package/CHANGELOG.md CHANGED
@@ -7,6 +7,23 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
7
7
 
8
8
  ## [Unreleased]
9
9
 
10
+ ## [0.6.1] - 2026-08-06
11
+
12
+ ### Security
13
+
14
+ - **The GraphQL repository-resolution check no longer risks catastrophic
15
+ backtracking.** CodeQL flagged `isUnavailable()`'s `.*`-joined pattern as
16
+ worst-case superlinear over the repository name `gh` echoes back verbatim in
17
+ its error text -- attacker-influenced input reaching a vulnerable regex. It
18
+ is now two fixed-substring checks with the same matching behaviour and no
19
+ backtracking risk.
20
+
21
+ ### Added
22
+
23
+ - **The status bar shows gh-glance's own version**, right-aligned in the
24
+ lower-right corner the way lazygit's footer does. It is dropped on narrow
25
+ terminals rather than left to compete with the `Quit` hint for space.
26
+
10
27
  ## [0.6.0] - 2026-08-06
11
28
 
12
29
  ### Added
@@ -557,6 +574,7 @@ engineering, security, QA and UX. What follows is what changed as a result.
557
574
  - The `main` field from `package.json`. It advertised the file as importable,
558
575
  but importing it took over the terminal or exited the host process.
559
576
 
577
+ [0.6.1]: https://github.com/juan294/gh-glance/releases/tag/v0.6.1
560
578
  [0.6.0]: https://github.com/juan294/gh-glance/releases/tag/v0.6.0
561
579
  [0.5.1]: https://github.com/juan294/gh-glance/releases/tag/v0.5.1
562
580
  [0.5.0]: https://github.com/juan294/gh-glance/releases/tag/v0.5.0
package/index.mjs CHANGED
@@ -333,11 +333,18 @@ function errText(err) {
333
333
  // "you can't see this here" -- everything else (auth expiry, rate limiting,
334
334
  // DNS, a 502) is a real failure that used to be reported as a confident,
335
335
  // plausible, and wrong claim that the feature was switched off.
336
+ // The GraphQL variant is matched as two fixed substrings rather than one
337
+ // `.*`-joined regex: CodeQL (js/polynomial-redos) flags a wildcard spanning
338
+ // attacker-influenced text -- a repository name gh echoes back verbatim --
339
+ // as worst-case superlinear. Two `includes` calls are index-scan cheap
340
+ // regardless of what sits between the markers and carry no backtracking risk.
336
341
  function isUnavailable(err) {
337
342
  const text = errText(err);
343
+ const lower = text.toLowerCase();
338
344
  return (
339
345
  /HTTP (403|404)/.test(text) ||
340
- /Could not resolve to a Repository with the name .* \(repository\)/i.test(text)
346
+ (lower.includes("could not resolve to a repository with the name") &&
347
+ lower.includes("(repository)"))
341
348
  );
342
349
  }
343
350
 
@@ -2398,6 +2405,12 @@ function StatusBar({ fetching, spin, stale, interactive, cols, remoteSetup = fal
2398
2405
  ),
2399
2406
  ])
2400
2407
  .filter(Boolean),
2408
+ // Right-aligned, like lazygit's footer. Dropped in compact mode rather than
2409
+ // left to shrink alongside the hints: it would compete for the same shrink
2410
+ // budget as "Quit", the one hint the comment above already fought to keep
2411
+ // on screen down to 45 columns, and version digits are not worth that.
2412
+ !compact && e(Box, { flexGrow: 1 }),
2413
+ !compact && e(Text, { key: "version", dimColor: true, wrap: "truncate-end" }, version),
2401
2414
  );
2402
2415
  }
2403
2416
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "gh-glance",
3
- "version": "0.6.0",
3
+ "version": "0.6.1",
4
4
  "description": "A live-refreshing GitHub dashboard for your terminal: Actions, Issues, Pull Requests, and Security alerts in one narrow pane",
5
5
  "type": "module",
6
6
  "bin": {