mirror of
https://github.com/freedomofpress/dangerzone.git
synced 2025-05-05 13:11:49 +02:00
Compare commits
4 commits
e75988f2f4
...
b84463a6ce
Author | SHA1 | Date | |
---|---|---|---|
![]() |
b84463a6ce | ||
![]() |
19eba9ec94 | ||
![]() |
cee13ad9a0 | ||
![]() |
9eb87aa652 |
1 changed files with 30 additions and 2 deletions
32
.github/workflows/scan_released.yml
vendored
32
.github/workflows/scan_released.yml
vendored
|
@ -10,20 +10,41 @@ jobs:
|
||||||
strategy:
|
strategy:
|
||||||
matrix:
|
matrix:
|
||||||
include:
|
include:
|
||||||
# - runs-on: ubuntu-latest
|
- runs-on: ubuntu-latest
|
||||||
# arch: i686
|
arch: i686
|
||||||
- runs-on: macos-latest
|
- runs-on: macos-latest
|
||||||
arch: arm64
|
arch: arm64
|
||||||
runs-on: ${{ matrix.runs-on }}
|
runs-on: ${{ matrix.runs-on }}
|
||||||
|
defaults:
|
||||||
|
run:
|
||||||
|
shell: bash
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout
|
- name: Checkout
|
||||||
uses: actions/checkout@v4
|
uses: actions/checkout@v4
|
||||||
|
|
||||||
|
- name: Setup Docker and Colima (macOS only)
|
||||||
|
if: runner.os == 'macOS'
|
||||||
|
run: |
|
||||||
|
brew install docker colima
|
||||||
|
colima start
|
||||||
|
# Wait for Docker daemon to be ready
|
||||||
|
timeout=30
|
||||||
|
while ! docker info >/dev/null 2>&1; do
|
||||||
|
if [ $timeout -le 0 ]; then
|
||||||
|
echo "Timed out waiting for Docker daemon"
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
timeout=$((timeout-1))
|
||||||
|
sleep 1
|
||||||
|
done
|
||||||
|
|
||||||
- name: Download container image for the latest release and load it
|
- name: Download container image for the latest release and load it
|
||||||
run: |
|
run: |
|
||||||
VERSION=$(curl https://api.github.com/repos/freedomofpress/dangerzone/releases/latest | grep "tag_name" | cut -d '"' -f 4)
|
VERSION=$(curl https://api.github.com/repos/freedomofpress/dangerzone/releases/latest | grep "tag_name" | cut -d '"' -f 4)
|
||||||
CONTAINER_FILENAME=container-${VERSION:1}-${{ matrix.arch }}.tar.gz
|
CONTAINER_FILENAME=container-${VERSION:1}-${{ matrix.arch }}.tar.gz
|
||||||
wget https://github.com/freedomofpress/dangerzone/releases/download/${VERSION}/${CONTAINER_FILENAME} -O ${CONTAINER_FILENAME}
|
wget https://github.com/freedomofpress/dangerzone/releases/download/${VERSION}/${CONTAINER_FILENAME} -O ${CONTAINER_FILENAME}
|
||||||
docker load -i ${CONTAINER_FILENAME}
|
docker load -i ${CONTAINER_FILENAME}
|
||||||
|
|
||||||
# NOTE: Scan first without failing, else we won't be able to read the scan
|
# NOTE: Scan first without failing, else we won't be able to read the scan
|
||||||
# report.
|
# report.
|
||||||
- name: Scan container image (no fail)
|
- name: Scan container image (no fail)
|
||||||
|
@ -34,13 +55,16 @@ jobs:
|
||||||
fail-build: false
|
fail-build: false
|
||||||
only-fixed: false
|
only-fixed: false
|
||||||
severity-cutoff: critical
|
severity-cutoff: critical
|
||||||
|
|
||||||
- name: Upload container scan report
|
- name: Upload container scan report
|
||||||
uses: github/codeql-action/upload-sarif@v3
|
uses: github/codeql-action/upload-sarif@v3
|
||||||
with:
|
with:
|
||||||
sarif_file: ${{ steps.scan_container.outputs.sarif }}
|
sarif_file: ${{ steps.scan_container.outputs.sarif }}
|
||||||
category: container-${{ matrix.arch }}
|
category: container-${{ matrix.arch }}
|
||||||
|
|
||||||
- name: Inspect container scan report
|
- name: Inspect container scan report
|
||||||
run: cat ${{ steps.scan_container.outputs.sarif }}
|
run: cat ${{ steps.scan_container.outputs.sarif }}
|
||||||
|
|
||||||
- name: Scan container image
|
- name: Scan container image
|
||||||
uses: anchore/scan-action@v5
|
uses: anchore/scan-action@v5
|
||||||
with:
|
with:
|
||||||
|
@ -49,6 +73,10 @@ jobs:
|
||||||
only-fixed: false
|
only-fixed: false
|
||||||
severity-cutoff: critical
|
severity-cutoff: critical
|
||||||
|
|
||||||
|
- name: Cleanup Colima (macOS only)
|
||||||
|
if: runner.os == 'macOS'
|
||||||
|
run: colima stop
|
||||||
|
|
||||||
security-scan-app:
|
security-scan-app:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
|
|
Loading…
Reference in a new issue