Skip to content

Commit

Permalink
CI: Update container scanning to account for the arm64 architecture.
Browse files Browse the repository at this point in the history
  • Loading branch information
almet committed Oct 17, 2024
1 parent a95b612 commit b239503
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 6 deletions.
13 changes: 10 additions & 3 deletions .github/workflows/scan_released.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,14 +6,21 @@ on:

jobs:
security-scan-container:
runs-on: ubuntu-latest
strategy:
matrix:
include:
- runs-on: ubuntu-latest
arch: i686
- runs-on: macos-latest
arch: arm64
runs-on: ${{ matrix.runs-on }}
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Download container image for the latest release
run: |
VERSION=$(curl https://api.github.com/repos/freedomofpress/dangerzone/releases/latest | jq -r '.tag_name')
wget https://github.com/freedomofpress/dangerzone/releases/download/${VERSION}/container.tar.gz
wget https://github.com/freedomofpress/dangerzone/releases/download/${VERSION}/container.${{ matrix.arch }}.tar.gz -O container.tar.gz
- name: Load container image
run: docker load -i container.tar.gz
# NOTE: Scan first without failing, else we won't be able to read the scan
Expand All @@ -30,7 +37,7 @@ jobs:
uses: github/codeql-action/upload-sarif@v3
with:
sarif_file: ${{ steps.scan_container.outputs.sarif }}
category: container
category: container-${{ matrix.arch }}
- name: Inspect container scan report
run: cat ${{ steps.scan_container.outputs.sarif }}
- name: Scan container image
Expand Down
8 changes: 5 additions & 3 deletions RELEASE.md
Original file line number Diff line number Diff line change
Expand Up @@ -397,12 +397,14 @@ or create your own locally with:
cd dangerzone
```

Build the latest container:
Build the latest container, on both architectures:

```sh
python3 ./install/common/build-image.py
```

Rename the container images to `dangerzone.i686.tar.gz` and `dangerzone.arm64.tar.gz`.

Create a .rpm:

```sh
Expand Down Expand Up @@ -449,9 +451,9 @@ To publish the release:
* Copy the release notes text from the template at [`docs/templates/release-notes`](https://github.com/freedomofpress/dangerzone/tree/main/docs/templates/)
* You can use `./dev_scripts/upload-asset.py`, if you want to upload an asset
using an access token.
- [ ] Upload the `container.tar.gz` i686 image that was created in the previous step
- [ ] Upload the `container.i686.tar.gz` and `container.arm64.tar.gz` images that were created in the previous step

**Important:** Make sure that it's the same container image as the ones that
**Important:** Make sure that it's the same container images as the ones that
are shipped in other platforms (see our [Pre-release](#Pre-release) section)

- [ ] Upload the detached signatures (.asc) and checksum file.
Expand Down

0 comments on commit b239503

Please sign in to comment.