Skip to content

Align the 0.3.0 release with schema revision 2 #14

Align the 0.3.0 release with schema revision 2

Align the 0.3.0 release with schema revision 2 #14

Workflow file for this run

name: Security
on:
pull_request:
push:
branches: [main]
schedule:
- cron: '23 8 * * 1'
workflow_dispatch:
permissions:
contents: read
concurrency:
group: security-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: true
jobs:
dependency-review:
if: github.event_name == 'pull_request'
runs-on: ubuntu-latest
timeout-minutes: 5
steps:
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
- uses: actions/dependency-review-action@a1d282b36b6f3519aa1f3fc636f609c47dddb294 # v4
with:
fail-on-severity: high
source-security:
runs-on: ubuntu-latest
timeout-minutes: 15
steps:
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
- name: Scan dependencies and secrets
uses: aquasecurity/trivy-action@ed142fd0673e97e23eac54620cfb913e5ce36c25 # v0.36.0
with:
version: v0.74.0
scan-type: fs
scanners: vuln,secret
severity: HIGH,CRITICAL
ignore-unfixed: true
exit-code: '1'
- name: Install Helm
uses: azure/setup-helm@1a275c3b69536ee54be43f2070a358922e12c8d4 # v4
with:
version: v3.18.6
- name: Prepare modules, Dockerfile and rendered charts for policy scanning
run: |
target="$RUNNER_TEMP/pig-config"
mkdir -p "$target"
cp -R modules "$target/modules"
cp supervisor/Dockerfile "$target/Dockerfile"
digest="sha256:$(printf 'a%.0s' {1..64})"
helm template pig-supervisor charts/pig-supervisor --namespace pig-system --include-crds \
--set-string "image.digest=$digest" > "$target/supervisor.yaml"
helm template pig-analyzer charts/instruction-hub-worker --namespace pig --include-crds \
--set-string "image.digest=$digest" \
--set-string instructionHub.runtimeBaseUrl=https://runtime.example.com \
--set-string instructionHub.deploymentInstanceId=ci \
--set-string instructionHub.configHash=ci \
--set-string instructionHub.traceObjectS3Bucket=ci-traces \
--set-string secrets.existingSecretName=pig-credentials > "$target/analyzer.yaml"
- name: Scan infrastructure configuration
uses: aquasecurity/trivy-action@ed142fd0673e97e23eac54620cfb913e5ce36c25 # v0.36.0
with:
version: v0.74.0
scan-type: config
scan-ref: ${{ runner.temp }}/pig-config
trivyignores: .github/trivyignore.yaml
severity: HIGH,CRITICAL
exit-code: '1'
image-security:
runs-on: ubuntu-latest
timeout-minutes: 15
steps:
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
- run: docker build -f supervisor/Dockerfile -t pig-supervisor:security .
- name: Scan supervisor runtime image
uses: aquasecurity/trivy-action@ed142fd0673e97e23eac54620cfb913e5ce36c25 # v0.36.0
with:
version: v0.74.0
image-ref: pig-supervisor:security
scanners: vuln
severity: HIGH,CRITICAL
ignore-unfixed: true
exit-code: '1'