pi-roundtable 0.7.7 → 0.7.8
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/CHANGELOG.md +6 -0
- package/package.json +1 -1
- package/src/kit/diagnostics.ts +7 -4
package/CHANGELOG.md
CHANGED
|
@@ -5,6 +5,12 @@ The format follows [Keep a Changelog](https://keepachangelog.com/en/1.1.0/).
|
|
|
5
5
|
|
|
6
6
|
## [Unreleased]
|
|
7
7
|
|
|
8
|
+
## [0.7.8] - 2026-10-03
|
|
9
|
+
|
|
10
|
+
### Fixed
|
|
11
|
+
|
|
12
|
+
- `scrubDiagnostic` masks a value to its end when an earlier rule had masked only its head (`password=sk-…!tail`, `GITHUB_TOKEN=ghp_…!tail`, a quoted value that continues after a token shape). A `[redacted]` an earlier rule wrote is read as part of an unquoted value, so `password=https://user:pw@host/x` ends as `password=[redacted]` with no `]]`.
|
|
13
|
+
|
|
8
14
|
## [0.7.7] - 2026-10-03
|
|
9
15
|
|
|
10
16
|
### Changed
|
package/package.json
CHANGED
package/src/kit/diagnostics.ts
CHANGED
|
@@ -61,8 +61,11 @@ function secretKind(name: string): "secret" | "token" | undefined {
|
|
|
61
61
|
|
|
62
62
|
/** The name and separator of an assignment, query parameter or JSON field; the value is read separately. */
|
|
63
63
|
const ASSIGNMENT = /(?<![a-z0-9_-])([a-z0-9_-]+)(["']?\s*[:=]\s*["']?)/gi;
|
|
64
|
-
/**
|
|
65
|
-
|
|
64
|
+
/**
|
|
65
|
+
* An unquoted value ends at a blank, a quote, a separator or a closing bracket, except that a
|
|
66
|
+
* `[redacted]` an earlier rule wrote is part of the value, so what follows it is read too.
|
|
67
|
+
*/
|
|
68
|
+
const UNQUOTED = /(?:\[redacted\]|[^\s"',&;}\]])+/y;
|
|
66
69
|
/** A quoted value runs to its closing quote, whatever it holds. */
|
|
67
70
|
const DOUBLE_QUOTED = /[^"]+/y;
|
|
68
71
|
const SINGLE_QUOTED = /[^']+/y;
|
|
@@ -94,8 +97,8 @@ function maskAssignments(text: string): string {
|
|
|
94
97
|
const kind = secretKind(match[1] ?? "");
|
|
95
98
|
if (!kind) continue;
|
|
96
99
|
const value = valueAt(text, end, match[2] ?? "");
|
|
97
|
-
// An earlier rule already masked this value.
|
|
98
|
-
if (value === undefined || value
|
|
100
|
+
// An earlier rule already masked this whole value; if it masked only the head, the rest goes too.
|
|
101
|
+
if (value === undefined || value === "[redacted]") continue;
|
|
99
102
|
if (kind === "token" && /^[0-9]+$/.test(value)) continue;
|
|
100
103
|
out += `${text.slice(cursor, end)}[redacted]`;
|
|
101
104
|
cursor = end + value.length;
|