Skip to content

Commit

Permalink
Merge c7fc501 into dfdde51
Browse files Browse the repository at this point in the history
  • Loading branch information
renepollard committed Apr 25, 2022
2 parents dfdde51 + c7fc501 commit 65274a4
Showing 1 changed file with 88 additions and 0 deletions.
88 changes: 88 additions & 0 deletions .github/workflows/cdis.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,88 @@
---
name: CI
on:
push:
branches: [master]
pull_request:
branches: [master]
jobs:
build:
name: CI
runs-on: ubuntu-latest
steps:
- name: Checkout Code
uses: actions/checkout@v2
with:
fetch-depth: 0
- name: Lint Repo
uses: github/super-linter/slim@v4
env:
VALIDATE_ALL_CODEBASE: false
DEFAULT_BRANCH: master
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

- name: Build Image
id: build-image
uses: redhat-actions/buildah-build@v2
with:
image: fence-gh-action
tags: v1
containerfiles: |
./Dockerfile
- name: Run Snyk to check for vulnerabilities
uses: snyk/actions/node@master
env:
SNYK_TOKEN: ${{ secrets.SNYK_TOKEN }}
with:
command: monitor

- name: Veracode Upload And Scan
uses: veracode/veracode-uploadandscan-action@0.2.1
with:
appname: '${{ secrets.appname }}'
createprofile: false
filepath: '$ {{ secrets.appath }}'
vid: '${{ secrets.API_ID }}'
vkey: '${{ secrets.API_KEY }}'

- name: Run Trivy vulnerability scanner
uses: aquasecurity/trivy-action@master
with:
scan-type: 'fs'
ignore-unfixed: true
format: 'sarif'
output: 'trivy-results.sarif'
severity: 'CRITICAL,HIGH,MEDIUM'

- name: Upload Trivy scan results to GitHub Security tab
uses: github/codeql-action/upload-sarif@v1
with:
sarif_file: 'trivy-results.sarif'

- name: Push To reopistory
id: push-to-quay
uses: redhat-actions/push-to-registry@v2
with:
image: ${{ steps.build-image.outputs.image }}
tags: ${{ steps.build-image.outputs.tags }}
registry: ${{ secrets.REGISTRY}}
username: ${{ secrets.REGISTRY_USER}}
password: ${{ secrets.REGISTRY_PASSWORD }}

- name: Print image url
run: echo "Image pushed to ${{ steps.push-to-quay.outputs.registry-paths }}"

- name: Prisma Cloud image scan
id: scan
uses: PaloAltoNetworks/prisma-cloud-scan@v1
with:
pcc_console_url: ${{ secrets.PCC_CONSOLE_URL }}
pcc_user: ${{ secrets.PCC_USER }}
pcc_pass: ${{ secrets.PCC_PASS }}
image_name: ${{ steps.build-image.outputs.image }}

- name: Upload SARIF file
if: ${{ always() }}
uses: github/codeql-action/upload-sarif@v1
with:
sarif_file: ${{ steps.scan.outputs.sarif_file }}

0 comments on commit 65274a4

Please sign in to comment.