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

🧹 Enable dependabot PRs #556

Merged
merged 11 commits into from
Oct 5, 2022
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
12 changes: 11 additions & 1 deletion .github/workflows/integration-tests.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,16 +8,24 @@ on:
secrets:
MONDOO_CLIENT:
required: true
workflow_run:
workflows: ["Unit Tests"]
types:
- completed

env:
MONDOO_CLIENT_IMAGE_TAG: ${{ github.event.inputs.mondooClientImageTag }}

# https://docs.github.com/en/actions/security-guides/automatic-token-authentication#permissions-for-the-github_token
permissions:
contents: read
# Attention: These jobs still have access to all the secrets when triggered by a workflow_run event.

jobs:
integration-tests:
runs-on: ubuntu-latest
name: Integration tests

if: github.event.workflow_run.conclusion == 'success' || github.event_name == 'workflow_call'
strategy:
fail-fast: false
matrix:
Expand All @@ -27,6 +35,8 @@ jobs:
steps:
- uses: actions/checkout@v3
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
persist-credentials: false
fetch-depth: 0 # fetch is nneded for "git tag --list" in the Makefile
- name: Import environment variables from file
run: cat ".github/env" >> $GITHUB_ENV
Expand Down
51 changes: 51 additions & 0 deletions .github/workflows/security-tests.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
name: Security Tests
on:
workflow_call:
secrets:
MONDOO_CLIENT:
required: true
workflow_run:
workflows: ["Unit Tests"]
types:
- completed

# https://docs.github.com/en/actions/security-guides/automatic-token-authentication#permissions-for-the-github_token
permissions:
contents: read
# Attention: These jobs still have access to all the secrets when triggered by a workflow_run event.

jobs:
security-tests:
runs-on: ubuntu-latest
name: Security tests
if: github.event.workflow_run.conclusion == 'success' || github.event_name == 'workflow_call'
env:
# Use docker.io for Docker Hub if empty
REGISTRY: ghcr.io
# github.repository as <account>/<repo>
IMAGE_NAME: ${{ github.repository }}
RELEASE: ${{ github.ref_name }}
steps:
- uses: actions/checkout@v3
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
persist-credentials: false
- name: Import environment variables from file
run: cat ".github/env" >> $GITHUB_ENV
- name: Scan AWS terraform with Mondoo
uses: mondoohq/actions/terraform@main
with:
service-account-credentials: ${{ secrets.MONDOO_CLIENT }}
path: ".github/terraform/aws/main.tf"
- name: Scan Azure terraform with Mondoo
uses: mondoohq/actions/terraform@main
with:
service-account-credentials: ${{ secrets.MONDOO_CLIENT }}
path: ".github/terraform/aks/main.tf"
- name: Generate manifests
run: make generate-manifests IMG='${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:${{ env.RELEASE }}'
- name: Scan Kubernetes Manifest with Mondoo
uses: mondoohq/actions/k8s-manifest@main
with:
service-account-credentials: ${{ secrets.MONDOO_CLIENT }}
path: "mondoo-operator-manifests.yaml"
44 changes: 4 additions & 40 deletions .github/workflows/tests.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Tests
name: Unit Tests
on:
pull_request:
push:
Expand All @@ -14,6 +14,9 @@ jobs:
name: Unit tests
steps:
- uses: actions/checkout@v3
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
persist-credentials: false
- name: Import environment variables from file
run: cat ".github/env" >> $GITHUB_ENV
- uses: actions/setup-go@v2
Expand All @@ -35,43 +38,4 @@ jobs:
with:
name: test-results
path: unit-tests.xml
security-tests:
needs: [unit-tests]
runs-on: ubuntu-latest
name: Security tests
env:
# Use docker.io for Docker Hub if empty
REGISTRY: ghcr.io
# github.repository as <account>/<repo>
IMAGE_NAME: ${{ github.repository }}
RELEASE: ${{ github.ref_name }}
steps:
- uses: actions/checkout@v3
- name: Import environment variables from file
run: cat ".github/env" >> $GITHUB_ENV
- name: Scan AWS Terraform with Mondoo
uses: mondoohq/actions/terraform-hcl@main
with:
service-account-credentials: ${{ secrets.MONDOO_CLIENT }}
path: ".github/terraform/aws/main.tf"
- name: Scan Azure Terraform with Mondoo
uses: mondoohq/actions/terraform-hcl@main
with:
service-account-credentials: ${{ secrets.MONDOO_CLIENT }}
path: ".github/terraform/aks/main.tf"
- name: Generate manifests
run: make generate-manifests IMG='${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:${{ env.RELEASE }}'
- name: Scan Kubernetes Manifest with Mondoo
uses: mondoohq/actions/k8s-manifest@main
with:
service-account-credentials: ${{ secrets.MONDOO_CLIENT }}
path: "mondoo-operator-manifests.yaml"
integration-tests:
needs: [unit-tests]
uses: ./.github/workflows/integration-tests.yaml
if: needs.unit-tests.result == 'success' # run only if unit-tests are successful
name: Integration tests
with:
mondooClientImageTag: ""
secrets: inherit

26 changes: 0 additions & 26 deletions .github/workflows/validate-actions.yaml

This file was deleted.