-
-
Notifications
You must be signed in to change notification settings - Fork 347
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: add new metrics server to keto (#832)
Co-authored-by: Patrik <[email protected]>
- Loading branch information
1 parent
d9397cc
commit 8beba60
Showing
14 changed files
with
369 additions
and
101 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
name: Docker Image Scan | ||
name: Docker Image Scanners | ||
on: | ||
push: | ||
branches: | ||
|
@@ -10,22 +10,55 @@ on: | |
- 'master' | ||
|
||
jobs: | ||
docker: | ||
scanners: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v2 | ||
- name: Setup Env | ||
id: vars | ||
shell: bash | ||
run: | | ||
echo "##[set-output name=branch;]$(echo ${GITHUB_REF#refs/heads/})" | ||
echo "::set-output name=sha_short::$(git rev-parse --short HEAD)" | ||
- name: Set up QEMU | ||
uses: docker/setup-qemu-action@v1 | ||
- name: Set up Docker Buildx | ||
uses: docker/setup-buildx-action@v1 | ||
- name: Build images | ||
shell: bash | ||
run: | | ||
make docker | ||
- name: Scan image Sqlite | ||
touch keto | ||
DOCKER_BUILDKIT=1 docker build -f .docker/Dockerfile-build --build-arg=COMMIT=${{ steps.vars.outputs.sha_short }} -t oryd/keto:${{ steps.vars.outputs.sha_short }} . | ||
rm keto | ||
- name: Anchore Scanner | ||
uses: anchore/scan-action@v3 | ||
id: grype-scan | ||
with: | ||
image: oryd/keto:latest | ||
image: oryd/keto:${{ steps.vars.outputs.sha_short }} | ||
fail-build: true | ||
severity-cutoff: high | ||
debug: false | ||
acs-report-enable: true | ||
- name: Anchore upload scan SARIF report | ||
if: always() | ||
uses: github/codeql-action/upload-sarif@v1 | ||
with: | ||
sarif_file: ${{ steps.grype-scan.outputs.sarif }} | ||
- name: Trivy Scanner | ||
uses: aquasecurity/trivy-action@master | ||
if: ${{ always() }} | ||
with: | ||
image-ref: oryd/keto:${{ steps.vars.outputs.sha_short }} | ||
format: 'table' | ||
exit-code: '42' | ||
ignore-unfixed: true | ||
vuln-type: 'os,library' | ||
severity: 'CRITICAL,HIGH' | ||
- name: Dockle Linter | ||
uses: erzz/[email protected] | ||
if: ${{ always() }} | ||
with: | ||
image: oryd/keto:${{ steps.vars.outputs.sha_short }} | ||
exit-code: 42 | ||
failure-threshold: fatal |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
version: '3' | ||
|
||
services: | ||
keto: | ||
build: | ||
context: "." | ||
dockerfile: ".docker/Dockerfile-build" | ||
ports: | ||
- "4466:4466" | ||
- "4467:4467" | ||
- "4468:4468" | ||
command: serve -c /home/ory/keto.yml | ||
restart: on-failure | ||
volumes: | ||
- type: bind | ||
source: "./config" | ||
target: "/home/ory" | ||
environment: | ||
- LOG_LEVEL=debug | ||
- PORT=4466 | ||
- DSN=memory |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.