spectrum-cli 6.0.2 → 6.0.3

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 CHANGED
@@ -9,6 +9,12 @@ This is the changelog of the `spectrum-cli` npm package. Its version comes from
9
9
  `package.json`; the release commands use Git tags and `CHANGELOG.md` in the
10
10
  **target project** and do not update that project's `package.json`.
11
11
 
12
+ ## 🚀 [6.0.3] - 2026-10-29
13
+
14
+ ### Fixed
15
+
16
+ - Начальный и повторный npm audit явно используют https://registry.npmjs.org/; удалены Nexus-авторизация аудита и глобальная подмена npm registry. Установка зависимостей сохраняет настройки проекта.
17
+
12
18
  ## 🚀 [6.0.2] - 2026-10-29
13
19
 
14
20
  ### Fixed
package/README.md CHANGED
@@ -614,11 +614,16 @@ fixtures получены из прежнего Python-кода; исполня
614
614
 
615
615
  ### npm registry и проверка runtime
616
616
 
617
- `NIGHTLY_NPM_REGISTRY` задаёт доверенный HTTPS registry для npm-команд ночного процесса. При наличии
618
- `NEXUS_USER` / `NEXUS_PASSWORD` CLI создаёт временный `.npmrc` с BASIC auth, ограниченной host/path этого registry.
619
- Существующий user config сохраняется, исходный файл не меняется. Временный файл имеет права `0600`, удаляется
620
- после команды и не входит в отчёт. URL registry передаётся CI-компонентом; значения инфраструктуры в CLI не зашиты.
621
- Ошибки npm сохраняют HTTP-код и причину, при этом credentials удаляются из диагностических сообщений.
617
+ `security scan` и повторный audit после исправлений всегда вызывают:
618
+
619
+ ```sh
620
+ npm audit --registry=https://registry.npmjs.org/ --omit=dev --audit-level=high --json
621
+ ```
622
+
623
+ Публичный registry указан прямо в argv команды, как в локальном алиасе `na`. Nexus-авторизация для аудита
624
+ не создаётся. Настройки registry в проектном `.npmrc` и user config не меняются: установка и обновление
625
+ зависимостей продолжают использовать конфигурацию проекта. Порог ночного процесса — HIGH/CRITICAL.
626
+ Ошибки audit сохраняют HTTP-код и причину с удалением credentials из диагностических сообщений.
622
627
 
623
628
  Для версии Node из runtime нужны Skopeo, umoci и chroot. CLI копирует выбранную платформу immutable OCI-образа,
624
629
  распаковывает rootfs в rootless-режиме и запускает только настроенный Node binary с `--version` от uid/gid 65534.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "spectrum-cli",
3
- "version": "6.0.2",
3
+ "version": "6.0.3",
4
4
  "description": "🚀 Modern CLI for development workflow automation - release management, versioning, and changelog generation",
5
5
  "main": "index.js",
6
6
  "bin": {
@@ -90,45 +90,6 @@ async function registryAuth(env, action) {
90
90
  ).toString("base64"),
91
91
  };
92
92
  const runtime = { ...env };
93
- if (env.NIGHTLY_NPM_REGISTRY && env.NIGHTLY_NPM_ENABLED !== "false") {
94
- let registry;
95
- try {
96
- registry = new URL(env.NIGHTLY_NPM_REGISTRY);
97
- } catch {
98
- throw new Error("NIGHTLY_NPM_REGISTRY must be an HTTPS registry URL");
99
- }
100
- ensure(
101
- registry.protocol === "https:" &&
102
- !registry.username &&
103
- !registry.password &&
104
- !registry.search &&
105
- !registry.hash,
106
- "NIGHTLY_NPM_REGISTRY must be an HTTPS registry URL",
107
- );
108
- runtime.NPM_CONFIG_REGISTRY = registry.href;
109
- if (env.NEXUS_USER && env.NEXUS_PASSWORD) {
110
- const userconfig =
111
- env.NPM_CONFIG_USERCONFIG ||
112
- env.npm_config_userconfig ||
113
- path.join(require("node:os").homedir(), ".npmrc");
114
- const existing = fs.existsSync(userconfig)
115
- ? fs.readFileSync(userconfig, "utf8")
116
- : "";
117
- const scope =
118
- "//" + registry.host + registry.pathname.replace(/\/?$/, "/");
119
- const auth = Buffer.from(
120
- env.NEXUS_USER + ":" + env.NEXUS_PASSWORD,
121
- ).toString("base64");
122
- const file = path.join(directory, "npmrc");
123
- fs.writeFileSync(
124
- file,
125
- existing.trimEnd() + "\n" + scope + ":_auth=" + auth + "\n",
126
- { mode: 0o600 },
127
- );
128
- runtime.NPM_CONFIG_USERCONFIG = file;
129
- delete runtime.npm_config_userconfig;
130
- }
131
- }
132
93
  if (Object.keys(auths).length) {
133
94
  const file = path.join(directory, "config.json");
134
95
  fs.writeFileSync(file, JSON.stringify({ auths }), { mode: 0o600 });
@@ -69,7 +69,14 @@ class Scanner {
69
69
  }
70
70
  async auditNpm(root, evidence) {
71
71
  const proc = this.run(
72
- ["npm", "audit", "--omit=dev", "--audit-level=high", "--json"],
72
+ [
73
+ "npm",
74
+ "audit",
75
+ "--registry=https://registry.npmjs.org/",
76
+ "--omit=dev",
77
+ "--audit-level=high",
78
+ "--json",
79
+ ],
73
80
  root,
74
81
  { allowed: [0, 1] },
75
82
  );