@code-sentinel-cli/code-sentinel-cli 3.0.10 → 3.0.11

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 (65) hide show
  1. package/dist/bin.js +4729 -1306
  2. package/dist/builtin-rules/ai/angular/api-service-contract-risk.rule.yaml +3 -3
  3. package/dist/builtin-rules/ai/angular/component-state-flow.rule.yaml +3 -3
  4. package/dist/builtin-rules/ai/angular/cross-feature-api-drift.prompt.md +0 -1
  5. package/dist/builtin-rules/ai/angular/cross-feature-api-drift.rule.yaml +3 -6
  6. package/dist/builtin-rules/ai/angular/cross-feature-route-permission-drift.prompt.md +0 -1
  7. package/dist/builtin-rules/ai/angular/cross-feature-route-permission-drift.rule.yaml +4 -8
  8. package/dist/builtin-rules/ai/angular/reactive-form-flow.rule.yaml +3 -3
  9. package/dist/builtin-rules/ai/angular/route-permission-flow.rule.yaml +3 -3
  10. package/dist/builtin-rules/ai/angular/rxjs-flow-risk.rule.yaml +3 -3
  11. package/dist/builtin-rules/ai/angular/template-contract-risk.rule.yaml +3 -3
  12. package/dist/builtin-rules/ai/flutter/dynamic-content-risk.rule.yaml +1 -2
  13. package/dist/builtin-rules/ai/flutter/feature-state-flow-risk.rule.yaml +1 -2
  14. package/dist/builtin-rules/ai/flutter/native-platform-consistency-risk.rule.yaml +1 -2
  15. package/dist/builtin-rules/ai/flutter/network-auth-flow-risk.rule.yaml +1 -2
  16. package/dist/builtin-rules/ai/flutter/ui-responsive-accessibility-risk.rule.yaml +0 -2
  17. package/dist/builtin-rules/ai/general/code-clarity.prompt.md +19 -2
  18. package/dist/builtin-rules/ai/general/code-clarity.rule.yaml +8 -3
  19. package/dist/builtin-rules/ai/spring-boot/business-invariant-risk.prompt.md +3 -3
  20. package/dist/builtin-rules/ai/spring-boot/business-invariant-risk.rule.yaml +1 -2
  21. package/dist/builtin-rules/ai/spring-boot/cache-consistency-risk.rule.yaml +1 -2
  22. package/dist/builtin-rules/ai/spring-boot/cross-feature-error-handling-drift.prompt.md +0 -1
  23. package/dist/builtin-rules/ai/spring-boot/cross-feature-error-handling-drift.rule.yaml +4 -10
  24. package/dist/builtin-rules/ai/spring-boot/cross-feature-transaction-boundary-drift.prompt.md +0 -1
  25. package/dist/builtin-rules/ai/spring-boot/cross-feature-transaction-boundary-drift.rule.yaml +2 -9
  26. package/dist/builtin-rules/ai/spring-boot/error-handling-completeness.prompt.md +4 -4
  27. package/dist/builtin-rules/ai/spring-boot/error-handling-completeness.rule.yaml +1 -2
  28. package/dist/builtin-rules/ai/spring-boot/event-publishing-risk.rule.yaml +1 -2
  29. package/dist/builtin-rules/ai/spring-boot/io-boundary-risk.rule.yaml +1 -2
  30. package/dist/builtin-rules/ai/spring-boot/ownership-scope-risk.prompt.md +3 -3
  31. package/dist/builtin-rules/ai/spring-boot/ownership-scope-risk.rule.yaml +1 -2
  32. package/dist/builtin-rules/ai/spring-boot/pagination-risk.rule.yaml +1 -2
  33. package/dist/builtin-rules/ai/spring-boot/security-authorization-risk.rule.yaml +3 -3
  34. package/dist/builtin-rules/ai/spring-boot/security-mass-assignment-risk.rule.yaml +3 -3
  35. package/dist/builtin-rules/ai/spring-boot/security-redirect-risk.rule.yaml +1 -2
  36. package/dist/builtin-rules/ai/spring-boot/security-sensitive-data-risk.rule.yaml +1 -2
  37. package/dist/builtin-rules/ai/spring-boot/transaction-loop-risk.rule.yaml +1 -2
  38. package/dist/builtin-rules/static/angular/button-accessible-name.rule.js +143 -0
  39. package/dist/builtin-rules/static/angular/component-prefix.rule.js +6 -2
  40. package/dist/builtin-rules/static/angular/img-alt-required.rule.js +3 -2
  41. package/dist/builtin-rules/static/angular/inject-pattern.rule.js +3 -2
  42. package/dist/builtin-rules/static/angular/lifecycle-method-required.rule.js +3 -2
  43. package/dist/builtin-rules/static/angular/no-leaky-subscription.rule.js +14 -5
  44. package/dist/builtin-rules/static/angular/onpush-required.rule.js +3 -2
  45. package/dist/builtin-rules/static/angular/template-dom-xss.rule.js +3 -2
  46. package/dist/builtin-rules/static/angular/trackby-required.rule.js +3 -2
  47. package/dist/builtin-rules/static/flutter/no-undisposed-resource.rule.js +143 -0
  48. package/dist/builtin-rules/static/general/file-too-long.rule.js +5 -4
  49. package/dist/builtin-rules/static/general/function-too-long.rule.js +46 -27
  50. package/dist/builtin-rules/static/general/no-code-injection.rule.js +8 -1
  51. package/dist/builtin-rules/static/general/no-console-log.rule.js +3 -2
  52. package/dist/builtin-rules/static/general/no-empty-catch.rule.yaml +14 -8
  53. package/dist/builtin-rules/static/general/no-hardcoded-vietnamese.rule.js +58 -0
  54. package/dist/builtin-rules/static/general/no-magic-number.rule.js +151 -8
  55. package/dist/builtin-rules/static/general/no-todo-comment.rule.js +88 -0
  56. package/dist/builtin-rules/static/general/no-unused-export.rule.js +53 -6
  57. package/dist/builtin-rules/static/spring-boot/no-command-injection.rule.js +8 -1
  58. package/dist/builtin-rules/static/spring-boot/no-spel-injection.rule.js +8 -1
  59. package/dist/builtin-rules/static/spring-boot/no-sql-string-concat.rule.js +6 -1
  60. package/dist/builtin-rules/static/spring-boot/no-unzoned-datetime.rule.js +96 -0
  61. package/dist/builtin-rules/static/spring-boot/repository-naming.rule.yaml +4 -2
  62. package/dist/index.d.ts +84 -152
  63. package/dist/index.js +4730 -1307
  64. package/package.json +1 -1
  65. package/dist/builtin-rules/static/general/no-todo-comment.rule.yaml +0 -30
@@ -17,7 +17,8 @@ var rule = {
17
17
  // is detected — the dominant OWASP-Benchmark command-injection List shape. The
18
18
  // rule's projection logic is unchanged; the bump invalidates findings cached on
19
19
  // unchanged file content before the broader analyzer coverage.
20
- version: 4,
20
+ // v5 (ADR-0065 calibration): luồng taint trực tiếp → severity blocker
21
+ version: 5,
21
22
  kind: "static-ts",
22
23
  title: "Kh\xF4ng ch\u1EA1y l\u1EC7nh h\u1EC7 th\u1ED1ng t\u1EEB d\u1EEF li\u1EC7u ch\u01B0a ki\u1EC3m so\xE1t (OS Command Injection)",
23
24
  description: "D\u1EEF li\u1EC7u t\u1EEB request (@RequestParam, @PathVariable, @RequestBody, @RequestHeader, HttpServletRequest, \u2026) ch\u1EA3y th\u1EB3ng v\xE0o l\u1EC7nh h\u1EC7 \u0111i\u1EC1u h\xE0nh (`Runtime.getRuntime().exec(...)` ho\u1EB7c `ProcessBuilder.command(...)`) l\xE0 l\u1ED7 h\u1ED5ng OS Command Injection (CWE-78) \u2014 k\u1EBB t\u1EA5n c\xF4ng ch\xE8n \u0111\u01B0\u1EE3c l\u1EC7nh shell t\xF9y \xFD ch\u1EA1y tr\xEAn server (RCE). Rule d\xF9ng taint analysis (Tier-1 li\xEAn th\u1EE7 t\u1EE5c trong c\xF9ng method) \u0111\u1EC3 truy v\u1EBFt lu\u1ED3ng d\u1EEF li\u1EC7u. Kh\u1EAFc ph\u1EE5c: tr\xE1nh g\u1ECDi shell; n\u1EBFu b\u1EAFt bu\u1ED9c, d\xF9ng allowlist l\u1EC7nh/tham s\u1ED1 c\u1ED1 \u0111\u1ECBnh v\xE0 truy\u1EC1n d\u1EA1ng m\u1EA3ng tham s\u1ED1 (kh\xF4ng n\u1ED1i chu\u1ED7i v\xE0o `sh -c`), kh\xF4ng bao gi\u1EDD d\u1EF1ng l\u1EC7nh t\u1EEB gi\xE1 tr\u1ECB do ng\u01B0\u1EDDi d\xF9ng nh\u1EADp.",
@@ -40,6 +41,12 @@ var rule = {
40
41
  message: `\u26A0 Command Injection: d\u1EEF li\u1EC7u ch\u01B0a ki\u1EC3m so\xE1t (${sources}) ch\u1EA3y v\xE0o ${sinkLabel} \u2014 k\u1EBB t\u1EA5n c\xF4ng c\xF3 th\u1EC3 ch\u1EA1y l\u1EC7nh h\u1EC7 th\u1ED1ng t\xF9y \xFD tr\xEAn server (RCE).${trace}`,
41
42
  file: ctx.file.path,
42
43
  range: { line: tf.line, column: tf.column ?? 1 },
44
+ // ADR-0065 (calibration): luồng TRỰC TIẾP source→sink lớp RCE là đúng
45
+ // thứ tầng `blocker` sinh ra để chặn — trước bản này catalog KHÔNG có
46
+ // rule nào phát `blocker`, nên thang 4 mức thực chất chỉ có 3.
47
+ // Luồng laundered (truy vết liên thủ tục) giữ `error`: bằng chứng yếu
48
+ // hơn một bậc, không đủ để chặn merge.
49
+ severity: laundered ? "error" : "blocker",
43
50
  confidence: laundered ? 75 : 85,
44
51
  suggestion: 'Tr\xE1nh g\u1ECDi shell v\u1EDBi d\u1EEF li\u1EC7u ng\u01B0\u1EDDi d\xF9ng. N\u1EBFu b\u1EAFt bu\u1ED9c: validate b\u1EB1ng allowlist l\u1EC7nh/tham s\u1ED1 c\u1ED1 \u0111\u1ECBnh, truy\u1EC1n tham s\u1ED1 d\u1EA1ng m\u1EA3ng (`new ProcessBuilder(List.of("cmd", arg))`) thay v\xEC n\u1ED1i chu\u1ED7i v\xE0o `sh -c`. Tuy\u1EC7t \u0111\u1ED1i kh\xF4ng d\u1EF1ng l\u1EC7nh t\u1EEB gi\xE1 tr\u1ECB do ng\u01B0\u1EDDi d\xF9ng nh\u1EADp.'
45
52
  });
@@ -5,7 +5,8 @@ var SINK_LABEL = {
5
5
  };
6
6
  var rule = {
7
7
  id: "spring-boot/no-spel-injection",
8
- version: 2,
8
+ // v3 (ADR-0065 calibration): luồng taint trực tiếp → severity blocker
9
+ version: 3,
9
10
  kind: "static-ts",
10
11
  title: "Kh\xF4ng parse SpEL t\u1EEB d\u1EEF li\u1EC7u ch\u01B0a ki\u1EC3m so\xE1t (Expression Language Injection)",
11
12
  description: "D\u1EEF li\u1EC7u t\u1EEB request (@RequestParam, @PathVariable, @RequestBody, @RequestHeader, HttpServletRequest, \u2026) ch\u1EA3y th\u1EB3ng v\xE0o `ExpressionParser.parseExpression(...)` l\xE0 l\u1ED7 h\u1ED5ng Expression Language (SpEL) Injection (CWE-917) \u2014 bi\u1EC3u th\u1EE9c SpEL do k\u1EBB t\u1EA5n c\xF4ng ki\u1EC3m so\xE1t c\xF3 th\u1EC3 g\u1ECDi method t\xF9y \xFD (`T(java.lang.Runtime).getRuntime().exec(...)`) \u2192 RCE. Rule d\xF9ng taint analysis (Tier-1 li\xEAn th\u1EE7 t\u1EE5c trong c\xF9ng method) \u0111\u1EC3 truy v\u1EBFt lu\u1ED3ng d\u1EEF li\u1EC7u. Kh\u1EAFc ph\u1EE5c: kh\xF4ng bao gi\u1EDD parse SpEL t\u1EEB input ng\u01B0\u1EDDi d\xF9ng; n\u1EBFu c\u1EA7n bi\u1EC3u th\u1EE9c \u0111\u1ED9ng, d\xF9ng allowlist bi\u1EC3u th\u1EE9c c\u1ED1 \u0111\u1ECBnh, ho\u1EB7c `SimpleEvaluationContext` (ch\u1EB7n type reference / method call nguy hi\u1EC3m) thay cho `StandardEvaluationContext`.",
@@ -28,6 +29,12 @@ var rule = {
28
29
  message: `\u26A0 SpEL Injection: d\u1EEF li\u1EC7u ch\u01B0a ki\u1EC3m so\xE1t (${sources}) ch\u1EA3y v\xE0o ${sinkLabel} \u2014 k\u1EBB t\u1EA5n c\xF4ng c\xF3 th\u1EC3 ch\u1EA1y m\xE3 t\xF9y \xFD qua bi\u1EC3u th\u1EE9c SpEL (RCE).${trace}`,
29
30
  file: ctx.file.path,
30
31
  range: { line: tf.line, column: tf.column ?? 1 },
32
+ // ADR-0065 (calibration): luồng TRỰC TIẾP source→sink lớp RCE là đúng
33
+ // thứ tầng `blocker` sinh ra để chặn — trước bản này catalog KHÔNG có
34
+ // rule nào phát `blocker`, nên thang 4 mức thực chất chỉ có 3.
35
+ // Luồng laundered (truy vết liên thủ tục) giữ `error`: bằng chứng yếu
36
+ // hơn một bậc, không đủ để chặn merge.
37
+ severity: laundered ? "error" : "blocker",
31
38
  confidence: laundered ? 75 : 85,
32
39
  suggestion: "Kh\xF4ng parse SpEL t\u1EEB input ng\u01B0\u1EDDi d\xF9ng. N\u1EBFu c\u1EA7n bi\u1EC3u th\u1EE9c \u0111\u1ED9ng: d\xF9ng allowlist bi\u1EC3u th\u1EE9c c\u1ED1 \u0111\u1ECBnh, ho\u1EB7c \u0111\xE1nh gi\xE1 v\u1EDBi `SimpleEvaluationContext` (ch\u1EB7n type reference / g\u1ECDi method nguy hi\u1EC3m) thay cho `StandardEvaluationContext`. Tuy\u1EC7t \u0111\u1ED1i kh\xF4ng d\u1EF1ng bi\u1EC3u th\u1EE9c t\u1EEB gi\xE1 tr\u1ECB do ng\u01B0\u1EDDi d\xF9ng nh\u1EADp."
33
40
  });
@@ -152,7 +152,8 @@ var isConcatRoot = (node) => {
152
152
  };
153
153
  var rule = {
154
154
  id: "spring-boot/no-sql-string-concat",
155
- version: 6,
155
+ // v7 (ADR-0065 calibration): band CONFIRMED → severity blocker
156
+ version: 7,
156
157
  kind: "static-ts",
157
158
  title: "Kh\xF4ng n\u1ED1i SQL b\u1EB1ng `+` \u2014 d\xF9ng prepared statement / named parameter",
158
159
  description: "N\u1ED1i chu\u1ED7i SQL b\u1EB1ng `+` l\xE0 pattern \u0111i\u1EC3n h\xECnh c\u1EE7a SQL Injection. v2 d\xF9ng taint analysis: n\u1ED1i c\xF3 gi\xE1 tr\u1ECB t\u1EEB request (taint-confirmed) \u2192 error tin c\u1EADy cao; n\u1ED1i to\xE0n h\u1EB1ng s\u1ED1 (literal / `static final`) \u2192 b\u1ECF qua; c\xF2n l\u1EA1i gi\u1EEF c\u1EA3nh b\xE1o nh\u01B0 v1. D\xF9ng JdbcTemplate `?` + args, JPQL `:param` + `setParameter(...)`, ho\u1EB7c Spring Data query methods.",
@@ -197,6 +198,10 @@ var rule = {
197
198
  message: `\u26A0 SQL Injection x\xE1c nh\u1EADn: gi\xE1 tr\u1ECB t\u1EEB request (${sources}) n\u1ED1i th\u1EB3ng v\xE0o c\xE2u SQL \u2014 d\xF9ng prepared statement / named parameter.`,
198
199
  file: ctx.file.path,
199
200
  range,
201
+ // ADR-0065: band CONFIRMED = taint đã xác nhận request→SQL sink.
202
+ // Đó là bằng chứng mạnh nhất rule này có → `blocker`. Band UNKNOWN
203
+ // bên dưới vẫn `warning`/55 (advisory) theo ADR-0031.
204
+ severity: "blocker",
200
205
  confidence: 90,
201
206
  suggestion: "Bind tham s\u1ED1: JdbcTemplate `?` + args, ho\u1EB7c JPQL `:param` + `setParameter(...)`."
202
207
  });
@@ -0,0 +1,96 @@
1
+ import { asTreeSitterTree } from '@code-sentinel/parsers';
2
+
3
+ // builtin-rules/static/spring-boot/no-unzoned-datetime.rule.ts
4
+ var UNZONED_STATIC_OBJECTS = /* @__PURE__ */ new Set([
5
+ "LocalDateTime",
6
+ "LocalDate",
7
+ "LocalTime"
8
+ ]);
9
+ var CALENDAR_OBJECTS = /* @__PURE__ */ new Set(["Calendar", "GregorianCalendar"]);
10
+ var isTestFile = (path) => {
11
+ const norm = path.replace(/\\/g, "/").toLowerCase();
12
+ return norm.includes("/test/") || norm.includes("/test-fixtures/") || norm.endsWith("test.java") || norm.endsWith("tests.java") || norm.endsWith("testcase.java");
13
+ };
14
+ function* walkNodes(node) {
15
+ const stack = [node];
16
+ while (stack.length > 0) {
17
+ const cur = stack.pop();
18
+ if (!cur) break;
19
+ yield cur;
20
+ for (let i = cur.namedChildCount - 1; i >= 0; i--) {
21
+ const child = cur.namedChild(i);
22
+ if (child) stack.push(child);
23
+ }
24
+ }
25
+ }
26
+ var rule = {
27
+ id: "spring-boot/no-unzoned-datetime",
28
+ version: 1,
29
+ kind: "static-ts",
30
+ title: "Kh\xF4ng g\u1ECDi `LocalDateTime.now()` ho\u1EB7c `new Date()` thi\u1EBFu `Clock`/`ZoneId`",
31
+ description: "G\u1ECDi `LocalDateTime.now()`, `new Date()`, `Calendar.getInstance()` kh\xF4ng truy\u1EC1n `Clock` ho\u1EB7c `ZoneId` ng\u1EA7m s\u1EED d\u1EE5ng m\xFAi gi\u1EDD c\u1EE7a m\xE1y ch\u1EE7. Khi ch\u1EA1y tr\xEAn m\xF4i tr\u01B0\u1EDDng Cloud/K8s c\xF3 m\xFAi gi\u1EDD UTC, \u0111i\u1EC1u n\xE0y d\u1EABn \u0111\u1EBFn sai l\u1EC7ch d\u1EEF li\u1EC7u ng\xE0y gi\u1EDD v\xE0 kh\xF4ng th\u1EC3 mock khi vi\u1EBFt test.",
32
+ severity: "warning",
33
+ category: "correctness",
34
+ languages: ["java"],
35
+ scope: "spring-boot",
36
+ requires: "syntactic",
37
+ baseConfidence: 80,
38
+ check(ctx) {
39
+ if (isTestFile(ctx.file.path)) return [];
40
+ const tree = asTreeSitterTree(ctx.parsed);
41
+ const findings = [];
42
+ for (const node of walkNodes(tree.rootNode)) {
43
+ if (node.type === "method_invocation") {
44
+ const nameNode = node.childForFieldName("name");
45
+ const objectNode = node.childForFieldName("object");
46
+ const argsNode = node.childForFieldName("arguments");
47
+ if (nameNode && objectNode && argsNode) {
48
+ const methodName = nameNode.text;
49
+ const objectName = objectNode.text;
50
+ const argCount = argsNode.namedChildCount;
51
+ if (methodName === "now" && UNZONED_STATIC_OBJECTS.has(objectName) && argCount === 0) {
52
+ findings.push({
53
+ message: `G\u1ECDi \`${objectName}.now()\` kh\xF4ng truy\u1EC1n \`ZoneId\` ho\u1EB7c \`Clock\` \u2014 r\u1EE7i ro sai l\u1EC7ch m\xFAi gi\u1EDD tr\xEAn K8s/Cloud v\xE0 kh\xF4ng th\u1EC3 mock khi vi\u1EBFt unit test.`,
54
+ file: ctx.file.path,
55
+ range: {
56
+ line: node.startPosition.row + 1,
57
+ column: node.startPosition.column + 1
58
+ },
59
+ suggestion: `D\xF9ng \`Instant.now(clock)\` ho\u1EB7c truy\u1EC1n \`ZoneId.of("...")\` / \`Clock\` v\xE0o \`${objectName}.now(...)\`.`
60
+ });
61
+ } else if (methodName === "getInstance" && CALENDAR_OBJECTS.has(objectName) && argCount === 0) {
62
+ findings.push({
63
+ message: `G\u1ECDi \`${objectName}.getInstance()\` ng\u1EA7m l\u1EA5y timezone v\xE0 locale c\u1EE7a JVM. N\xEAn d\xF9ng java.time API (\`ZonedDateTime\`, \`Instant\`) v\u1EDBi Clock t\u01B0\u1EDDng minh.`,
64
+ file: ctx.file.path,
65
+ range: {
66
+ line: node.startPosition.row + 1,
67
+ column: node.startPosition.column + 1
68
+ },
69
+ suggestion: "Chuy\u1EC3n sang d\xF9ng `java.time` API (`ZonedDateTime.now(zoneId)` / `Instant.now(clock)`)."
70
+ });
71
+ }
72
+ }
73
+ }
74
+ if (node.type === "object_creation_expression") {
75
+ const typeNode = node.childForFieldName("type");
76
+ const argsNode = node.childForFieldName("arguments");
77
+ if (typeNode && argsNode && typeNode.text === "Date" && argsNode.namedChildCount === 0) {
78
+ findings.push({
79
+ message: "Kh\u1EDFi t\u1EA1o `new Date()` ng\u1EA7m s\u1EED d\u1EE5ng system clock c\u1EE7a m\xE1y ch\u1EE7 v\xE0 l\xE0 legacy API. N\xEAn d\xF9ng `Instant.now(clock)` \u0111\u1EC3 c\xF3 th\u1EC3 inject Clock khi test.",
80
+ file: ctx.file.path,
81
+ range: {
82
+ line: node.startPosition.row + 1,
83
+ column: node.startPosition.column + 1
84
+ },
85
+ suggestion: "S\u1EED d\u1EE5ng `Instant.now(clock)` ho\u1EB7c `Clock.systemUTC()` thay cho `new Date()`."
86
+ });
87
+ }
88
+ }
89
+ }
90
+ return findings;
91
+ }
92
+ };
93
+
94
+ export { rule };
95
+ //# sourceMappingURL=no-unzoned-datetime.rule.js.map
96
+ //# sourceMappingURL=no-unzoned-datetime.rule.js.map
@@ -1,5 +1,6 @@
1
1
  id: spring-boot/repository-naming
2
- version: 1
2
+ # v2 (ADR-0065 calibration): severity warning→info (quy ước đặt tên)
3
+ version: 2
3
4
  kind: static-yaml
4
5
  title: "Spring Data interface phải kết thúc bằng `Repository`"
5
6
  description: |
@@ -14,7 +15,8 @@ description: |
14
15
  Phase 8: dùng negative lookahead `(?!...)` trong regex predicate để
15
16
  loại trừ tên đã đúng (vd `UserRepository`). Match cả `extends X` lẫn
16
17
  `extends X<...>` (generic).
17
- severity: warning
18
+ # ADR-0065: quy ước đặt tên thuần tuý → info (đồng bộ angular/observable-naming).
19
+ severity: info
18
20
  category: naming
19
21
  languages: [java]
20
22
  scope: spring-boot
package/dist/index.d.ts CHANGED
@@ -1,13 +1,12 @@
1
1
  import { Command } from 'commander';
2
2
  import { z } from 'zod';
3
3
  import { CliApiClient } from '@code-sentinel/contracts';
4
- import { AiGatePolicy, AiSkipGatePolicy, IParser, IRuleLoader, IAIClient, IAiExecutionTracker, IClusterAssembler, IClusterTreeBuilder, SourceFile, IAstDependencyGraphBuilder, ITaintAnalyzer, ITemplateComponentLinker, IReviewStore, ICacheStore, IReporter, Severity } from '@code-sentinel/core';
4
+ import { AiGatePolicy, AiSkipGatePolicy, IParser, IRuleLoader, IAIClient, IAiExecutionTracker, IClusterAssembler, IClusterTreeBuilder, SourceFile, IAstDependencyGraphBuilder, ITaintAnalyzer, ITemplateComponentLinker, IReviewStore, ICacheStore, IReporter } from '@code-sentinel/core';
5
5
  import { Instance } from 'ink';
6
6
  import { TransactionBoundaryFact } from '@code-sentinel/ai-engine';
7
7
  import { AiRuleExecutorCallback } from '@code-sentinel/rule-engine';
8
8
  import { Logger, Clock, Result, ConfigInvalidError, IOError } from '@code-sentinel/shared';
9
9
  import { DbHandle } from '@code-sentinel/storage';
10
- import { Server } from 'node:http';
11
10
 
12
11
  /**
13
12
  * commander setup. Wires CLI verbs to command handlers.
@@ -859,7 +858,6 @@ declare const codeReviewConfigSchema: z.ZodEffects<z.ZodObject<{
859
858
  aiDiffReview: z.ZodDefault<z.ZodBoolean>;
860
859
  maxSupportFiles: z.ZodDefault<z.ZodNumber>;
861
860
  diffChunkTokenBudget: z.ZodDefault<z.ZodNumber>;
862
- maxAiCalls: z.ZodDefault<z.ZodNumber>;
863
861
  codeQualityOutput: z.ZodDefault<z.ZodString>;
864
862
  gitlabTokenEnv: z.ZodDefault<z.ZodString>;
865
863
  cleanupExistingComments: z.ZodDefault<z.ZodBoolean>;
@@ -920,7 +918,6 @@ declare const codeReviewConfigSchema: z.ZodEffects<z.ZodObject<{
920
918
  aiDiffReview: boolean;
921
919
  maxSupportFiles: number;
922
920
  diffChunkTokenBudget: number;
923
- maxAiCalls: number;
924
921
  codeQualityOutput: string;
925
922
  gitlabTokenEnv: string;
926
923
  cleanupExistingComments: boolean;
@@ -973,7 +970,6 @@ declare const codeReviewConfigSchema: z.ZodEffects<z.ZodObject<{
973
970
  aiDiffReview?: boolean | undefined;
974
971
  maxSupportFiles?: number | undefined;
975
972
  diffChunkTokenBudget?: number | undefined;
976
- maxAiCalls?: number | undefined;
977
973
  codeQualityOutput?: string | undefined;
978
974
  gitlabTokenEnv?: string | undefined;
979
975
  cleanupExistingComments?: boolean | undefined;
@@ -1025,54 +1021,65 @@ declare const codeReviewConfigSchema: z.ZodEffects<z.ZodObject<{
1025
1021
  *
1026
1022
  * Positive-number validation only. A project that genuinely wants a 5-minute idle timeout is
1027
1023
  * making a policy choice, not a mistake, so the schema does not second-guess the value.
1024
+ *
1025
+ * **Every threshold is also settable from an ENVIRONMENT VARIABLE** — `ttlSeconds:
1026
+ * "${CS_OTP_TTL}"` — which is what `policyInt` / `policyBool` exist for. See their doc comments
1027
+ * for why a plain `z.number()` silently made that impossible.
1028
1028
  */
1029
1029
  pentest: z.ZodDefault<z.ZodObject<{
1030
1030
  policy: z.ZodDefault<z.ZodObject<{
1031
1031
  password: z.ZodOptional<z.ZodObject<{
1032
- minLength: z.ZodOptional<z.ZodNumber>;
1033
- maxAgeDays: z.ZodOptional<z.ZodNumber>;
1034
- historyCount: z.ZodOptional<z.ZodNumber>;
1032
+ minLength: z.ZodOptional<z.ZodUnion<[z.ZodNumber, z.ZodPipeline<z.ZodEffects<z.ZodString, number, string>, z.ZodNumber>]>>;
1033
+ maxAgeDays: z.ZodOptional<z.ZodUnion<[z.ZodNumber, z.ZodPipeline<z.ZodEffects<z.ZodString, number, string>, z.ZodNumber>]>>;
1034
+ historyCount: z.ZodOptional<z.ZodUnion<[z.ZodNumber, z.ZodPipeline<z.ZodEffects<z.ZodString, number, string>, z.ZodNumber>]>>;
1035
1035
  }, "strip", z.ZodTypeAny, {
1036
1036
  minLength?: number | undefined;
1037
1037
  maxAgeDays?: number | undefined;
1038
1038
  historyCount?: number | undefined;
1039
1039
  }, {
1040
- minLength?: number | undefined;
1041
- maxAgeDays?: number | undefined;
1042
- historyCount?: number | undefined;
1040
+ minLength?: string | number | undefined;
1041
+ maxAgeDays?: string | number | undefined;
1042
+ historyCount?: string | number | undefined;
1043
1043
  }>>;
1044
1044
  lockout: z.ZodOptional<z.ZodObject<{
1045
- captchaAfterFailures: z.ZodOptional<z.ZodNumber>;
1045
+ captchaAfterFailures: z.ZodOptional<z.ZodUnion<[z.ZodNumber, z.ZodPipeline<z.ZodEffects<z.ZodString, number, string>, z.ZodNumber>]>>;
1046
1046
  }, "strip", z.ZodTypeAny, {
1047
1047
  captchaAfterFailures?: number | undefined;
1048
1048
  }, {
1049
- captchaAfterFailures?: number | undefined;
1049
+ captchaAfterFailures?: string | number | undefined;
1050
1050
  }>>;
1051
1051
  otp: z.ZodOptional<z.ZodObject<{
1052
- ttlSeconds: z.ZodOptional<z.ZodNumber>;
1053
- maxWrongPerDay: z.ZodOptional<z.ZodNumber>;
1054
- singleValidAtATime: z.ZodOptional<z.ZodBoolean>;
1052
+ ttlSeconds: z.ZodOptional<z.ZodUnion<[z.ZodNumber, z.ZodPipeline<z.ZodEffects<z.ZodString, number, string>, z.ZodNumber>]>>;
1053
+ maxWrongPerDay: z.ZodOptional<z.ZodUnion<[z.ZodNumber, z.ZodPipeline<z.ZodEffects<z.ZodString, number, string>, z.ZodNumber>]>>;
1054
+ singleValidAtATime: z.ZodOptional<z.ZodUnion<[z.ZodBoolean, z.ZodEffects<z.ZodPipeline<z.ZodString, z.ZodEnum<["true", "false", "1", "0"]>>, boolean, string>]>>;
1055
1055
  }, "strip", z.ZodTypeAny, {
1056
1056
  ttlSeconds?: number | undefined;
1057
1057
  maxWrongPerDay?: number | undefined;
1058
1058
  singleValidAtATime?: boolean | undefined;
1059
1059
  }, {
1060
- ttlSeconds?: number | undefined;
1061
- maxWrongPerDay?: number | undefined;
1062
- singleValidAtATime?: boolean | undefined;
1060
+ ttlSeconds?: string | number | undefined;
1061
+ maxWrongPerDay?: string | number | undefined;
1062
+ singleValidAtATime?: string | boolean | undefined;
1063
1063
  }>>;
1064
1064
  session: z.ZodOptional<z.ZodObject<{
1065
- idleTimeoutMinutes: z.ZodOptional<z.ZodNumber>;
1066
- absoluteTimeoutHours: z.ZodOptional<z.ZodNumber>;
1067
- tokenBits: z.ZodOptional<z.ZodNumber>;
1065
+ idleTimeoutMinutes: z.ZodOptional<z.ZodUnion<[z.ZodNumber, z.ZodPipeline<z.ZodEffects<z.ZodString, number, string>, z.ZodNumber>]>>;
1066
+ absoluteTimeoutHours: z.ZodOptional<z.ZodUnion<[z.ZodNumber, z.ZodPipeline<z.ZodEffects<z.ZodString, number, string>, z.ZodNumber>]>>;
1067
+ tokenBits: z.ZodOptional<z.ZodUnion<[z.ZodNumber, z.ZodPipeline<z.ZodEffects<z.ZodString, number, string>, z.ZodNumber>]>>;
1068
1068
  }, "strip", z.ZodTypeAny, {
1069
1069
  idleTimeoutMinutes?: number | undefined;
1070
1070
  absoluteTimeoutHours?: number | undefined;
1071
1071
  tokenBits?: number | undefined;
1072
1072
  }, {
1073
- idleTimeoutMinutes?: number | undefined;
1074
- absoluteTimeoutHours?: number | undefined;
1075
- tokenBits?: number | undefined;
1073
+ idleTimeoutMinutes?: string | number | undefined;
1074
+ absoluteTimeoutHours?: string | number | undefined;
1075
+ tokenBits?: string | number | undefined;
1076
+ }>>;
1077
+ dependency: z.ZodOptional<z.ZodObject<{
1078
+ minCvssScore: z.ZodOptional<z.ZodUnion<[z.ZodNumber, z.ZodPipeline<z.ZodEffects<z.ZodString, number, string>, z.ZodNumber>]>>;
1079
+ }, "strip", z.ZodTypeAny, {
1080
+ minCvssScore?: number | undefined;
1081
+ }, {
1082
+ minCvssScore?: string | number | undefined;
1076
1083
  }>>;
1077
1084
  }, "strip", z.ZodTypeAny, {
1078
1085
  password?: {
@@ -1093,24 +1100,30 @@ declare const codeReviewConfigSchema: z.ZodEffects<z.ZodObject<{
1093
1100
  absoluteTimeoutHours?: number | undefined;
1094
1101
  tokenBits?: number | undefined;
1095
1102
  } | undefined;
1103
+ dependency?: {
1104
+ minCvssScore?: number | undefined;
1105
+ } | undefined;
1096
1106
  }, {
1097
1107
  password?: {
1098
- minLength?: number | undefined;
1099
- maxAgeDays?: number | undefined;
1100
- historyCount?: number | undefined;
1108
+ minLength?: string | number | undefined;
1109
+ maxAgeDays?: string | number | undefined;
1110
+ historyCount?: string | number | undefined;
1101
1111
  } | undefined;
1102
1112
  lockout?: {
1103
- captchaAfterFailures?: number | undefined;
1113
+ captchaAfterFailures?: string | number | undefined;
1104
1114
  } | undefined;
1105
1115
  otp?: {
1106
- ttlSeconds?: number | undefined;
1107
- maxWrongPerDay?: number | undefined;
1108
- singleValidAtATime?: boolean | undefined;
1116
+ ttlSeconds?: string | number | undefined;
1117
+ maxWrongPerDay?: string | number | undefined;
1118
+ singleValidAtATime?: string | boolean | undefined;
1109
1119
  } | undefined;
1110
1120
  session?: {
1111
- idleTimeoutMinutes?: number | undefined;
1112
- absoluteTimeoutHours?: number | undefined;
1113
- tokenBits?: number | undefined;
1121
+ idleTimeoutMinutes?: string | number | undefined;
1122
+ absoluteTimeoutHours?: string | number | undefined;
1123
+ tokenBits?: string | number | undefined;
1124
+ } | undefined;
1125
+ dependency?: {
1126
+ minCvssScore?: string | number | undefined;
1114
1127
  } | undefined;
1115
1128
  }>>;
1116
1129
  }, "strip", z.ZodTypeAny, {
@@ -1133,26 +1146,32 @@ declare const codeReviewConfigSchema: z.ZodEffects<z.ZodObject<{
1133
1146
  absoluteTimeoutHours?: number | undefined;
1134
1147
  tokenBits?: number | undefined;
1135
1148
  } | undefined;
1149
+ dependency?: {
1150
+ minCvssScore?: number | undefined;
1151
+ } | undefined;
1136
1152
  };
1137
1153
  }, {
1138
1154
  policy?: {
1139
1155
  password?: {
1140
- minLength?: number | undefined;
1141
- maxAgeDays?: number | undefined;
1142
- historyCount?: number | undefined;
1156
+ minLength?: string | number | undefined;
1157
+ maxAgeDays?: string | number | undefined;
1158
+ historyCount?: string | number | undefined;
1143
1159
  } | undefined;
1144
1160
  lockout?: {
1145
- captchaAfterFailures?: number | undefined;
1161
+ captchaAfterFailures?: string | number | undefined;
1146
1162
  } | undefined;
1147
1163
  otp?: {
1148
- ttlSeconds?: number | undefined;
1149
- maxWrongPerDay?: number | undefined;
1150
- singleValidAtATime?: boolean | undefined;
1164
+ ttlSeconds?: string | number | undefined;
1165
+ maxWrongPerDay?: string | number | undefined;
1166
+ singleValidAtATime?: string | boolean | undefined;
1151
1167
  } | undefined;
1152
1168
  session?: {
1153
- idleTimeoutMinutes?: number | undefined;
1154
- absoluteTimeoutHours?: number | undefined;
1155
- tokenBits?: number | undefined;
1169
+ idleTimeoutMinutes?: string | number | undefined;
1170
+ absoluteTimeoutHours?: string | number | undefined;
1171
+ tokenBits?: string | number | undefined;
1172
+ } | undefined;
1173
+ dependency?: {
1174
+ minCvssScore?: string | number | undefined;
1156
1175
  } | undefined;
1157
1176
  } | undefined;
1158
1177
  }>>;
@@ -1293,7 +1312,6 @@ declare const codeReviewConfigSchema: z.ZodEffects<z.ZodObject<{
1293
1312
  aiDiffReview: boolean;
1294
1313
  maxSupportFiles: number;
1295
1314
  diffChunkTokenBudget: number;
1296
- maxAiCalls: number;
1297
1315
  codeQualityOutput: string;
1298
1316
  gitlabTokenEnv: string;
1299
1317
  cleanupExistingComments: boolean;
@@ -1332,6 +1350,9 @@ declare const codeReviewConfigSchema: z.ZodEffects<z.ZodObject<{
1332
1350
  absoluteTimeoutHours?: number | undefined;
1333
1351
  tokenBits?: number | undefined;
1334
1352
  } | undefined;
1353
+ dependency?: {
1354
+ minCvssScore?: number | undefined;
1355
+ } | undefined;
1335
1356
  };
1336
1357
  };
1337
1358
  }, {
@@ -1471,7 +1492,6 @@ declare const codeReviewConfigSchema: z.ZodEffects<z.ZodObject<{
1471
1492
  aiDiffReview?: boolean | undefined;
1472
1493
  maxSupportFiles?: number | undefined;
1473
1494
  diffChunkTokenBudget?: number | undefined;
1474
- maxAiCalls?: number | undefined;
1475
1495
  codeQualityOutput?: string | undefined;
1476
1496
  gitlabTokenEnv?: string | undefined;
1477
1497
  cleanupExistingComments?: boolean | undefined;
@@ -1493,22 +1513,25 @@ declare const codeReviewConfigSchema: z.ZodEffects<z.ZodObject<{
1493
1513
  pentest?: {
1494
1514
  policy?: {
1495
1515
  password?: {
1496
- minLength?: number | undefined;
1497
- maxAgeDays?: number | undefined;
1498
- historyCount?: number | undefined;
1516
+ minLength?: string | number | undefined;
1517
+ maxAgeDays?: string | number | undefined;
1518
+ historyCount?: string | number | undefined;
1499
1519
  } | undefined;
1500
1520
  lockout?: {
1501
- captchaAfterFailures?: number | undefined;
1521
+ captchaAfterFailures?: string | number | undefined;
1502
1522
  } | undefined;
1503
1523
  otp?: {
1504
- ttlSeconds?: number | undefined;
1505
- maxWrongPerDay?: number | undefined;
1506
- singleValidAtATime?: boolean | undefined;
1524
+ ttlSeconds?: string | number | undefined;
1525
+ maxWrongPerDay?: string | number | undefined;
1526
+ singleValidAtATime?: string | boolean | undefined;
1507
1527
  } | undefined;
1508
1528
  session?: {
1509
- idleTimeoutMinutes?: number | undefined;
1510
- absoluteTimeoutHours?: number | undefined;
1511
- tokenBits?: number | undefined;
1529
+ idleTimeoutMinutes?: string | number | undefined;
1530
+ absoluteTimeoutHours?: string | number | undefined;
1531
+ tokenBits?: string | number | undefined;
1532
+ } | undefined;
1533
+ dependency?: {
1534
+ minCvssScore?: string | number | undefined;
1512
1535
  } | undefined;
1513
1536
  } | undefined;
1514
1537
  } | undefined;
@@ -1649,7 +1672,6 @@ declare const codeReviewConfigSchema: z.ZodEffects<z.ZodObject<{
1649
1672
  aiDiffReview: boolean;
1650
1673
  maxSupportFiles: number;
1651
1674
  diffChunkTokenBudget: number;
1652
- maxAiCalls: number;
1653
1675
  codeQualityOutput: string;
1654
1676
  gitlabTokenEnv: string;
1655
1677
  cleanupExistingComments: boolean;
@@ -1688,6 +1710,9 @@ declare const codeReviewConfigSchema: z.ZodEffects<z.ZodObject<{
1688
1710
  absoluteTimeoutHours?: number | undefined;
1689
1711
  tokenBits?: number | undefined;
1690
1712
  } | undefined;
1713
+ dependency?: {
1714
+ minCvssScore?: number | undefined;
1715
+ } | undefined;
1691
1716
  };
1692
1717
  };
1693
1718
  }, unknown>;
@@ -2582,97 +2607,4 @@ declare const EXIT: {
2582
2607
  };
2583
2608
  type ExitCode = (typeof EXIT)[keyof typeof EXIT];
2584
2609
 
2585
- interface GitLabMrTarget {
2586
- readonly baseUrl: string;
2587
- readonly projectPath: string;
2588
- readonly iid: number;
2589
- readonly webUrl?: string;
2590
- }
2591
- interface PrReviewRuntimeOptions {
2592
- readonly invocationRoot: string;
2593
- readonly configPath?: string;
2594
- readonly pr: string;
2595
- readonly post: boolean;
2596
- readonly maxInlineComments?: number;
2597
- readonly summaryOnly: boolean;
2598
- readonly prWorkspace?: string;
2599
- readonly prAiStrategy?: CodeReviewConfig['prReview']['aiStrategy'];
2600
- readonly aiOff: boolean;
2601
- readonly mode?: Mode | 'auto';
2602
- readonly scope?: ReviewScope;
2603
- readonly minSeverity?: Severity;
2604
- readonly minConfidence?: number;
2605
- readonly reportFormat?: 'md' | 'json' | 'sarif' | 'both';
2606
- readonly output?: string;
2607
- readonly silent: boolean;
2608
- readonly noUi?: boolean;
2609
- readonly compact?: boolean;
2610
- readonly full?: boolean;
2611
- readonly noBaseline?: boolean;
2612
- readonly extraInstructions?: string;
2613
- readonly numMaxFindings?: number;
2614
- readonly aiTimeoutMs?: number;
2615
- readonly rules?: readonly string[];
2616
- }
2617
-
2618
- type PrReviewRunner = (options: PrReviewRuntimeOptions) => Promise<number>;
2619
- interface GitLabWebhookJob {
2620
- readonly key: string;
2621
- readonly mrUrl: string;
2622
- readonly target: GitLabMrTarget;
2623
- readonly eventId: string;
2624
- }
2625
- type GitLabWebhookParseResult = {
2626
- readonly kind: 'accepted';
2627
- readonly job: GitLabWebhookJob;
2628
- } | {
2629
- readonly kind: 'ignored';
2630
- readonly reason: string;
2631
- } | {
2632
- readonly kind: 'invalid';
2633
- readonly reason: string;
2634
- };
2635
- type GitLabWebhookQueueStatus = 'started' | 'queued' | 'deduped';
2636
- interface GitLabWebhookQueueEnqueueResult {
2637
- readonly status: GitLabWebhookQueueStatus;
2638
- readonly key: string;
2639
- }
2640
- interface GitLabWebhookQueue {
2641
- enqueue(job: GitLabWebhookJob): GitLabWebhookQueueEnqueueResult;
2642
- onIdle(): Promise<void>;
2643
- }
2644
- interface CreateGitLabWebhookQueueOptions {
2645
- readonly reviewRoot: string;
2646
- readonly runner?: PrReviewRunner;
2647
- readonly post: boolean;
2648
- readonly aiOff?: boolean;
2649
- readonly minSeverity?: Severity;
2650
- readonly minConfidence?: number;
2651
- readonly reportFormat?: 'md' | 'json' | 'both';
2652
- readonly outputRoot?: string;
2653
- }
2654
- interface CreateGitLabWebhookServerOptions {
2655
- readonly path: string;
2656
- readonly secret: string;
2657
- readonly queue: GitLabWebhookQueue;
2658
- readonly allowNoteCommand?: boolean;
2659
- }
2660
- interface RunGitLabWebhookOptions {
2661
- readonly host?: string;
2662
- readonly port?: number;
2663
- readonly path?: string;
2664
- readonly reviewRoot?: string;
2665
- readonly secretEnv?: string;
2666
- readonly allowNoteCommand?: boolean;
2667
- readonly post?: boolean;
2668
- readonly aiOff?: boolean;
2669
- readonly minSeverity?: Severity;
2670
- readonly minConfidence?: number;
2671
- readonly reportFormat?: 'md' | 'json' | 'both';
2672
- }
2673
- declare const createGitLabWebhookQueue: (options: CreateGitLabWebhookQueueOptions) => GitLabWebhookQueue;
2674
- declare const parseGitLabMergeRequestWebhook: (payload: unknown, eventId: string) => GitLabWebhookParseResult;
2675
- declare const createGitLabWebhookServer: (options: CreateGitLabWebhookServerOptions) => Server;
2676
- declare const runGitLabWebhook: (options?: RunGitLabWebhookOptions) => Promise<number>;
2677
-
2678
- export { type AuthLoginOptions, type AutomationTokenCreateOptions, type AutomationTokenOptions, type AutomationTokenRevokeOptions, type BuildContainerOptions, type CliBuildMetadata, type CodeReviewConfig, type ConfigEffectiveOptions, type Container, EXIT, type ExitCode, FileProtectedRetryStore, FileWorkspaceLinkStore, type FindFilesOptions, type GitLabWebhookJob, type GitLabWebhookQueue, type HistoryDiffOptions, type HistoryListOptions, type ICredentialStore, InMemoryCredentialStore, InMemoryRetryKeyProvider, type InitOptions, LinuxSecretServiceStore, type LoadedConfig, type LocalEffectiveConfig, type LocalReadiness, type LocalReadinessCheck, MacOsKeychainCredentialStore, type PendingPushRetry, type ProjectConfigApplyOptions, type ProjectConfigShowOptions, type ProjectSetupOptions, type ProjectSetupPrompts, type ProjectStatus, type ProjectStatusOptions, type ProjectUnlinkOptions, type ResultsExportOptions, type ResultsOptions, type ResultsShowOptions, type ReviewOptions, type RuleListOptions, type RunGitLabWebhookOptions, type StoredCredential, WindowsCredentialManagerStore, type WorkspaceLinkState, buildContainer, buildProgram, codeReviewConfigSchema, createGitLabWebhookQueue, createGitLabWebhookServer, createPlatformCredentialStore, createPlatformRetryKeyProvider, createPlatformSecretStore, createRemoteConfigClient, findFiles, getCliBuildMetadata, getLocalEffectiveConfig, getLocalProjectStatus, getLocalReadiness, getProjectStatus, loadConfig, main, parseGitLabMergeRequestWebhook, repositoryConfigFromLocalConfig, runAuthLogin, runAuthLogout, runAuthStatus, runAutomationTokenCreate, runAutomationTokenList, runAutomationTokenRevoke, runConfigEffective, runDoctor, runGitLabWebhook, runHistoryDiff, runHistoryList, runInit, runProjectConfigApply, runProjectConfigPull, runProjectConfigShow, runProjectLink, runProjectList, runProjectSetup, runProjectStatus, runProjectUnlink, runQuickstart, runResults, runResultsExport, runResultsShow, runReview, runRuleList };
2610
+ export { type AuthLoginOptions, type AutomationTokenCreateOptions, type AutomationTokenOptions, type AutomationTokenRevokeOptions, type BuildContainerOptions, type CliBuildMetadata, type CodeReviewConfig, type ConfigEffectiveOptions, type Container, EXIT, type ExitCode, FileProtectedRetryStore, FileWorkspaceLinkStore, type FindFilesOptions, type HistoryDiffOptions, type HistoryListOptions, type ICredentialStore, InMemoryCredentialStore, InMemoryRetryKeyProvider, type InitOptions, LinuxSecretServiceStore, type LoadedConfig, type LocalEffectiveConfig, type LocalReadiness, type LocalReadinessCheck, MacOsKeychainCredentialStore, type PendingPushRetry, type ProjectConfigApplyOptions, type ProjectConfigShowOptions, type ProjectSetupOptions, type ProjectSetupPrompts, type ProjectStatus, type ProjectStatusOptions, type ProjectUnlinkOptions, type ResultsExportOptions, type ResultsOptions, type ResultsShowOptions, type ReviewOptions, type RuleListOptions, type StoredCredential, WindowsCredentialManagerStore, type WorkspaceLinkState, buildContainer, buildProgram, codeReviewConfigSchema, createPlatformCredentialStore, createPlatformRetryKeyProvider, createPlatformSecretStore, createRemoteConfigClient, findFiles, getCliBuildMetadata, getLocalEffectiveConfig, getLocalProjectStatus, getLocalReadiness, getProjectStatus, loadConfig, main, repositoryConfigFromLocalConfig, runAuthLogin, runAuthLogout, runAuthStatus, runAutomationTokenCreate, runAutomationTokenList, runAutomationTokenRevoke, runConfigEffective, runDoctor, runHistoryDiff, runHistoryList, runInit, runProjectConfigApply, runProjectConfigPull, runProjectConfigShow, runProjectLink, runProjectList, runProjectSetup, runProjectStatus, runProjectUnlink, runQuickstart, runResults, runResultsExport, runResultsShow, runReview, runRuleList };