oc-pilot 0.114.0 → 0.114.2

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 (51) hide show
  1. package/CHANGELOG.md +14 -0
  2. package/README.md +4 -4
  3. package/README.ru.md +3 -3
  4. package/dist/cli.test.js +50 -0
  5. package/dist/cli.test.js.map +1 -1
  6. package/dist/commands/preflight.js +3 -0
  7. package/dist/commands/preflight.js.map +1 -1
  8. package/dist/core/antibody.js +3 -3
  9. package/dist/core/antibody.js.map +1 -1
  10. package/dist/core/antibody.test.js +34 -0
  11. package/dist/core/antibody.test.js.map +1 -1
  12. package/dist/core/authz.test.js +10 -0
  13. package/dist/core/authz.test.js.map +1 -1
  14. package/dist/core/chronos.js +3 -3
  15. package/dist/core/chronos.js.map +1 -1
  16. package/dist/core/chronos.test.js +23 -0
  17. package/dist/core/chronos.test.js.map +1 -1
  18. package/dist/core/clairvoyant.js +6 -5
  19. package/dist/core/clairvoyant.js.map +1 -1
  20. package/dist/core/clairvoyant.test.js +28 -0
  21. package/dist/core/clairvoyant.test.js.map +1 -1
  22. package/dist/core/command.js +1 -1
  23. package/dist/core/command.js.map +1 -1
  24. package/dist/core/cuckoo.test.js +3 -3
  25. package/dist/core/cuckoo.test.js.map +1 -1
  26. package/dist/core/fuzz.js +1 -1
  27. package/dist/core/fuzz.js.map +1 -1
  28. package/dist/core/mitosis.js +4 -2
  29. package/dist/core/mitosis.js.map +1 -1
  30. package/dist/core/mitosis.test.js +20 -0
  31. package/dist/core/mitosis.test.js.map +1 -1
  32. package/dist/core/opencode.js +1 -1
  33. package/dist/core/opencode.js.map +1 -1
  34. package/dist/core/preflight-run.js +9 -3
  35. package/dist/core/preflight-run.js.map +1 -1
  36. package/dist/core/readiness.js +2 -1
  37. package/dist/core/readiness.js.map +1 -1
  38. package/dist/core/readiness.test.js +15 -0
  39. package/dist/core/readiness.test.js.map +1 -1
  40. package/dist/core/sast.js +41 -1
  41. package/dist/core/sast.js.map +1 -1
  42. package/dist/core/sast.test.js +14 -0
  43. package/dist/core/sast.test.js.map +1 -1
  44. package/dist/version.js +1 -1
  45. package/docs/integrations.md +3 -3
  46. package/package.json +1 -1
  47. package/skills/agent-self-review/SKILL.md +1 -1
  48. package/skills/commit-discipline/SKILL.md +1 -1
  49. package/skills/secure-diff-gate/SKILL.md +1 -1
  50. package/skills/stack-review-packs/SKILL.md +1 -1
  51. package/skills/test-failure-triage/SKILL.md +1 -1
package/CHANGELOG.md CHANGED
@@ -1,5 +1,19 @@
1
1
  # Changelog
2
2
 
3
+ ## 0.114.2
4
+
5
+ - `ready` больше не считает тестовые фикстуры в проверке безопасности: SAST и authz сканируют только продовый код.
6
+ - `stripComments` понимает regex-литералы, поэтому кавычки и бэктики внутри регулярок больше не ломают поиск комментариев и не дают ложных находок.
7
+ - Намеренные `shell: true` и чтение локального пути помечены `oc-pilot:sast-ignore` с причиной; self-scan репозитория чист.
8
+ - 843 теста; версия 0.114.2.
9
+
10
+ ## 0.114.1
11
+
12
+ - Dogfooding-проход: `clairvoyant` больше не считает сгенерированные `dist/`-файлы и их символы; `mitosis` выносит generated-файлы в отдельный коммит.
13
+ - `chronos` считает churn только по запрошенному файлу, а не по всему коммиту, поэтому релизный коммит больше не делает новый файл hotspot.
14
+ - `preflight` по умолчанию пропускает тестовые фикстуры в SAST и authz; `--include-tests` возвращает их в скан. `antibody` тоже не учится на тестовых фикстурах.
15
+ - README уточняет поведение `--include-tests`; 840 тестов; версия 0.114.1.
16
+
3
17
  ## 0.114.0
4
18
 
5
19
  - Новая команда `tribunal`: три отдельных модельных ревьюера — security, correctness и maintainability — и только находки, подтверждённые кворумом.
package/README.md CHANGED
@@ -106,7 +106,7 @@ jobs:
106
106
  - run: npx -y oc-pilot preflight --base ${{ github.event.pull_request.base.sha }} --github
107
107
  ```
108
108
 
109
- `preflight` checks secrets, deterministic SAST, route authorization, dependency health, weakened tests and the Slop Index delta. It exits non-zero on failure, so the branch protection rule does the rest.
109
+ `preflight` checks secrets, deterministic SAST, route authorization, dependency health, weakened tests and the Slop Index delta. It exits non-zero on failure, so the branch protection rule does the rest. SAST and route checks skip test fixtures by default; pass `--include-tests` to scan them.
110
110
 
111
111
  ## Under the hood
112
112
 
@@ -1034,7 +1034,7 @@ Start the server manually with an explicit project directory:
1034
1034
  ```bash
1035
1035
  oc-pilot-mcp --cwd /absolute/path/to/project
1036
1036
  # pinned for reproducibility:
1037
- npx -y oc-pilot@0.114.0 mcp --cwd /absolute/path/to/project
1037
+ npx -y oc-pilot@0.114.2 mcp --cwd /absolute/path/to/project
1038
1038
  ```
1039
1039
 
1040
1040
  The `diff` and `log` tool arguments are text, not file paths. `paths` and `files` are project-relative and cannot escape the project directory. `context` is literal text, not an `@file` reference. `base` must be a git ref. `lang`, `fail_on`, `repo_context`, and `no_secret_scan` are available where the corresponding CLI command supports them.
@@ -1209,7 +1209,7 @@ jobs:
1209
1209
  - uses: actions/checkout@v4
1210
1210
  with:
1211
1211
  fetch-depth: 0
1212
- - uses: MyNameIsNikki/oc-pilot@v0.114.0
1212
+ - uses: MyNameIsNikki/oc-pilot@v0.114.2
1213
1213
  with:
1214
1214
  command: scan
1215
1215
  args: --base origin/${{ github.base_ref }} --fail-on-secrets
@@ -1232,7 +1232,7 @@ jobs:
1232
1232
  - uses: actions/setup-node@v4
1233
1233
  with:
1234
1234
  node-version: 22
1235
- - run: npm install -g https://github.com/MyNameIsNikki/oc-pilot/archive/refs/tags/v0.114.0.tar.gz
1235
+ - run: npm install -g https://github.com/MyNameIsNikki/oc-pilot/archive/refs/tags/v0.114.2.tar.gz
1236
1236
  - run: oc-pilot scan --base origin/${{ github.base_ref }}
1237
1237
  - run: oc-pilot review --base origin/${{ github.base_ref }} --fail-on warning --fail-on-secrets --github
1238
1238
  env:
package/README.ru.md CHANGED
@@ -106,7 +106,7 @@ jobs:
106
106
  - run: npx -y oc-pilot preflight --base ${{ github.event.pull_request.base.sha }} --github
107
107
  ```
108
108
 
109
- `preflight` проверяет секреты, детерминированный SAST, авторизацию маршрутов, здоровье зависимостей, ослабленные тесты и дельту Slop Index. При провале он возвращает ненулевой код, дальше работает branch protection.
109
+ `preflight` проверяет секреты, детерминированный SAST, авторизацию маршрутов, здоровье зависимостей, ослабленные тесты и дельту Slop Index. При провале он возвращает ненулевой код, дальше работает branch protection. SAST и проверка маршрутов по умолчанию пропускают тестовые фикстуры; `--include-tests` включает их.
110
110
 
111
111
  ## Под капотом
112
112
 
@@ -985,7 +985,7 @@ ZCode импортирует серверы из Claude Code, Codex, OpenCode и
985
985
  ```bash
986
986
  oc-pilot-mcp --cwd "C:\path\to\project"
987
987
  # версия зафиксирована для воспроизводимости:
988
- npx -y oc-pilot@0.114.0 mcp --cwd "C:\path\to\project"
988
+ npx -y oc-pilot@0.114.2 mcp --cwd "C:\path\to\project"
989
989
  ```
990
990
 
991
991
  Пример для Claude Code (`.mcp.json`):
@@ -1057,7 +1057,7 @@ jobs:
1057
1057
  - uses: actions/checkout@v4
1058
1058
  with:
1059
1059
  fetch-depth: 0
1060
- - uses: MyNameIsNikki/oc-pilot@v0.114.0
1060
+ - uses: MyNameIsNikki/oc-pilot@v0.114.2
1061
1061
  with:
1062
1062
  command: scan
1063
1063
  args: --base origin/${{ github.base_ref }} --fail-on-secrets
package/dist/cli.test.js CHANGED
@@ -1889,6 +1889,56 @@ test("preflight runs SAST on the changed files", () => {
1889
1889
  rmSync(dir, { recursive: true, force: true });
1890
1890
  }
1891
1891
  });
1892
+ test("preflight skips test fixtures in SAST and authz unless include-tests is set", () => {
1893
+ const dir = mkdtempSync(join(tmpdir(), "oc-pilot-cli-preflight-tests-fixtures-"));
1894
+ try {
1895
+ spawnSync("git", ["init", "-q"], { cwd: dir });
1896
+ writeFileSync(join(dir, "base.txt"), "x\n", "utf8");
1897
+ spawnSync("git", ["add", "base.txt"], { cwd: dir });
1898
+ spawnSync("git", ["-c", "user.email=test@example.com", "-c", "user.name=Test", "commit", "-qm", "init"], { cwd: dir });
1899
+ mkdirSync(join(dir, "src"), { recursive: true });
1900
+ const fixture = [
1901
+ 'const { exec } = require("child_process");',
1902
+ "exec(req.query.cmd);",
1903
+ 'app.get("/users/:id", (req, res) => res.send("x"));',
1904
+ "",
1905
+ ].join("\n");
1906
+ writeFileSync(join(dir, "src", "app.js"), "export const ok = 1;\n", "utf8");
1907
+ writeFileSync(join(dir, "src", "app.test.js"), fixture, "utf8");
1908
+ const patch = [
1909
+ "diff --git a/src/app.js b/src/app.js",
1910
+ "new file mode 100644",
1911
+ "--- /dev/null",
1912
+ "+++ b/src/app.js",
1913
+ "@@ -0,0 +1,1 @@",
1914
+ "+export const ok = 1;",
1915
+ "diff --git a/src/app.test.js b/src/app.test.js",
1916
+ "new file mode 100644",
1917
+ "--- /dev/null",
1918
+ "+++ b/src/app.test.js",
1919
+ "@@ -0,0 +1,3 @@",
1920
+ '+const { exec } = require("child_process");',
1921
+ "+exec(req.query.cmd);",
1922
+ '+app.get("/users/:id", (req, res) => res.send("x"));',
1923
+ "",
1924
+ ].join("\n");
1925
+ const diffPath = join(dir, "changes.diff");
1926
+ writeFileSync(diffPath, patch, "utf8");
1927
+ const skipped = runCli(["preflight", "--diff", diffPath, "--no-deps", "--no-slop", "--json", "--cwd", dir], dir);
1928
+ assert.equal(skipped.status, 0, skipped.stderr);
1929
+ const skippedPayload = JSON.parse(skipped.stdout);
1930
+ assert.equal(skippedPayload.checks.find((check) => check.id === "sast")?.status, "pass");
1931
+ assert.equal(skippedPayload.checks.find((check) => check.id === "authz")?.status, "pass");
1932
+ const included = runCli(["preflight", "--diff", diffPath, "--no-deps", "--no-slop", "--include-tests", "--json", "--cwd", dir], dir);
1933
+ assert.equal(included.status, 1, included.stderr);
1934
+ const includedPayload = JSON.parse(included.stdout);
1935
+ assert.equal(includedPayload.checks.find((check) => check.id === "sast")?.status, "fail");
1936
+ assert.equal(includedPayload.checks.find((check) => check.id === "authz")?.status, "fail");
1937
+ }
1938
+ finally {
1939
+ rmSync(dir, { recursive: true, force: true });
1940
+ }
1941
+ });
1892
1942
  test("preflight runs authz on changed routes", () => {
1893
1943
  const dir = mkdtempSync(join(tmpdir(), "oc-pilot-cli-preflight-authz-"));
1894
1944
  try {