Skip to content

Pin dependencies

Pin dependencies #3199

Workflow file for this run

---
name: main
on:
push:
branches: [ main ]
pull_request:
branches: [ main ]
env:
DATREE_TOKEN: ${{ secrets.DATREE_TOKEN }}
jobs:
env:
uses: devxp-tech/.github/.github/workflows/env.yaml@main
yaml-linter:
name: Yaml Linter 🧹
runs-on: ubuntu-latest
needs:
- env
steps:
- name: Checkout πŸ›ŽοΈ
uses: actions/checkout@f43a0e5ff2bd294095638e18286ca9a3d1956744 # v3
- name: Yaml Lint
uses: ibiqlik/action-yamllint@2576378a8e339169678f9939646ee3ee325e845c # v3
with:
no_warnings: true
kube-linter:
name: Kube Linter 🧹
runs-on: ubuntu-latest
needs:
- env
steps:
- name: Checkout πŸ›ŽοΈ
uses: actions/checkout@f43a0e5ff2bd294095638e18286ca9a3d1956744 # v3
- name: Scan repo
id: kube-lint-repo
uses: stackrox/kube-linter-action@ca0d55b925470deb5b04b556e6c4276ea94d03c3 # v1.0.4
with:
directory: apps
format: sarif
output-file: kube-linter.sarif
continue-on-error: true
secret-find:
name: Secrets Find πŸ”
runs-on: ubuntu-latest
needs:
- env
steps:
- name: Checkout πŸ›ŽοΈ
uses: actions/checkout@f43a0e5ff2bd294095638e18286ca9a3d1956744 # v3
- name: Find Secrets πŸ”
shell: bash
run: |
if find apps/ -name '*.yaml' | xargs grep -q "kind: Secret"; then
echo "Fail, secret found! :("
exit 1
else
echo "Success, secret not found! :)"
exit 0
fi
# datree-check:
# name: Datree Check πŸ”’
# runs-on: ubuntu-latest
# needs:
# - env
# steps:
# - name: Checkout πŸ›ŽοΈ
# uses: actions/checkout@v3
# - name: Run Datree Policy Check
# uses: datreeio/action-datree@main
# with:
# path: 'apps/*/base/*.yaml'
# cliArguments: '--only-k8s-files --ignore-missing-schemas'
trivy-scan:
name: Trivy Vulnerability Scanner πŸ”’
needs:
- env
runs-on: ubuntu-20.04
steps:
- name: Checkout code πŸ›ŽοΈ
uses: actions/checkout@f43a0e5ff2bd294095638e18286ca9a3d1956744 # v3
- name: Run Trivy vulnerability scanner in IaC mode πŸ”Ž
uses: aquasecurity/trivy-action@master
with:
scan-type: 'config'
hide-progress: false
format: 'sarif'
output: 'trivy-results.sarif'
exit-code: '1'
ignore-unfixed: true
severity: 'CRITICAL,HIGH'
- name: Upload Trivy scan results to GitHub Security tab
uses: github/codeql-action/upload-sarif@4759df8df70c5ebe7042c3029bbace20eee13edd # v2
if: always()
with:
sarif_file: 'trivy-results.sarif'
quality-gate:
uses: devxp-tech/.github/.github/workflows/sonarqube.yaml@main
secrets: inherit
needs:
- env
- yaml-linter
- kube-linter
- secret-find
# - datree-check
- trivy-scan
notify:
uses: devxp-tech/.github/.github/workflows/notify.yaml@main
if: always()
secrets: inherit
needs:
- env
- yaml-linter
- kube-linter
- secret-find
# - datree-check
- quality-gate
- trivy-scan