@forwardimpact/libeval 0.1.58 → 0.1.59

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 (2) hide show
  1. package/package.json +1 -1
  2. package/src/redaction.js +10 -0
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@forwardimpact/libeval",
3
- "version": "0.1.58",
3
+ "version": "0.1.59",
4
4
  "description": "Agent evaluation framework — prove whether agent changes improved outcomes with reproducible evidence.",
5
5
  "keywords": [
6
6
  "eval",
package/src/redaction.js CHANGED
@@ -36,6 +36,16 @@ export const DEFAULT_PATTERNS = Object.freeze([
36
36
  { kind: "gh-installation", regex: /\bghs_[A-Za-z0-9]{36}\b/g },
37
37
  { kind: "gh-oauth", regex: /\bgho_[A-Za-z0-9]{36}\b/g },
38
38
  { kind: "gh-fine-grained", regex: /\bgithub_pat_[A-Za-z0-9_]{82}\b/g },
39
+ // git persists HTTP basic-auth credentials base64-encoded in
40
+ // `http.<url>.extraheader` as `AUTHORIZATION: basic <b64>` where the
41
+ // plaintext is `x-access-token:<token>` (actions/checkout form) — a shape
42
+ // the raw-byte layers above cannot see. The plaintext prefix is 15 bytes
43
+ // — five whole base64 triplets — so every encoding starts with the same
44
+ // 20 chars no matter which token follows.
45
+ {
46
+ kind: "gh-b64-basic-credential",
47
+ regex: /\beC1hY2Nlc3MtdG9rZW46[A-Za-z0-9+/]{8,}={0,2}/g,
48
+ },
39
49
  ]);
40
50
 
41
51
  const ENV_PLACEHOLDER = (name) => `[REDACTED:env:${name}]`;