Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Workflow for Intel Tiber Build and Validation Process #3

Merged
merged 1 commit into from
Jul 2, 2024
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
59 changes: 59 additions & 0 deletions .github/workflows/build_tiber.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
name: Docker Build

on:
workflow_call:
workflow_dispatch:
pull_request:
push:
branches: [ "main" ]

permissions:
contents: read

env:
BUILD_TYPE: "Release"
DOCKER_IMAGE_NAME: "docker.io/ovc/tiber-broadcast-suite"
DOCKER_IMAGE_TAG: "${{ github.sha }}"
DEBIAN_FRONTEND: "noninteractive"

jobs:
docker:
name: "Dockerfile build for Intel® Tiber™ Broadcast Suite"
runs-on: ubuntu-22.04
timeout-minutes: 120
steps:
- name: "Preparation: Harden Runner"
uses: step-security/harden-runner@17d0e2bd7d51742c71671bd19fa12bdc9d40a3d6 # v2.8.1
with:
egress-policy: audit

- name: "Preparation: Repository Checkout"
uses: actions/checkout@a5ac7e51b41094c92402da3b24376905380afc29 # v4.1.6

- name: "Configuration: QEMU for Docker setup"
uses: docker/setup-qemu-action@68827325e0b33c7199eb31dd4e31fbe9023e06e3 # v3.0.0

- name: "Configuration: Docker with Buildx Toolkit set up"
uses: docker/setup-buildx-action@d70bba72b1f3fd22344832f00baa16ece964efeb # v3.3.0
with:
buildkitd-flags: --debug

- name: "Validation: Build/Push Dokcerfile"
uses: docker/build-push-action@ca052bb54ab0790a636c9b5f226502c73d547a25 # v5.4.0
with:
file: Dockerfile
context: .
push: false
tags: "${{ env.DOCKER_IMAGE_NAME }}:${{ env.DOCKER_IMAGE_TAG }}"

- name: "Validation: Run Trivy vulnerability scanner on image"
uses: aquasecurity/trivy-action@595be6a0f6560a0a8fc419ddf630567fc623531d # v0.22.0
with:
image-ref: "${{ env.DOCKER_IMAGE_NAME }}:${{ env.DOCKER_IMAGE_TAG }}"
format: "sarif"
output: "trivy-image-scan-tiber-${{ env.DOCKER_IMAGE_TAG }}.sarif"

- name: "Finish: Upload Trivy scan results to GitHub Security tab"
uses: github/codeql-action/upload-sarif@2e230e8fe0ad3a14a340ad0815ddb96d599d2aff # v3.25.8
with:
sarif_file: "trivy-image-scan-tiber-${{ env.DOCKER_IMAGE_TAG }}.sarif"
6 changes: 4 additions & 2 deletions .github/workflows/ci_documentation_update.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ jobs:
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
runs-on: ubuntu-latest
runs-on: ubuntu-22.04
timeout-minutes: 20
steps:
- name: Secure the runner
Expand All @@ -27,7 +27,9 @@ jobs:
uses: actions/checkout@a5ac7e51b41094c92402da3b24376905380afc29 # v4.1.6

- name: Prepare operating system for documentation build
run: apt install make python3 python3-pip python3-sphinx
run: |
sudo apt-get update -y && \
sudo apt-get install -y --no-install-recommends make python3 python3-pip python3-sphinx

- name: Prepare environment for documentation build
run: python3 -m pip install sphinx_book_theme myst_parser sphinxcontrib.mermaid sphinx-copybutton
Expand Down
74 changes: 74 additions & 0 deletions .github/workflows/trivy.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,74 @@
name: Trivy for Intel® Tiber™ Broadcast Suite
on:
push:
workflow_call:
workflow_dispatch:
branches: [main]
pull_request:

env:
BUILD_TYPE: "Release"
DOCKER_IMAGE_NAME: "docker.io/ovc/tiber-broadcast-suite"
DOCKER_IMAGE_TAG: "${{ github.sha }}"
DEBIAN_FRONTEND: "noninteractive"

permissions:
contents: read

jobs:
checkout_code:
name: "Node Preparations for Intel® Tiber™ Broadcast Suite"
runs-on: ubuntu-22.04
steps:
- name: Harden Runner
uses: step-security/harden-runner@17d0e2bd7d51742c71671bd19fa12bdc9d40a3d6 # v2.8.1
with:
egress-policy: audit

- name: Checkout code
uses: actions/checkout@a5ac7e51b41094c92402da3b24376905380afc29 # v4.1.6

trivy-code-scan:
name: "Code-Scan for Intel® Tiber™ Broadcast Suite"
runs-on: ubuntu-22.04
needs: checkout_code
permissions:
contents: read
security-events: write
steps:
- name: Run Trivy 'config' type vulnerability scanner.
uses: aquasecurity/trivy-action@595be6a0f6560a0a8fc419ddf630567fc623531d # v0.22.0
with:
scan-type: 'config'
hide-progress: false
ignore-unfixed: true
format: 'sarif'
output: 'trivy-config-tiber-results.sarif'
severity: 'CRITICAL,HIGH,MEDIUM'

- name: Upload Trivy scan results to GitHub Security tab
uses: github/codeql-action/upload-sarif@2e230e8fe0ad3a14a340ad0815ddb96d599d2aff # v3.25.8
with:
sarif_file: 'trivy-config-tiber-results.sarif'

trivy-fs-scan:
name: "Code-FS-Scan for Intel® Tiber™ Broadcast Suite"
runs-on: ubuntu-22.04
needs: checkout_code
permissions:
contents: read
security-events: write
steps:
- name: Run Trivy 'fs' type vulnerability scanner.
uses: aquasecurity/trivy-action@595be6a0f6560a0a8fc419ddf630567fc623531d # v0.22.0
with:
scan-type: 'fs'
ignore-unfixed: true
format: 'sarif'
output: 'trivy-fs-tiber-results.sarif'
severity: 'CRITICAL,HIGH,MEDIUM'

- name: Upload Trivy scan results to GitHub Security tab
uses: github/codeql-action/upload-sarif@2e230e8fe0ad3a14a340ad0815ddb96d599d2aff # v3.25.8
with:
sarif_file: 'trivy-fs-tiber-results.sarif'
Loading