Skip to content

Commit

Permalink
Add dependabot configuration and trivy scans (#2262)
Browse files Browse the repository at this point in the history
* Add Dependabot configuration

* Add vulnerability scan step for the AWS ECR images
  • Loading branch information
DavisRayM authored Jun 16, 2022
2 parents 5d02703 + 3b45f05 commit 03104d0
Show file tree
Hide file tree
Showing 2 changed files with 27 additions and 1 deletion.
13 changes: 13 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
version: 2
updates:
- package-ecosystem: pip
directory: /requirements
schedule:
interval: daily
open-pull-requests-limit: 5
commit-message:
prefix: requirements
reviewers:
- "ukanga"
- "KipSigei"
- "DavisRayM"
15 changes: 14 additions & 1 deletion .github/workflows/ecr-image-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ on:
default: ''

jobs:
main:
build:
runs-on: ubuntu-20.04
steps:
- name: Checkout
Expand Down Expand Up @@ -75,3 +75,16 @@ jobs:
- name: Image digest
run: echo ${{ steps.docker-build.outputs.digest }}

- name: Run Trivy vulnerability scanner
uses: aquasecurity/trivy-action@master
with:
image-ref: ${{ steps.login-ecr.outputs.registry }}/onaio/onadata:${{ github.event.inputs.versionTag || steps.get-version.outputs.VERSION || steps.get-branch-name.outputs.BRANCH }}
format: 'sarif'
output: 'trivy-results.sarif'

- name: Upload Trivy scan result to Github security lab
uses: github/codeql-action/upload-sarif@v1
with:
sarif_file: 'trivy-results.sarif'

0 comments on commit 03104d0

Please sign in to comment.