Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/build/release-docker.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
set -e

HELP="Args:
-v - Semver (3.4.0)
-v - Semver (3.4.1)
-d - Build image repository (Ex: -d redisinsight)
-r - Target repository (Ex: -r redis/redisinsight)
"
Expand Down
47 changes: 36 additions & 11 deletions .github/workflows/virustotal.yml
Original file line number Diff line number Diff line change
Expand Up @@ -50,8 +50,19 @@ jobs:
# Get list of artifacts
ARTIFACTS=$(ls ./release)

# Conver list to json
ARTIFACTS_JSON=$(echo "$ARTIFACTS" | jq -R -s -c 'split("\n")[:-1]')
# Convert list to json.
# linux-builds is split into two virtual scans (x86_64 and arm64) because
# the combined zip exceeds VirusTotal's ~650MB upload limit once arm64
# binaries are included. Both virtual scans still download the same
# linux-builds artifact; the split happens at zip time via file filters.
ARTIFACTS_JSON=$(echo "$ARTIFACTS" | jq -R -s -c '
split("\n")[:-1]
| reduce .[] as $a ([];
if $a == "linux-builds"
then . + ["linux-x86_64-builds", "linux-arm64-builds"]
else . + [$a]
end)
')

echo "artifact_exists=true" >> $GITHUB_OUTPUT
echo "artifact_names=$ARTIFACTS_JSON" >> $GITHUB_OUTPUT
Expand All @@ -71,27 +82,41 @@ jobs:
if: needs.download_artifacts.outputs.artifact_exists == 'true'
uses: actions/download-artifact@v4
with:
name: ${{ matrix.artifact }}
# linux-x86_64-builds and linux-arm64-builds are virtual scan entries;
# both resolve to the single linux-builds artifact uploaded by the build.
name: ${{ (matrix.artifact == 'linux-x86_64-builds' || matrix.artifact == 'linux-arm64-builds') && 'linux-builds' || matrix.artifact }}
path: ./release

- name: Send File to scan
if: needs.download_artifacts.outputs.artifact_exists == 'true'
run: |
uploadZipFile="./${{ matrix.artifact }}.zip"

# Compress artifactes
zip -r "${uploadZipFile}" "./release" ${{ startsWith(matrix.artifact, 'macos-') && '-x "*/redisstack/*" "*.tar.gz" "*.zip"' || '' }}
# Compress artifacts. Per-scan exclusions keep each zip under
# VirusTotal's ~650MB /files/upload_url limit:
# - macos-* : exclude bundled redisstack and archives
# - linux-x86_64-builds: exclude arm64/aarch64 binaries
# - linux-arm64-builds : exclude x86_64/amd64 binaries
zip -r "${uploadZipFile}" "./release" \
${{ startsWith(matrix.artifact, 'macos-') && '-x "*/redisstack/*" "*.tar.gz" "*.zip"' || '' }} \
${{ matrix.artifact == 'linux-x86_64-builds' && '-x "*arm64*" "*aarch64*"' || '' }} \
${{ matrix.artifact == 'linux-arm64-builds' && '-x "*x86_64*" "*amd64*"' || '' }}

echo "File to upload: ${uploadZipFile} ($(du -h "${uploadZipFile}" | cut -f1))"

# Generate url to download zip file
uploadUrl=$(curl -sq -XGET https://www.virustotal.com/api/v3/files/upload_url -H "x-apikey: $VIRUSTOTAL_API_KEY" | jq -r '.data')

echo "File to upload: ${uploadZipFile}"

# Upload zip file to VirusTotal
analysedId=$(curl -sq -XPOST "${uploadUrl}" -H "x-apikey: $VIRUSTOTAL_API_KEY" --form file=@"${uploadZipFile}" | jq -r '.data.id')
# Upload zip file to VirusTotal. Capture the raw response so a non-JSON
# error (e.g. payload too large) produces a readable log instead of a
# cryptic "jq: parse error".
uploadResponse=$(curl -sq -XPOST "${uploadUrl}" -H "x-apikey: $VIRUSTOTAL_API_KEY" --form file=@"${uploadZipFile}")
analysedId=$(echo "$uploadResponse" | jq -r '.data.id' 2>/dev/null || true)

if [ $analysedId == "null" ]; then
echo 'Status is null, something went wrong';
if [ -z "$analysedId" ] || [ "$analysedId" == "null" ]; then
echo 'VirusTotal upload failed. Raw response (first 2KB):'
echo "$uploadResponse" | head -c 2048
echo
exit 1;
fi

Expand Down
2 changes: 1 addition & 1 deletion redisinsight/api/config/default.ts
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,7 @@ export default {
: true,
buildType: process.env.RI_BUILD_TYPE || 'DOCKER_ON_PREMISE',
appType: process.env.RI_APP_TYPE,
appVersion: process.env.RI_APP_VERSION || '3.4.0',
appVersion: process.env.RI_APP_VERSION || '3.4.1',
requestTimeout: parseInt(process.env.RI_REQUEST_TIMEOUT, 10) || 25000,
excludeRoutes: [],
excludeAuthRoutes: [],
Expand Down
2 changes: 1 addition & 1 deletion redisinsight/api/config/swagger.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ const SWAGGER_CONFIG: Omit<OpenAPIObject, 'paths'> = {
info: {
title: 'Redis Insight Backend API',
description: 'Redis Insight Backend API',
version: '3.4.0',
version: '3.4.1',
},
tags: [],
};
Expand Down
2 changes: 1 addition & 1 deletion redisinsight/api/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "redisinsight-api",
"version": "3.4.0",
"version": "3.4.1",
"description": "Redis Insight API",
"private": true,
"author": {
Expand Down
2 changes: 1 addition & 1 deletion redisinsight/desktop/src/lib/aboutPanel/aboutPanel.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ const ICON_PATH = app.isPackaged
: path.join(__dirname, '../resources', 'icon.png')

const appVersionPrefix = config.isEnterprise ? 'Enterprise - ' : ''
const appVersion = app.getVersion() || '3.4.0'
const appVersion = app.getVersion() || '3.4.1'
const appVersionSuffix = !config.isProduction
? `-dev-${process.getCreationTime()}`
: ''
Expand Down
2 changes: 1 addition & 1 deletion redisinsight/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"appName": "Redis Insight",
"productName": "RedisInsight",
"private": true,
"version": "3.4.0",
"version": "3.4.1",
"description": "Redis Insight",
"main": "./dist/main/main.js",
"author": {
Expand Down
Loading