Compare commits
4 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 11f6b1bcc9 | |||
| 06d40fdbc8 | |||
| 043ed9ce45 | |||
| c9627e51a2 |
@@ -51,9 +51,34 @@ jobs:
|
|||||||
docker push git.codeanddice.ru/toutsu/gmrelay-web:latest
|
docker push git.codeanddice.ru/toutsu/gmrelay-web:latest
|
||||||
docker push git.codeanddice.ru/toutsu/gmrelay-web:${{ env.VERSION }}
|
docker push git.codeanddice.ru/toutsu/gmrelay-web:${{ env.VERSION }}
|
||||||
|
|
||||||
|
# ЧАСТЬ 1.5: Сканируем собранные образы на уязвимости
|
||||||
|
scan-images:
|
||||||
|
needs: build-and-push
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
steps:
|
||||||
|
- name: Install Trivy
|
||||||
|
run: |
|
||||||
|
curl -sfL https://raw.githubusercontent.com/aquasecurity/trivy/main/contrib/install.sh | sh -s -- -b /usr/local/bin
|
||||||
|
|
||||||
|
- name: Scan Bot image
|
||||||
|
run: |
|
||||||
|
trivy image \
|
||||||
|
--severity HIGH,CRITICAL \
|
||||||
|
--exit-code 1 \
|
||||||
|
--format table \
|
||||||
|
git.codeanddice.ru/toutsu/gmrelay-bot:${{ env.VERSION }}
|
||||||
|
|
||||||
|
- name: Scan Web image
|
||||||
|
run: |
|
||||||
|
trivy image \
|
||||||
|
--severity HIGH,CRITICAL \
|
||||||
|
--exit-code 1 \
|
||||||
|
--format table \
|
||||||
|
git.codeanddice.ru/toutsu/gmrelay-web:${{ env.VERSION }}
|
||||||
|
|
||||||
# ЧАСТЬ 2: Запускаем эти образы на самом сервере
|
# ЧАСТЬ 2: Запускаем эти образы на самом сервере
|
||||||
deploy:
|
deploy:
|
||||||
needs: build-and-push
|
needs: scan-images
|
||||||
runs-on: ubuntu-latest # Тот же локальный раннер
|
runs-on: ubuntu-latest # Тот же локальный раннер
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout repository
|
- name: Checkout repository
|
||||||
|
|||||||
@@ -61,15 +61,15 @@ jobs:
|
|||||||
fi
|
fi
|
||||||
exit "${trivy_exit}"
|
exit "${trivy_exit}"
|
||||||
|
|
||||||
# ── Build ──
|
# ── Build (includes SAST via SecurityCodeScan Roslyn analyzer) ──
|
||||||
|
|
||||||
- name: Build Shared
|
- name: Build Shared
|
||||||
run: dotnet build src/GmRelay.Shared/GmRelay.Shared.csproj --no-restore
|
run: dotnet build src/GmRelay.Shared/GmRelay.Shared.csproj --no-restore
|
||||||
|
|
||||||
- name: Build Bot (compile check)
|
- name: Build Bot (compile check, includes SAST)
|
||||||
run: dotnet build src/GmRelay.Bot/GmRelay.Bot.csproj --no-restore
|
run: dotnet build src/GmRelay.Bot/GmRelay.Bot.csproj --no-restore
|
||||||
|
|
||||||
- name: Build Web (compile check)
|
- name: Build Web (compile check, includes SAST)
|
||||||
run: dotnet build src/GmRelay.Web/GmRelay.Web.csproj --no-restore
|
run: dotnet build src/GmRelay.Web/GmRelay.Web.csproj --no-restore
|
||||||
|
|
||||||
# ── Tests ──
|
# ── Tests ──
|
||||||
|
|||||||
BIN
Binary file not shown.
@@ -8,4 +8,8 @@
|
|||||||
<TreatWarningsAsErrors>true</TreatWarningsAsErrors>
|
<TreatWarningsAsErrors>true</TreatWarningsAsErrors>
|
||||||
<RestorePackagesWithLockFile>true</RestorePackagesWithLockFile>
|
<RestorePackagesWithLockFile>true</RestorePackagesWithLockFile>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
|
|
||||||
|
<ItemGroup>
|
||||||
|
<PackageReference Include="SecurityCodeScan.VS2019" Version="5.6.7" PrivateAssets="all" />
|
||||||
|
</ItemGroup>
|
||||||
</Project>
|
</Project>
|
||||||
|
|||||||
Reference in New Issue
Block a user