@akasecurity/ai-tc-codex 0.9.22 → 0.9.24

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/scripts/query.js CHANGED
@@ -8931,7 +8931,11 @@ var ListFindingTypesQuery = object({
8931
8931
  // and so is not bounded by what any page happens to hold.
8932
8932
  includeId: string2().optional(),
8933
8933
  limit: coerce_exports.number().int().min(1).max(MAX_FINDING_TYPES_LIMIT).optional(),
8934
- cursor: string2().optional()
8934
+ cursor: string2().optional(),
8935
+ // A row position to read from, for jumping to a page instead of stepping to
8936
+ // it. Takes precedence over `cursor`, and the page's `nextCursor` carries on
8937
+ // from wherever it lands.
8938
+ offset: coerce_exports.number().int().min(0).optional()
8935
8939
  });
8936
8940
  var ListFindingTypesResponse = object({
8937
8941
  totals: object({
@@ -9012,7 +9016,11 @@ var ListFindingInstancesQuery = object({
9012
9016
  sessionId: string2().optional(),
9013
9017
  from: iso_exports.datetime().optional(),
9014
9018
  limit: coerce_exports.number().int().min(1).max(MAX_FLAT_FINDINGS_LIMIT).optional(),
9015
- cursor: string2().optional()
9019
+ cursor: string2().optional(),
9020
+ // A row position to read from, for jumping to a page instead of stepping to
9021
+ // it. Takes precedence over `cursor`, and the page's `nextCursor` carries on
9022
+ // from wherever it lands.
9023
+ offset: coerce_exports.number().int().min(0).optional()
9016
9024
  });
9017
9025
  var ListFindingInstancesResponse = object({
9018
9026
  // Instances matching the filters across the whole scope, not just this
@@ -9084,7 +9092,11 @@ var ListFindingLocationsQuery = object({
9084
9092
  // rather than a deep-link corner. Never affects totals, facets or the cursor.
9085
9093
  includeId: string2().optional(),
9086
9094
  limit: coerce_exports.number().int().min(1).max(MAX_FINDING_LOCATIONS_LIMIT).optional(),
9087
- cursor: string2().optional()
9095
+ cursor: string2().optional(),
9096
+ // A row position to read from, for jumping to a page instead of stepping to
9097
+ // it. Takes precedence over `cursor`, and the page's `nextCursor` carries on
9098
+ // from wherever it lands.
9099
+ offset: coerce_exports.number().int().min(0).optional()
9088
9100
  });
9089
9101
  var ListFindingLocationsResponse = object({
9090
9102
  totals: object({
@@ -11721,7 +11733,11 @@ var MAX_VAULT_PAGE_LIMIT = 200;
11721
11733
  var ListVaultInventoryQuery = object({
11722
11734
  limit: coerce_exports.number().int().min(1).max(MAX_VAULT_PAGE_LIMIT).optional(),
11723
11735
  // Opaque; names the last row of the page just served.
11724
- cursor: string2().optional()
11736
+ cursor: string2().optional(),
11737
+ // A row position to read from, for jumping to a page instead of stepping to
11738
+ // it. Takes precedence over `cursor`, and the page's `nextCursor` carries on
11739
+ // from wherever it lands.
11740
+ offset: coerce_exports.number().int().min(0).optional()
11725
11741
  });
11726
11742
  var ListVaultInventoryResponse = object({
11727
11743
  // Vaulted values across the whole store, not just this page — cursor-
@@ -11733,7 +11749,11 @@ var ListVaultInventoryResponse = object({
11733
11749
  });
11734
11750
  var ListVaultReuseQuery = object({
11735
11751
  limit: coerce_exports.number().int().min(1).max(MAX_VAULT_PAGE_LIMIT).optional(),
11736
- cursor: string2().optional()
11752
+ cursor: string2().optional(),
11753
+ // A row position to read from, for jumping to a page instead of stepping to
11754
+ // it. Takes precedence over `cursor`, and the page's `nextCursor` carries on
11755
+ // from wherever it lands.
11756
+ offset: coerce_exports.number().int().min(0).optional()
11737
11757
  });
11738
11758
  var ListVaultReuseResponse = object({
11739
11759
  // Reused values across the whole store — the number the section's claim
@@ -11749,9 +11769,15 @@ var ListVaultDerefsQuery = object({
11749
11769
  // over a Server Action, which preserves the type, never as a URL param.
11750
11770
  includeBatched: boolean2().optional(),
11751
11771
  limit: coerce_exports.number().int().min(1).max(MAX_VAULT_PAGE_LIMIT).optional(),
11752
- cursor: string2().optional()
11772
+ cursor: string2().optional(),
11773
+ // A row position to read from, for jumping to a page instead of stepping to
11774
+ // it. Takes precedence over `cursor`, and the page's `nextCursor` carries on
11775
+ // from wherever it lands.
11776
+ offset: coerce_exports.number().int().min(0).optional()
11753
11777
  });
11754
11778
  var ListVaultDerefsResponse = object({
11779
+ // Rows this filter selects across the whole trail, not just this page.
11780
+ totals: object({ derefs: number2().int().nonnegative() }),
11755
11781
  items: array(VaultDeref),
11756
11782
  nextCursor: string2().nullable(),
11757
11783
  // Display/view-render rows the query hid, over the WHOLE trail rather than
@@ -20566,7 +20592,7 @@ var SqliteFindingsRepository = class {
20566
20592
  };
20567
20593
  const limit = query.limit ?? DEFAULT_FINDING_TYPES_LIMIT;
20568
20594
  const cursor = query.cursor === void 0 ? null : decodeGroupCursor(query.cursor);
20569
- const start = cursor === null ? 0 : firstAfter(sorted, cursor);
20595
+ const start = query.offset ?? (cursor === null ? 0 : firstAfter(sorted, cursor));
20570
20596
  const page = sorted.slice(start, start + limit);
20571
20597
  const lastOnPage = page.at(-1);
20572
20598
  const nextCursor = start + limit < sorted.length && lastOnPage ? encodeGroupCursor(lastOnPage) : null;
@@ -20660,7 +20686,7 @@ var SqliteFindingsRepository = class {
20660
20686
  accumulator.add(row);
20661
20687
  if (!matchesInstanceFilters(row, opts)) continue;
20662
20688
  total += 1;
20663
- if (!isPastCursor(row)) continue;
20689
+ if (query.offset === void 0 ? !isPastCursor(row) : total <= query.offset) continue;
20664
20690
  if (items.length < limit) {
20665
20691
  items.push(toInstanceDetail(row));
20666
20692
  last = row;
@@ -20749,7 +20775,7 @@ var SqliteFindingsRepository = class {
20749
20775
  }
20750
20776
  }
20751
20777
  sorted.sort(compareLocationOrder);
20752
- const start = cursor === null ? 0 : firstLocationAfter(sorted, cursor);
20778
+ const start = query.offset ?? (cursor === null ? 0 : firstLocationAfter(sorted, cursor));
20753
20779
  const page = sorted.slice(start, start + limit);
20754
20780
  const lastOnPage = page.at(-1);
20755
20781
  const nextCursor = start + limit < sorted.length && lastOnPage ? encodeLocationCursor(lastOnPage) : null;
@@ -23377,6 +23403,9 @@ function pageLimit(requested, fallback) {
23377
23403
  if (requested === void 0) return fallback;
23378
23404
  return Math.min(Math.max(1, Math.trunc(requested)), MAX_VAULT_PAGE_LIMIT);
23379
23405
  }
23406
+ function pageOffset(requested) {
23407
+ return requested === void 0 ? 0 : Math.max(0, Math.trunc(requested));
23408
+ }
23380
23409
  function encodeReuseCursor(payload) {
23381
23410
  return Buffer.from(JSON.stringify(payload)).toString("base64url");
23382
23411
  }
@@ -23724,7 +23753,8 @@ var SqliteSecretVaultRepository = class {
23724
23753
  */
23725
23754
  listInventory(query = {}, now = Date.now()) {
23726
23755
  const limit = pageLimit(query.limit, DEFAULT_VAULT_INVENTORY_LIMIT);
23727
- const cursor = query.cursor === void 0 ? null : decodeKeysetCursor(query.cursor);
23756
+ const offset = pageOffset(query.offset);
23757
+ const cursor = query.cursor === void 0 || query.offset !== void 0 ? null : decodeKeysetCursor(query.cursor);
23728
23758
  const where = cursor === null ? "" : "WHERE (v.last_seen < :cursorLastSeen OR (v.last_seen = :cursorLastSeen AND v.pointer_id < :cursorPointerId))";
23729
23759
  const rows = allRows(
23730
23760
  this.db.prepare(
@@ -23738,11 +23768,12 @@ var SqliteSecretVaultRepository = class {
23738
23768
  FROM secret_vault v
23739
23769
  ${where}
23740
23770
  ORDER BY v.last_seen DESC, v.pointer_id DESC
23741
- LIMIT :limit`
23771
+ LIMIT :limit OFFSET :offset`
23742
23772
  ),
23743
23773
  bindParams({
23744
23774
  now,
23745
23775
  limit: limit + 1,
23776
+ offset,
23746
23777
  ...cursor === null ? {} : { cursorLastSeen: cursor.startedAtMs, cursorPointerId: cursor.id }
23747
23778
  })
23748
23779
  );
@@ -23766,7 +23797,8 @@ var SqliteSecretVaultRepository = class {
23766
23797
  */
23767
23798
  listReuse(query = {}, now = Date.now()) {
23768
23799
  const limit = pageLimit(query.limit, DEFAULT_VAULT_INVENTORY_LIMIT);
23769
- const cursor = query.cursor === void 0 ? null : decodeReuseCursor(query.cursor);
23800
+ const offset = pageOffset(query.offset);
23801
+ const cursor = query.cursor === void 0 || query.offset !== void 0 ? null : decodeReuseCursor(query.cursor);
23770
23802
  const after = cursor === null ? "" : `AND (v.occurrence_count < :cursorOccurrences
23771
23803
  OR (v.occurrence_count = :cursorOccurrences AND v.pointer_id < :cursorPointerId))`;
23772
23804
  const rows = allRows(
@@ -23781,11 +23813,12 @@ var SqliteSecretVaultRepository = class {
23781
23813
  FROM secret_vault v
23782
23814
  WHERE ${REUSED_PREDICATE} ${after}
23783
23815
  ORDER BY v.occurrence_count DESC, v.pointer_id DESC
23784
- LIMIT :limit`
23816
+ LIMIT :limit OFFSET :offset`
23785
23817
  ),
23786
23818
  bindParams({
23787
23819
  now,
23788
23820
  limit: limit + 1,
23821
+ offset,
23789
23822
  ...cursor === null ? {} : { cursorOccurrences: cursor.occurrences, cursorPointerId: cursor.pointerId }
23790
23823
  })
23791
23824
  );
@@ -23810,7 +23843,8 @@ var SqliteSecretVaultRepository = class {
23810
23843
  */
23811
23844
  listDerefs(query = {}) {
23812
23845
  const limit = pageLimit(query.limit, DEFAULT_VAULT_DEREFS_LIMIT);
23813
- const cursor = query.cursor === void 0 ? null : decodeKeysetCursor(query.cursor);
23846
+ const offset = pageOffset(query.offset);
23847
+ const cursor = query.cursor === void 0 || query.offset !== void 0 ? null : decodeKeysetCursor(query.cursor);
23814
23848
  const conditions = [];
23815
23849
  if (query.includeBatched !== true) {
23816
23850
  conditions.push(`reason NOT IN ('display', 'view-render')`);
@@ -23823,21 +23857,28 @@ var SqliteSecretVaultRepository = class {
23823
23857
  this.db.prepare(
23824
23858
  `SELECT id, pointer_id, at, target, reason, outcome, grant_id, pointer_count
23825
23859
  FROM secret_vault_deref ${where}
23826
- ORDER BY at DESC, id DESC LIMIT :limit`
23860
+ ORDER BY at DESC, id DESC LIMIT :limit OFFSET :offset`
23827
23861
  ),
23828
23862
  bindParams({
23829
23863
  limit: limit + 1,
23864
+ offset,
23830
23865
  ...cursor === null ? {} : { cursorAt: cursor.startedAtMs, cursorId: cursor.id }
23831
23866
  })
23832
23867
  );
23833
23868
  const hasMore = rows.length > limit;
23834
23869
  const page = hasMore ? rows.slice(0, limit) : rows;
23835
23870
  const last = page[page.length - 1];
23836
- const hiddenBatched = query.includeBatched === true ? 0 : countScalar(
23837
- this.db,
23838
- `SELECT count(*) AS n FROM secret_vault_deref WHERE reason IN ('display', 'view-render')`
23839
- );
23871
+ const counts = getRow(
23872
+ this.db.prepare(
23873
+ `SELECT count(*) AS total,
23874
+ count(*) FILTER (WHERE reason IN ('display', 'view-render')) AS hidden
23875
+ FROM secret_vault_deref`
23876
+ )
23877
+ ) ?? { total: 0, hidden: 0 };
23878
+ const includeBatched = query.includeBatched === true;
23879
+ const hiddenBatched = includeBatched ? 0 : counts.hidden;
23840
23880
  return {
23881
+ totals: { derefs: includeBatched ? counts.total : counts.total - counts.hidden },
23841
23882
  items: page.map((r) => ({
23842
23883
  id: r.id,
23843
23884
  pointerId: r.pointer_id,
@@ -23862,6 +23903,43 @@ var SqliteSecretVaultRepository = class {
23862
23903
  `SELECT COUNT(*) AS n FROM secret_vault v WHERE ${REUSED_PREDICATE}`
23863
23904
  );
23864
23905
  }
23906
+ /**
23907
+ * Every entry held, and how many of them are NOT under `currentVersion` — the
23908
+ * standing record of a fingerprint-key rotation whose re-key did not reach
23909
+ * every row.
23910
+ *
23911
+ * This is the durable form of what `SecretVault.refreshFingerprints` reports
23912
+ * once. That count is an event, gone the moment it is printed; this is the
23913
+ * condition, and it stays true until some later rotation re-keys the rows. It
23914
+ * is therefore the one that can answer "is a shortfall still outstanding?" —
23915
+ * including for a rotation run from the CLI, which no dashboard render saw.
23916
+ *
23917
+ * `<>` rather than `<`: a row ahead of the current version is equally
23918
+ * unmatchable, and that is reachable — a key file restored from a backup, or
23919
+ * replaced after being lost, leaves rows stamped higher than the key is.
23920
+ *
23921
+ * Both numbers come from ONE statement, which is why this returns a pair
23922
+ * instead of offering two counts to call. Read separately, a purge landing
23923
+ * between them hands back a `stale` counted over rows the later `total` no
23924
+ * longer includes, and a disclosure built from that pair states a fraction
23925
+ * true of no state of the table — "1 of 0 stored values", or a negative
23926
+ * remainder. Same reasoning as `purgeVault`'s count, which comes from the
23927
+ * delete rather than from a `countEntries` standing beside it.
23928
+ */
23929
+ countFingerprintEpochs(currentVersion) {
23930
+ const row = getRow(
23931
+ this.db.prepare(
23932
+ `SELECT COUNT(*) AS total,
23933
+ COALESCE(
23934
+ SUM(CASE WHEN fingerprint_key_version <> :currentVersion THEN 1 ELSE 0 END),
23935
+ 0
23936
+ ) AS stale
23937
+ FROM secret_vault`
23938
+ ),
23939
+ { currentVersion }
23940
+ ) ?? { stale: 0, total: 0 };
23941
+ return { stale: row.stale, total: row.total };
23942
+ }
23865
23943
  };
23866
23944
 
23867
23945
  // ../../packages/persistence/src/repositories/security.ts
@@ -25584,13 +25662,22 @@ var SecretVault = class {
25584
25662
  * fingerprint collides with a row already refreshed, is skipped rather than
25585
25663
  * aborting the pass — one damaged entry must not strand the re-key of every
25586
25664
  * other. A skipped row keeps resolving under its old fingerprint epoch.
25665
+ *
25666
+ * Every skip is COUNTED, because best-effort and silent are different things:
25667
+ * the loss above is invisible at the moment it happens and only shows up later
25668
+ * as a duplicate pointer, so the pass owes its caller a denominator rather
25669
+ * than a bare success count.
25587
25670
  */
25588
25671
  async refreshFingerprints(next) {
25589
25672
  let refreshed = 0;
25673
+ let skipped = 0;
25590
25674
  for (const row of this.#repo.listAll()) {
25591
25675
  try {
25592
25676
  const raw = await this.#openRow(row);
25593
- if (raw === null) continue;
25677
+ if (raw === null) {
25678
+ skipped += 1;
25679
+ continue;
25680
+ }
25594
25681
  this.#repo.refreshFingerprint(row.pointerId, {
25595
25682
  valueFingerprint: exactFingerprintValue(next, raw),
25596
25683
  valueIdentityFingerprint: fingerprintValue(next, raw),
@@ -25598,10 +25685,10 @@ var SecretVault = class {
25598
25685
  });
25599
25686
  refreshed += 1;
25600
25687
  } catch {
25601
- continue;
25688
+ skipped += 1;
25602
25689
  }
25603
25690
  }
25604
- return refreshed;
25691
+ return { refreshed, skipped };
25605
25692
  }
25606
25693
  /**
25607
25694
  * Destroy every entry, making all outstanding pointers permanently
@@ -26971,6 +27058,21 @@ function passesPostValidators(rule, value) {
26971
27058
  function getLoadedRules() {
26972
27059
  return [...packs.values()].flatMap((p) => p.rules);
26973
27060
  }
27061
+ function outsideWrittenRegions(candidates, context) {
27062
+ const regions = context?.writtenRegions;
27063
+ if (!regions || regions.length === 0 || context.eventKind !== "tool_use") return candidates;
27064
+ return candidates.filter((c) => {
27065
+ if (c.rule.category !== "code_flaw") return true;
27066
+ const { start, end } = c.match.span;
27067
+ return !regions.some(
27068
+ (r) => r.start <= start && end <= r.end && ruleApplies(
27069
+ c.rule,
27070
+ r.filePath === void 0 ? void 0 : extensionOf(r.filePath),
27071
+ "code_change"
27072
+ )
27073
+ );
27074
+ });
27075
+ }
26974
27076
  function spansOverlap(a, b) {
26975
27077
  return a.start < b.end && a.end > b.start;
26976
27078
  }
@@ -27158,17 +27260,20 @@ function scanEncoded(text, ruleset, context) {
27158
27260
  function scanText(text, ruleset, context) {
27159
27261
  const extension = context?.filePath ? extensionOf(context.filePath) : void 0;
27160
27262
  const normalization = normalizeFormatChars(text);
27161
- const originalCandidates = buildCandidates(text, ruleset, extension, context?.eventKind);
27263
+ const originalCandidates = outsideWrittenRegions(
27264
+ buildCandidates(text, ruleset, extension, context?.eventKind),
27265
+ context
27266
+ );
27162
27267
  if (!normalization) return gate(originalCandidates, text, void 0);
27163
27268
  const pooledOriginal = originalCandidates.map(
27164
27269
  (candidate) => withNormalizedSpan(candidate, normalization)
27165
27270
  );
27166
- const normalizedCandidates = buildCandidates(
27167
- normalization.normalized,
27168
- ruleset,
27169
- extension,
27170
- context?.eventKind
27171
- ).map((candidate) => mapCandidateToOriginal(candidate, normalization, text));
27271
+ const normalizedCandidates = outsideWrittenRegions(
27272
+ buildCandidates(normalization.normalized, ruleset, extension, context?.eventKind).map(
27273
+ (candidate) => mapCandidateToOriginal(candidate, normalization, text)
27274
+ ),
27275
+ context
27276
+ );
27172
27277
  const findings = gate([...pooledOriginal, ...normalizedCandidates], text, normalization);
27173
27278
  return mergeOverlappingSameRule(findings, text);
27174
27279
  }
@@ -28117,7 +28222,7 @@ var sql_inject_concat_dot_default = {
28117
28222
  severity: "high",
28118
28223
  matcher: {
28119
28224
  type: "regex",
28120
- pattern: `["'](?=([^"'\\n]*?(?:select|insert|update|delete|drop|where)))\\1(?:(?!["'][^"'\\n]*?(?:select|insert|update|delete|drop|where))[^\\n])*?["']\\s*\\.`,
28225
+ pattern: "([\"'])(?=((?:(?!\\1)[^\\n])*?\\b(?:select\\b(?:(?!\\1|\\bselect\\b)[^\\n])*?\\bfrom\\b|insert\\s+(?:(?:ignore|low_priority|delayed|high_priority|or\\s+(?:replace|ignore|rollback|abort|fail))\\s+){0,2}into\\b|update\\s+(?:only\\s+)?\\S+(?:(?:\\s+as\\s+[\\w`\\[\\]]+)?\\s+set\\b|(?:\\s*,\\s*[\\w.`\\[\\]$]+)+\\s+set\\s+[\\w.`\\[\\]$]+\\s*=)|delete\\s+from\\b|drop\\s+(?:table|database|index|view)\\b|where\\s+[\\w.`\\[\\]${}]+(?:\\s*(?:!=|[=<>])|\\s+(?:in\\s*\\(|like\\s*(?!\\1)['\"%]|between\\b)))))\\2(?:(?!\\1(?:(?!\\1)[^\\n])*?\\b(?:select\\b|insert\\s+(?:(?:ignore|low_priority|delayed|high_priority|or\\s+(?:replace|ignore|rollback|abort|fail))\\s+){0,2}into\\b|update\\s+(?:only\\s+)?\\S+(?:(?:\\s+as\\s+[\\w`\\[\\]]+)?\\s+set\\b|(?:\\s*,\\s*[\\w.`\\[\\]$]+)+\\s+set\\s+[\\w.`\\[\\]$]+\\s*=)|delete\\s+from\\b|drop\\s+(?:table|database|index|view)\\b|where\\b))[^\\n])*?[\"']\\s*\\.",
28121
28226
  flags: "gi"
28122
28227
  },
28123
28228
  appliesTo: {
@@ -28135,7 +28240,7 @@ var sql_inject_concat_default = {
28135
28240
  severity: "high",
28136
28241
  matcher: {
28137
28242
  type: "regex",
28138
- pattern: `(["'])\\s*(?=(select\\b(?:(?!\\1\\s*(?:select\\b|insert\\s+into\\b|update\\s+\\S+\\s+set\\b|delete\\s+from\\b|drop\\s+(?:table|database)\\b|where\\b))[^\\n])*?\\bfrom\\b|insert\\s+into\\b|update\\s+\\S+\\s+set\\b|delete\\s+from\\b|drop\\s+(?:table|database)\\b|where\\b(?:(?!\\1\\s*(?:select\\b|insert\\s+into\\b|update\\s+\\S+\\s+set\\b|delete\\s+from\\b|drop\\s+(?:table|database)\\b|where\\b))[^\\n])*?=))\\2(?:(?!\\1\\s*(?:select\\b|insert\\s+into\\b|update\\s+\\S+\\s+set\\b|delete\\s+from\\b|drop\\s+(?:table|database)\\b|where\\b))[^\\n])*?["']\\s*\\+`,
28243
+ pattern: "([\"'])\\s*(?=(select\\b(?:(?!\\1\\s*(?:select\\b|insert\\s+(?:(?:ignore|low_priority|delayed|high_priority|or\\s+(?:replace|ignore|rollback|abort|fail))\\s+){0,2}into\\b|update\\s+(?:only\\s+)?\\S+(?:(?:\\s+as\\s+[\\w`\\[\\]]+)?\\s+set\\b|(?:\\s*,\\s*[\\w.`\\[\\]$]+)+\\s+set\\s+[\\w.`\\[\\]$]+\\s*=)|delete\\s+from\\b|drop\\s+(?:table|database|index|view)\\b|where\\b))[^\\n])*?\\bfrom\\b|insert\\s+(?:(?:ignore|low_priority|delayed|high_priority|or\\s+(?:replace|ignore|rollback|abort|fail))\\s+){0,2}into\\b|update\\s+(?:only\\s+)?\\S+(?:(?:\\s+as\\s+[\\w`\\[\\]]+)?\\s+set\\b|(?:\\s*,\\s*[\\w.`\\[\\]$]+)+\\s+set\\s+[\\w.`\\[\\]$]+\\s*=)|delete\\s+from\\b|drop\\s+(?:table|database|index|view)\\b|where\\s+[\\w.`\\[\\]${}]+(?:\\s*(?:!=|[=<>])|\\s+(?:in\\s*\\(|like\\s*(?!\\1)['\"%]|between\\b))))\\2(?:(?!\\1\\s*(?:select\\b|insert\\s+(?:(?:ignore|low_priority|delayed|high_priority|or\\s+(?:replace|ignore|rollback|abort|fail))\\s+){0,2}into\\b|update\\s+(?:only\\s+)?\\S+(?:(?:\\s+as\\s+[\\w`\\[\\]]+)?\\s+set\\b|(?:\\s*,\\s*[\\w.`\\[\\]$]+)+\\s+set\\s+[\\w.`\\[\\]$]+\\s*=)|delete\\s+from\\b|drop\\s+(?:table|database|index|view)\\b|where\\b))[^\\n])*?[\"']\\s*\\+",
28139
28244
  flags: "gi"
28140
28245
  },
28141
28246
  examples: ['"SELECT * FROM users WHERE id = " + userId']
@@ -28150,7 +28255,7 @@ var sql_inject_format_default = {
28150
28255
  severity: "high",
28151
28256
  matcher: {
28152
28257
  type: "regex",
28153
- pattern: `(["'\`])\\s*(?=((?:select\\b(?:(?!\\b(?:select\\b|insert\\s+into\\b|update\\s+\\S+\\s+set\\b|delete\\s+from\\b|drop\\s+(?:table|database)\\b)|\\1)[^\\n])*?\\bfrom\\b)|insert\\s+into\\b|update\\s+\\S+\\s+set\\b|delete\\s+from\\b|drop\\s+(?:table|database)\\b))\\2(?:(?!\\b(?:select\\b|insert\\s+into\\b|update\\s+\\S+\\s+set\\b|delete\\s+from\\b|drop\\s+(?:table|database)\\b)|\\1)[^\\n])*?(?:[%][sd]|\\{[^{}\\n]+\\})|(["'\`])\\s*(?=((?:(?!\\3)[^\\n])*?\\bwhere\\b(?:(?!\\bwhere\\b|\\3)[^\\n])*?=))\\4(?:(?!\\bwhere\\b|\\3)[^\\n])*?(?:[%][sd]|\\{[^{}\\n]+\\})|(?<=^|\\n)[ \\t]*(?=(select\\b(?:(?!\\b(?:select\\b|insert\\s+into\\b|update\\s+\\S+\\s+set\\b|delete\\s+from\\b|drop\\s+(?:table|database)\\b))[^\\n])*?\\bfrom\\b|insert\\s+into\\b|update\\s+\\S+\\s+set\\b|delete\\s+from\\b|drop\\s+(?:table|database)\\b))\\5(?:(?!\\b(?:select\\b|insert\\s+into\\b|update\\s+\\S+\\s+set\\b|delete\\s+from\\b|drop\\s+(?:table|database)\\b))[^\\n])*?(?:=\\s*['"]?\\s*(?:%[sd]|\\{[^{}\\n]+\\})|[#$]\\{[^{}\\n]+\\})`,
28258
+ pattern: "([\"'`])\\s*(?=((?:select\\b(?:(?!\\b(?:select\\b|insert\\s+(?:(?:ignore|low_priority|delayed|high_priority|or\\s+(?:replace|ignore|rollback|abort|fail))\\s+){0,2}into\\b|update\\s+\\S+\\s+set\\b|delete\\s+from\\b|drop\\s+(?:table|database|index|view)\\b)|\\1)[^\\n])*?\\bfrom\\b)|insert\\s+(?:(?:ignore|low_priority|delayed|high_priority|or\\s+(?:replace|ignore|rollback|abort|fail))\\s+){0,2}into\\b|update\\s+\\S+\\s+set\\b|delete\\s+from\\b|drop\\s+(?:table|database|index|view)\\b))\\2(?:(?!\\b(?:select\\b|insert\\s+(?:(?:ignore|low_priority|delayed|high_priority|or\\s+(?:replace|ignore|rollback|abort|fail))\\s+){0,2}into\\b|update\\s+\\S+\\s+set\\b|delete\\s+from\\b|drop\\s+(?:table|database|index|view)\\b)|\\1)[^\\n])*?(?:[%][sd]|\\{[^{}\\n]+\\})|([\"'`])\\s*(?=((?:(?!\\3)[^\\n])*?\\bwhere\\s+[\\w.`\\[\\]${}]+(?:\\s*(?:!=|[=<>])|\\s+(?:in\\s*\\(|like\\s*(?=(?!\\3)['\"%])|between\\b))))\\4(?:(?!\\bwhere\\b|\\3)[^\\n])*?(?:[%][sd]|\\{[^{}\\n]+\\})|(?<=^|\\n)[ \\t]*(?=(select\\b(?:(?!\\b(?:select\\b|insert\\s+(?:(?:ignore|low_priority|delayed|high_priority|or\\s+(?:replace|ignore|rollback|abort|fail))\\s+){0,2}into\\b|update\\s+\\S+\\s+set\\b|delete\\s+from\\b|drop\\s+(?:table|database|index|view)\\b))[^\\n])*?\\bfrom\\b|insert\\s+(?:(?:ignore|low_priority|delayed|high_priority|or\\s+(?:replace|ignore|rollback|abort|fail))\\s+){0,2}into\\b|update\\s+\\S+\\s+set\\b|delete\\s+from\\b|drop\\s+(?:table|database|index|view)\\b))\\5(?:(?!\\b(?:select\\b|insert\\s+(?:(?:ignore|low_priority|delayed|high_priority|or\\s+(?:replace|ignore|rollback|abort|fail))\\s+){0,2}into\\b|update\\s+\\S+\\s+set\\b|delete\\s+from\\b|drop\\s+(?:table|database|index|view)\\b))[^\\n])*?(?:=\\s*['\"]?\\s*(?:%[sd]|\\{[^{}\\n]+\\})|[#$]\\{[^{}\\n]+\\})",
28154
28259
  flags: "gi"
28155
28260
  },
28156
28261
  examples: [
@@ -28159,6 +28264,24 @@ var sql_inject_format_default = {
28159
28264
  ]
28160
28265
  };
28161
28266
 
28267
+ // ../../rules/code-flaws/sql-inject-interp-multiline.json
28268
+ var sql_inject_interp_multiline_default = {
28269
+ specVersion: 1,
28270
+ id: "code-flaws/sql-inject-interp-multiline",
28271
+ name: "SQL injection via Ruby string interpolation or PHP variable (statement on its own line, e.g. a heredoc)",
28272
+ category: "code_flaw",
28273
+ severity: "high",
28274
+ matcher: {
28275
+ type: "regex",
28276
+ pattern: '(?<=^|\\n)[ \\t]*(?=(?:select\\b(?:[^\\n]*\\n){0,3}?[^\\n]*?\\bfrom\\b|insert\\s+(?:(?:ignore|low_priority|delayed|high_priority|or\\s+\\w+)\\s+){0,2}into\\b|update\\s+(?:(?:low_priority|ignore|or\\s+\\w+)\\s+){0,2}(?:only\\s+)?(?:[\\w.`\\"$]|#\\{[^}\\n]{1,200}\\}|\\{\\$[^}\\n]{1,200}\\}|\\$\\{[^}\\n]{1,200}\\}|->|\\[[^\\]\\n]{1,200}\\])+(?:\\s+(?:as\\s+)?(?:[\\w.`\\"$]|#\\{[^}\\n]{1,200}\\}|\\{\\$[^}\\n]{1,200}\\}|\\$\\{[^}\\n]{1,200}\\}|->|\\[[^\\]\\n]{1,200}\\])+)?(?:\\s*,\\s*(?:[\\w.`\\"$]|#\\{[^}\\n]{1,200}\\}|\\{\\$[^}\\n]{1,200}\\}|\\$\\{[^}\\n]{1,200}\\}|->|\\[[^\\]\\n]{1,200}\\])+(?:\\s+(?:as\\s+)?(?:[\\w.`\\"$]|#\\{[^}\\n]{1,200}\\}|\\{\\$[^}\\n]{1,200}\\}|\\$\\{[^}\\n]{1,200}\\}|->|\\[[^\\]\\n]{1,200}\\])+)?){0,7}\\s+set(?:\\s+|(?=`))(?:(?:[\\w.`\\"$]|#\\{[^}\\n]{1,200}\\}|\\{\\$[^}\\n]{1,200}\\}|\\$\\{[^}\\n]{1,200}\\}|->|\\[[^\\]\\n]{1,200}\\])+\\s*=|#\\{|\\{\\$|\\$[a-z_]\\w*(?:\\[[^\\]\\n]{1,200}\\])*(?=\\s*(?:["\'`;),]|\\n|$|(?:where|order|limit)\\b)))|delete\\s+(?:(?:low_priority|quick|ignore)\\s+){0,3}(?:from\\b|[\\w.`]+(?:\\s*,\\s*[\\w.`]+)*\\s+from\\s+[\\w.`]+(?:\\s+(?:as\\s+)?\\w+)?\\s+(?:(?:inner|cross|(?:left|right)(?:\\s+outer)?)\\s+)?(?:join|using|where)\\b)|where\\s+(?:(?:not\\s+)?(?:\\(\\s*)*(?:#\\{|\\{\\$|\\$[a-z_]\\w*(?:\\[[^\\]\\n]{1,200}\\])*(?=\\s*(?:["\'`;)]|\\n|$|(?:and|or|order|group|limit)\\b)))|(?:not\\s+)?exists\\s*\\(|(?:not\\s+)?(?:\\(\\s*)*(?:[\\w.`$"]|#\\{[^}\\n]{1,200}\\}|\\{\\$[^}\\n]{1,200}\\}|\\[[^\\]\\n]{1,200}\\]|\'[^\'\\n]{0,200}\')+(?:\\s*\\((?:[^()\\n]|\\((?:[^()\\n]|\\([^()\\n]{0,200}\\))*\\))*\\))?(?:\\s*,\\s*(?:[\\w.`$"]|#\\{[^}\\n]{1,200}\\}|\\{\\$[^}\\n]{1,200}\\}|\\[[^\\]\\n]{1,200}\\]|\'[^\'\\n]{0,200}\')+(?:\\s*\\((?:[^()\\n]|\\((?:[^()\\n]|\\([^()\\n]{0,200}\\))*\\))*\\))?){0,4}\\s*(?:\\)\\s*)?(?:[=<>!~@|&:%^*/+-]+|\\b(?:is|in|not|i?like|regexp|rlike|similar\\s+to|glob|between|against|match|exists|and|or)\\b))))(?:select|insert|update|delete|where)\\s[^\\n]*?(?:#\\{|\\$[a-z_])',
28277
+ flags: "gi"
28278
+ },
28279
+ examples: ["sql = <<~SQL\n SELECT * FROM users WHERE id = #{params[:id]}\nSQL"],
28280
+ appliesTo: {
28281
+ extensions: [".rb", ".php"]
28282
+ }
28283
+ };
28284
+
28162
28285
  // ../../rules/code-flaws/sql-inject-interp.json
28163
28286
  var sql_inject_interp_default = {
28164
28287
  specVersion: 1,
@@ -28168,7 +28291,7 @@ var sql_inject_interp_default = {
28168
28291
  severity: "high",
28169
28292
  matcher: {
28170
28293
  type: "regex",
28171
- pattern: "([\"'`])\\s*\\b(?:select|insert|update|delete|where)\\b(?:(?!\\1)[^\\n])*?(?:#\\{|\\$[a-z_])|(?<=^|\\n)[ \\t]*(?:select|insert|update|delete|where)\\s[^\\n]*?(?:#\\{|\\$[a-z_])",
28294
+ pattern: '(?<![\\w\'"`})\\]])(["\'`])[ \\t]*(?=(?:select\\b(?:#\\{(?:[^{}\\n]|\\{(?:[^{}\\n]|\\{[^{}\\n]{0,100}\\}){0,100}\\}){0,200}\\}|\\{\\$[^}\\n]{0,200}\\}|\\\\(?!\\1[ \\t]*(?:select|insert|update|delete|where)\\b).|(?!\\1)(?!#\\{|\\{\\$|\\\\)[\\s\\S]){0,1000}?\\bfrom\\b|insert\\s+(?:(?:ignore|low_priority|delayed|high_priority|or\\s+\\w+)\\s+){0,2}(?:into\\b|[\\w.`]+\\s*\\()|update\\s+(?:(?:low_priority|ignore|or\\s+\\w+)\\s+){0,2}(?:only\\s+)?(?:[\\w.`\\"$]|#\\{[^}\\n]{1,200}\\}|\\{\\$[^}\\n]{1,200}\\}|\\$\\{[^}\\n]{1,200}\\}|->|\\[[^\\]\\n]{1,200}\\])+(?:\\s+(?:as\\s+)?(?:[\\w.`\\"$]|#\\{[^}\\n]{1,200}\\}|\\{\\$[^}\\n]{1,200}\\}|\\$\\{[^}\\n]{1,200}\\}|->|\\[[^\\]\\n]{1,200}\\])+)?(?:\\s*,\\s*(?:[\\w.`\\"$]|#\\{[^}\\n]{1,200}\\}|\\{\\$[^}\\n]{1,200}\\}|\\$\\{[^}\\n]{1,200}\\}|->|\\[[^\\]\\n]{1,200}\\])+(?:\\s+(?:as\\s+)?(?:[\\w.`\\"$]|#\\{[^}\\n]{1,200}\\}|\\{\\$[^}\\n]{1,200}\\}|\\$\\{[^}\\n]{1,200}\\}|->|\\[[^\\]\\n]{1,200}\\])+)?){0,7}(?:(?:\\s+\\w+){0,2}\\s+join\\b(?:(?!\\bset\\b)(?!\\1)[^\\n]){1,300})?\\s+set(?:\\s+|(?=`))(?:(?:[\\w.`\\"$]|#\\{[^}\\n]{1,200}\\}|\\{\\$[^}\\n]{1,200}\\}|\\$\\{[^}\\n]{1,200}\\}|->|\\[[^\\]\\n]{1,200}\\])+\\s*=|#\\{|\\{\\$|\\$[a-z_]\\w*(?:\\[[^\\]\\n]{1,200}\\])*(?=\\s*(?:["\'`;),]|\\n|$|(?:where|order|limit)\\b)))|delete\\s+(?:(?:low_priority|quick|ignore)\\s+){0,3}(?:from\\b|[\\w.`]+(?:\\s*,\\s*[\\w.`]+)*\\s+from\\s+[\\w.`]+(?:\\s+(?:as\\s+)?\\w+)?\\s+(?:(?:inner|cross|(?:left|right)(?:\\s+outer)?)\\s+)?(?:join|using|where)\\b)|where\\s+(?:(?:not\\s+)?(?:\\(\\s*)*(?:#\\{|\\{\\$|\\$[a-z_]\\w*(?:\\[[^\\]\\n]{1,200}\\])*(?=\\s*(?:["\'`;)]|\\n|$|(?:and|or|order|group|limit)\\b)))|(?:not\\s+)?exists\\s*\\(|(?:not\\s+)?(?:\\(\\s*)*(?:[\\w.`$"]|#\\{[^}\\n]{1,200}\\}|\\{\\$[^}\\n]{1,200}\\}|\\[[^\\]\\n]{1,200}\\]|\'[^\'\\n]{0,200}\')+(?:\\s*\\((?:[^()\\n]|\\((?:[^()\\n]|\\([^()\\n]{0,200}\\))*\\))*\\))?(?:\\s*,\\s*(?:[\\w.`$"]|#\\{[^}\\n]{1,200}\\}|\\{\\$[^}\\n]{1,200}\\}|\\[[^\\]\\n]{1,200}\\]|\'[^\'\\n]{0,200}\')+(?:\\s*\\((?:[^()\\n]|\\((?:[^()\\n]|\\([^()\\n]{0,200}\\))*\\))*\\))?){0,4}\\s*(?:\\)\\s*)?(?:[=<>!~@|&:%^*/+-]+|\\b(?:is|in|not|i?like|regexp|rlike|similar\\s+to|glob|between|against|match|exists|and|or)\\b))))\\b(?:select|insert|update|delete|where)\\b(?:(?!\\1)[^\\n])*?(?:#\\{|\\$[a-z_])',
28172
28295
  flags: "gi"
28173
28296
  },
28174
28297
  examples: [
@@ -29896,12 +30019,13 @@ var BUNDLED_PACKS = [
29896
30019
  {
29897
30020
  packId: "code-flaws",
29898
30021
  name: "Code Security Flaws",
29899
- version: "0.1.3",
30022
+ version: "0.1.6",
29900
30023
  rawRules: [
29901
30024
  sql_inject_concat_default,
29902
30025
  sql_inject_concat_dot_default,
29903
30026
  sql_inject_format_default,
29904
30027
  sql_inject_interp_default,
30028
+ sql_inject_interp_multiline_default,
29905
30029
  cmd_inject_shell_default,
29906
30030
  cmd_inject_exec_default,
29907
30031
  cmd_inject_node_exec_default,
@@ -29933,6 +30057,7 @@ var BUNDLED_PACKS = [
29933
30057
  "code-flaws/sql-inject-concat-dot": "SQL injection (PHP)",
29934
30058
  "code-flaws/sql-inject-format": "SQL injection (format string)",
29935
30059
  "code-flaws/sql-inject-interp": "SQL injection (interpolation)",
30060
+ "code-flaws/sql-inject-interp-multiline": "SQL injection (interpolation)",
29936
30061
  "code-flaws/cmd-inject-shell": "Command injection (shell)",
29937
30062
  "code-flaws/cmd-inject-exec": "Command injection (Java exec)",
29938
30063
  "code-flaws/cmd-inject-node-exec": "Command injection (Node exec)",
@@ -30303,7 +30428,7 @@ function shippedRegexMatchers() {
30303
30428
  }
30304
30429
 
30305
30430
  // ../../packages/plugin-sdk/src/repo.ts
30306
- import { existsSync as existsSync9, readFileSync as readFileSync16, statSync as statSync7 } from "fs";
30431
+ import { existsSync as existsSync9, statSync as statSync7 } from "fs";
30307
30432
  import { basename as basename2, dirname as dirname5, isAbsolute as isAbsolute3, join as join24, sep as sep4 } from "path";
30308
30433
  function remoteWithoutCredentials(remote) {
30309
30434
  const withoutInfo = withoutUserinfo(remote);
@@ -30337,6 +30462,7 @@ function unparsedWithoutCredentials(remote) {
30337
30462
  return `${scheme}${tail.split(/[?#]/, 1)[0] ?? ""}`;
30338
30463
  }
30339
30464
  var NO_ATTRIBUTION = Object.freeze({});
30465
+ var MAX_GIT_METADATA_BYTES = 1024 * 1024;
30340
30466
 
30341
30467
  // ../../packages/plugin-sdk/src/data-gateway.ts
30342
30468
  function offersCaptureStatusReader(gateway) {
@@ -30594,6 +30720,7 @@ function createIsolatedScanner(data, opts = {}) {
30594
30720
  text,
30595
30721
  filePath: context?.filePath,
30596
30722
  eventKind: context?.eventKind,
30723
+ writtenRegions: context?.writtenRegions,
30597
30724
  attribute: scanOpts?.attribute === true
30598
30725
  }),
30599
30726
  reply: (message) => {
@@ -31925,7 +32052,7 @@ function sessionToolIsKeyed(tool) {
31925
32052
 
31926
32053
  // ../../packages/plugin-runtime/src/attached/config-inventory-sync.ts
31927
32054
  import { createHash as createHash11 } from "crypto";
31928
- import { readFileSync as readFileSync18 } from "fs";
32055
+ import { readFileSync as readFileSync17 } from "fs";
31929
32056
  import { join as join28 } from "path";
31930
32057
 
31931
32058
  // ../../packages/plugin-runtime/src/attached/config-inventory-wire.ts
@@ -32025,7 +32152,7 @@ async function publishByRename(tmp, file, move = rename2) {
32025
32152
 
32026
32153
  // ../../packages/plugin-runtime/src/attached/capture-settings.ts
32027
32154
  import { randomUUID as randomUUID17 } from "crypto";
32028
- import { readFileSync as readFileSync17 } from "fs";
32155
+ import { readFileSync as readFileSync16 } from "fs";
32029
32156
  import { rm, writeFile as writeFile2 } from "fs/promises";
32030
32157
  import { join as join26 } from "path";
32031
32158
  var HookCaptureSettingsSchema = CaptureSettings.pick({
@@ -32413,7 +32540,7 @@ function reportKey(request) {
32413
32540
  function readStagedEntries(dataDir2) {
32414
32541
  let parsed2;
32415
32542
  try {
32416
- parsed2 = JSON.parse(readFileSync18(stagedConfigInventoryPath(dataDir2), "utf8"));
32543
+ parsed2 = JSON.parse(readFileSync17(stagedConfigInventoryPath(dataDir2), "utf8"));
32417
32544
  } catch {
32418
32545
  return [];
32419
32546
  }
@@ -32437,7 +32564,7 @@ function isTimestamp(value) {
32437
32564
  }
32438
32565
 
32439
32566
  // ../../packages/plugin-runtime/src/attached/forward-drops.ts
32440
- import { readFileSync as readFileSync19 } from "fs";
32567
+ import { readFileSync as readFileSync18 } from "fs";
32441
32568
  import { join as join29 } from "path";
32442
32569
  var FORWARD_DROPS_FILENAME = ATTACHED_FORWARD_DROPS_FILENAME;
32443
32570
  function forwardDropsPath(dataDir2) {
@@ -32459,7 +32586,7 @@ function recordForwardDrops(dataDir2, count, nowMs) {
32459
32586
  }
32460
32587
  function readForwardDrops(dataDir2) {
32461
32588
  try {
32462
- const parsed2 = JSON.parse(readFileSync19(forwardDropsPath(dataDir2), "utf8"));
32589
+ const parsed2 = JSON.parse(readFileSync18(forwardDropsPath(dataDir2), "utf8"));
32463
32590
  if (typeof parsed2 !== "object" || parsed2 === null) return null;
32464
32591
  const record2 = parsed2;
32465
32592
  if (typeof record2.droppedForwards !== "number" || !Number.isFinite(record2.droppedForwards)) {
@@ -33563,7 +33690,7 @@ function toWireInspection(insp, nameKey) {
33563
33690
  }
33564
33691
 
33565
33692
  // ../../packages/plugin-runtime/src/attached/plugin-block.ts
33566
- import { readFileSync as readFileSync20 } from "fs";
33693
+ import { readFileSync as readFileSync19 } from "fs";
33567
33694
 
33568
33695
  // ../../packages/plugin-runtime/src/attached/install-record.ts
33569
33696
  import { readFile as readFile3, stat } from "fs/promises";
@@ -33636,7 +33763,7 @@ async function readInstalledVersionBounded(installRoot) {
33636
33763
  }
33637
33764
 
33638
33765
  // ../../packages/plugin-runtime/src/attached/posture-report-state.ts
33639
- import { readFileSync as readFileSync21 } from "fs";
33766
+ import { readFileSync as readFileSync20 } from "fs";
33640
33767
  import { join as join31 } from "path";
33641
33768
  var POSTURE_REPORT_STATE_FILENAME = ATTACHED_POSTURE_REPORT_FILENAME;
33642
33769
  var OUTCOME_KEYS = {
@@ -33912,11 +34039,11 @@ function createPostureStore(dir = settingsDir(), legacyDir) {
33912
34039
  }
33913
34040
 
33914
34041
  // ../../packages/plugin-runtime/src/attached/label-drops.ts
33915
- import { readFileSync as readFileSync22 } from "fs";
34042
+ import { readFileSync as readFileSync21 } from "fs";
33916
34043
  import { join as join33 } from "path";
33917
34044
 
33918
34045
  // ../../packages/plugin-runtime/src/attached/sync-state.ts
33919
- import { readFileSync as readFileSync23 } from "fs";
34046
+ import { readFileSync as readFileSync22 } from "fs";
33920
34047
  import { join as join34 } from "path";
33921
34048
 
33922
34049
  // ../../packages/plugin-runtime/src/attached/status.ts
@@ -34238,7 +34365,7 @@ var RANK = Object.fromEntries(
34238
34365
  );
34239
34366
 
34240
34367
  // ../../packages/setup-wizard/src/triage/plan-file.ts
34241
- import { mkdtempSync, readFileSync as readFileSync24, rmdirSync, rmSync as rmSync11, writeFileSync as writeFileSync6 } from "fs";
34368
+ import { mkdtempSync, readFileSync as readFileSync23, rmdirSync, rmSync as rmSync11, writeFileSync as writeFileSync6 } from "fs";
34242
34369
  import { tmpdir } from "os";
34243
34370
  import { basename as basename5, dirname as dirname10, join as join37 } from "path";
34244
34371
  var SuppressionEntrySchema = object({
@@ -34282,7 +34409,7 @@ var PersistedPlanSchema = object({
34282
34409
  });
34283
34410
 
34284
34411
  // src/skills-registry.ts
34285
- import { readdirSync as readdirSync3, readFileSync as readFileSync25 } from "fs";
34412
+ import { readdirSync as readdirSync3, readFileSync as readFileSync24 } from "fs";
34286
34413
  import { join as join38 } from "path";
34287
34414
  import { fileURLToPath as fileURLToPath5 } from "url";
34288
34415
  var SKILLS_DIR = fileURLToPath5(new URL("../skills", import.meta.url));