Skip to content

Commit 5e9d2f9

Browse files
committed
Resolve conflicts and move bandwidth graph to diagnostics panel
2 parents d57e530 + fb081ab commit 5e9d2f9

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

59 files changed

+3823
-667
lines changed

.github/FUNDING.yml

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
# These are supported funding model platforms
2+
3+
#github: # Replace with up to 4 GitHub Sponsors-enabled usernames e.g., [user1, user2]
4+
#patreon: # Replace with a single Patreon username
5+
#open_collective: # Replace with a single Open Collective username
6+
#ko_fi: # Replace with a single Ko-fi username
7+
#tidelift: # Replace with a single Tidelift platform-name/package-name e.g., npm/babel
8+
#community_bridge: # Replace with a single Community Bridge project-name e.g., cloud-foundry
9+
#liberapay: # Replace with a single Liberapay username
10+
#issuehunt: # Replace with a single IssueHunt username
11+
#lfx_crowdfunding: # Replace with a single LFX Crowdfunding project-name e.g., cloud-foundry
12+
#polar: # Replace with a single Polar username
13+
#buy_me_a_coffee: # Replace with a single Buy Me a Coffee username
14+
#thanks_dev: # Replace with a single thanks.dev username
15+
#custom: # Replace with up to 4 custom sponsorship URLs e.g., ['link1', 'link2']
16+
17+
github: lklynet
18+
buy_me_a_coffee: lkly
19+
thanks_dev: lklynet

.github/badges/virustotal.json

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
{
2+
"schemaVersion": 1,
3+
"label": "VirusTotal",
4+
"message": "0/0 detections",
5+
"color": "brightgreen",
6+
"namedLogo": "virustotal"
7+
}

.github/workflows/virustotal.yml

Lines changed: 94 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,94 @@
1+
name: VirusTotal Scan
2+
3+
on:
4+
release:
5+
types: [published]
6+
workflow_dispatch:
7+
8+
jobs:
9+
virustotal:
10+
runs-on: ubuntu-latest
11+
permissions:
12+
contents: write
13+
14+
steps:
15+
- name: Checkout repository
16+
uses: actions/checkout@v4
17+
with:
18+
ref: ${{ github.ref_name }}
19+
20+
- name: Set up Docker Buildx
21+
uses: docker/setup-buildx-action@v3
22+
23+
- name: Build Docker image
24+
uses: docker/build-push-action@v5
25+
with:
26+
context: .
27+
push: false
28+
load: true
29+
tags: hypermind:scan
30+
31+
- name: Export Docker image
32+
run: |
33+
docker save hypermind:scan -o hypermind-image.tar
34+
gzip hypermind-image.tar
35+
36+
- name: Upload to VirusTotal
37+
id: virustotal
38+
uses: crazy-max/ghaction-virustotal@v4
39+
with:
40+
vt_api_key: ${{ secrets.VT_API_KEY }}
41+
files: |
42+
hypermind-image.tar.gz
43+
44+
- name: Get analysis results
45+
id: analysis
46+
env:
47+
VT_API_KEY: ${{ secrets.VT_API_KEY }}
48+
run: |
49+
ANALYSIS_URL="${{ steps.virustotal.outputs.analysis }}"
50+
ANALYSIS_ID=$(echo "$ANALYSIS_URL" | grep -oP 'analyses/\K[^"]+' | head -1)
51+
52+
sleep 60
53+
54+
RESULT=$(curl -s --request GET \
55+
--url "https://www.virustotal.com/api/v3/analyses/$ANALYSIS_ID" \
56+
--header "x-apikey: $VT_API_KEY")
57+
58+
MALICIOUS=$(echo "$RESULT" | jq -r '.data.attributes.stats.malicious // 0')
59+
TOTAL=$(echo "$RESULT" | jq -r '[.data.attributes.stats.malicious, .data.attributes.stats.undetected, .data.attributes.stats.harmless, .data.attributes.stats.suspicious] | add // 0')
60+
61+
if [ "$MALICIOUS" -eq 0 ]; then
62+
COLOR="brightgreen"
63+
MESSAGE="0/${TOTAL} detections"
64+
else
65+
COLOR="red"
66+
MESSAGE="${MALICIOUS}/${TOTAL} detections"
67+
fi
68+
69+
echo "malicious=$MALICIOUS" >> $GITHUB_OUTPUT
70+
echo "total=$TOTAL" >> $GITHUB_OUTPUT
71+
echo "color=$COLOR" >> $GITHUB_OUTPUT
72+
echo "message=$MESSAGE" >> $GITHUB_OUTPUT
73+
74+
- name: Update badge JSON
75+
run: |
76+
mkdir -p .github/badges
77+
cat > .github/badges/virustotal.json << EOF
78+
{
79+
"schemaVersion": 1,
80+
"label": "VirusTotal",
81+
"message": "${{ steps.analysis.outputs.message }}",
82+
"color": "${{ steps.analysis.outputs.color }}",
83+
"namedLogo": "virustotal"
84+
}
85+
EOF
86+
87+
- name: Commit badge update
88+
run: |
89+
git config user.name "github-actions[bot]"
90+
git config user.email "github-actions[bot]@users.noreply.github.com"
91+
git switch ${{ github.ref_name }}
92+
git add .github/badges/virustotal.json
93+
git diff --staged --quiet || git commit -m "Update VirusTotal badge [skip ci]"
94+
git push

.gitignore

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
node_modules
22
data
33
.DS_Store
4-
.env
4+
.env

Dockerfile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
FROM node:20-slim
1+
FROM node:24-slim
22

33
WORKDIR /app
44

@@ -7,8 +7,8 @@ COPY package*.json ./
77
RUN npm ci --omit=dev
88

99
COPY public/ ./public/
10-
COPY server.js hypermind2.svg LICENSE ./
1110
COPY src/ ./src/
11+
COPY server.js LICENSE ./
1212

1313
ENV PORT=3000
1414
ENV NODE_ENV=production

0 commit comments

Comments
 (0)