@codacy/tools-trivy-0 0.24.0 → 0.25.0
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/dist/index.js +9 -4
- package/package.json +2 -2
package/dist/index.js
CHANGED
|
@@ -597,7 +597,11 @@ var PLATFORM_MAP = {
|
|
|
597
597
|
"linux-arm64": "Linux-ARM64",
|
|
598
598
|
// Windows ships a `.zip` (trivy_{version}_windows-64bit.zip) with `trivy.exe`
|
|
599
599
|
// at the archive root — handled in install (extension + exeName).
|
|
600
|
-
"win32-x64": "windows-64bit"
|
|
600
|
+
"win32-x64": "windows-64bit",
|
|
601
|
+
// Trivy publishes no Windows ARM64 build; Windows on ARM runs the x64 binary
|
|
602
|
+
// under emulation, so use it rather than reporting the platform unsupported
|
|
603
|
+
// (the descriptor already declares arm64).
|
|
604
|
+
"win32-arm64": "windows-64bit"
|
|
601
605
|
};
|
|
602
606
|
async function getVersionFromBinary(binaryPath) {
|
|
603
607
|
try {
|
|
@@ -1022,8 +1026,9 @@ var adapter = {
|
|
|
1022
1026
|
/**
|
|
1023
1027
|
* Downloads trivy from GitHub releases and extracts it to ctx.toolInstallDir.
|
|
1024
1028
|
*
|
|
1025
|
-
* Detects the current platform/arch and downloads the
|
|
1026
|
-
* Sets executable permission after
|
|
1029
|
+
* Detects the current platform/arch and downloads the matching archive
|
|
1030
|
+
* (`.zip` on Windows, `.tar.gz` elsewhere). Sets executable permission after
|
|
1031
|
+
* extraction (not needed on Windows).
|
|
1027
1032
|
*/
|
|
1028
1033
|
async install(ctx) {
|
|
1029
1034
|
ctx.logger.info("Starting install", { toolId: TOOL_ID });
|
|
@@ -1042,7 +1047,7 @@ var adapter = {
|
|
|
1042
1047
|
};
|
|
1043
1048
|
}
|
|
1044
1049
|
const version = adapter.preferredVersion;
|
|
1045
|
-
const archiveExt =
|
|
1050
|
+
const archiveExt = ctx.platform.os === "win32" ? "zip" : "tar.gz";
|
|
1046
1051
|
const url = `https://github.com/aquasecurity/trivy/releases/download/v${version}/trivy_${version}_${platformSuffix}.${archiveExt}`;
|
|
1047
1052
|
const destPath = import_path.default.join(ctx.toolInstallDir, (0, import_tooling.exeName)(BINARY));
|
|
1048
1053
|
try {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@codacy/tools-trivy-0",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.25.0",
|
|
4
4
|
"description": "Trivy adapter — CLI-mode security scanner",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"types": "dist/index.d.ts",
|
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
"dist"
|
|
9
9
|
],
|
|
10
10
|
"dependencies": {
|
|
11
|
-
"@codacy/tooling": "0.
|
|
11
|
+
"@codacy/tooling": "0.25.0"
|
|
12
12
|
},
|
|
13
13
|
"license": "MIT",
|
|
14
14
|
"author": "Codacy <support@codacy.com> (https://www.codacy.com)",
|