spectrum-cli 6.0.3 → 6.0.4
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 +6 -0
- package/package.json +1 -1
- package/src/security/scan.js +13 -2
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.4] - 2026-10-29
|
|
13
|
+
|
|
14
|
+
### Fixed
|
|
15
|
+
|
|
16
|
+
- В Skopeo передаётся ссылка repository@digest без tag: устранена ошибка Docker references with both a tag and digest. Исходный tag сохраняется в отчёте для поиска обновлений runtime; порт registry не изменяется.
|
|
17
|
+
|
|
12
18
|
## 🚀 [6.0.3] - 2026-10-29
|
|
13
19
|
|
|
14
20
|
### Fixed
|
package/package.json
CHANGED
package/src/security/scan.js
CHANGED
|
@@ -59,6 +59,17 @@ function runtimeFromDockerfile(text) {
|
|
|
59
59
|
ensure(last, "No runtime FROM found");
|
|
60
60
|
return last;
|
|
61
61
|
}
|
|
62
|
+
function skopeoImageReference(image) {
|
|
63
|
+
const at = image.indexOf("@");
|
|
64
|
+
if (at === -1) return image;
|
|
65
|
+
const name = image.slice(0, at),
|
|
66
|
+
digest = image.slice(at + 1);
|
|
67
|
+
ensure(DIGEST.test(digest), "Invalid runtime image digest");
|
|
68
|
+
const colon = name.lastIndexOf(":"),
|
|
69
|
+
slash = name.lastIndexOf("/");
|
|
70
|
+
// Strip the tag, never the registry port. Keep the original tag in report metadata.
|
|
71
|
+
return (colon > slash ? name.slice(0, colon) : name) + "@" + digest;
|
|
72
|
+
}
|
|
62
73
|
class Scanner {
|
|
63
74
|
constructor(env = process.env, deps = {}) {
|
|
64
75
|
this.env = env;
|
|
@@ -121,7 +132,7 @@ class Scanner {
|
|
|
121
132
|
"inspect",
|
|
122
133
|
"--format",
|
|
123
134
|
"{{.Digest}}",
|
|
124
|
-
"docker://" + image,
|
|
135
|
+
"docker://" + skopeoImageReference(image),
|
|
125
136
|
]).stdout.trim();
|
|
126
137
|
ensure(DIGEST.test(digest), "Registry did not return an image digest");
|
|
127
138
|
return image.split("@")[0] + "@" + digest;
|
|
@@ -143,7 +154,7 @@ class Scanner {
|
|
|
143
154
|
"--override-arch",
|
|
144
155
|
platform.split("/")[1],
|
|
145
156
|
"copy",
|
|
146
|
-
"docker://" + image,
|
|
157
|
+
"docker://" + skopeoImageReference(image),
|
|
147
158
|
"oci:" + imagePath + ":runtime",
|
|
148
159
|
]);
|
|
149
160
|
this.run([
|