Skip to content

Commit

Permalink
Merge pull request #15 from fulcrumapp/task/update-upstream
Browse files Browse the repository at this point in the history
Task/update upstream
  • Loading branch information
osbornk authored Dec 28, 2024
2 parents a0df473 + 9fa84ee commit 61c4921
Show file tree
Hide file tree
Showing 813 changed files with 29,224 additions and 9,448 deletions.
2 changes: 1 addition & 1 deletion .docker/Dockerfile-build
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# syntax = docker/dockerfile:1-experimental
FROM golang:1.22-bullseye AS builder
FROM golang:1.23-bullseye AS builder

RUN apt-get update && apt-get upgrade -y &&\
mkdir -p /var/lib/sqlite
Expand Down
2 changes: 1 addition & 1 deletion .docker/Dockerfile-debug
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM golang:1.22-bullseye
FROM golang:1.23-bullseye
ENV CGO_ENABLED 1

RUN apt-get update && apt-get install -y --no-install-recommends inotify-tools psmisc
Expand Down
6 changes: 4 additions & 2 deletions .github/ISSUE_TEMPLATE/BUG-REPORT.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,11 +23,13 @@ body:
required: true
- label: "I have joined the [Ory Community Slack](https://slack.ory.sh)."
- label: "I am signed up to the [Ory Security Patch
Newsletter](https://ory.us10.list-manage.com/subscribe?u=ffb1a878e4ec6c0ed312a3480&id=f605a41b53)."
Newsletter](https://www.ory.sh/l/sign-up-newsletter)."
id: checklist
type: checkboxes
- attributes:
description: "Enter the slug or API URL of the affected Ory Network project. Leave empty when you are self-hosting."
description:
"Enter the slug or API URL of the affected Ory Network project. Leave
empty when you are self-hosting."
label: "Ory Network Project"
placeholder: "https://<your-project-slug>.projects.oryapis.com"
id: ory-network-project
Expand Down
6 changes: 4 additions & 2 deletions .github/ISSUE_TEMPLATE/DESIGN-DOC.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,11 +33,13 @@ body:
required: true
- label: "I have joined the [Ory Community Slack](https://slack.ory.sh)."
- label: "I am signed up to the [Ory Security Patch
Newsletter](https://ory.us10.list-manage.com/subscribe?u=ffb1a878e4ec6c0ed312a3480&id=f605a41b53)."
Newsletter](https://www.ory.sh/l/sign-up-newsletter)."
id: checklist
type: checkboxes
- attributes:
description: "Enter the slug or API URL of the affected Ory Network project. Leave empty when you are self-hosting."
description:
"Enter the slug or API URL of the affected Ory Network project. Leave
empty when you are self-hosting."
label: "Ory Network Project"
placeholder: "https://<your-project-slug>.projects.oryapis.com"
id: ory-network-project
Expand Down
6 changes: 4 additions & 2 deletions .github/ISSUE_TEMPLATE/FEATURE-REQUEST.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,11 +26,13 @@ body:
required: true
- label: "I have joined the [Ory Community Slack](https://slack.ory.sh)."
- label: "I am signed up to the [Ory Security Patch
Newsletter](https://ory.us10.list-manage.com/subscribe?u=ffb1a878e4ec6c0ed312a3480&id=f605a41b53)."
Newsletter](https://www.ory.sh/l/sign-up-newsletter)."
id: checklist
type: checkboxes
- attributes:
description: "Enter the slug or API URL of the affected Ory Network project. Leave empty when you are self-hosting."
description:
"Enter the slug or API URL of the affected Ory Network project. Leave
empty when you are self-hosting."
label: "Ory Network Project"
placeholder: "https://<your-project-slug>.projects.oryapis.com"
id: ory-network-project
Expand Down
42 changes: 25 additions & 17 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ jobs:
- sdk-generate
services:
postgres:
image: postgres:11.8
image: postgres:14
env:
POSTGRES_DB: postgres
POSTGRES_PASSWORD: test
Expand Down Expand Up @@ -79,22 +79,24 @@ jobs:
fetch-depth: 2
- uses: actions/setup-go@v4
with:
go-version: "1.22"
go-version: "1.23"
- run: go list -json > go.list
- name: Run nancy
uses: sonatype-nexus-community/[email protected]
with:
nancyVersion: v1.0.42
- run: |
sudo apt-get update
name: apt-get update
- run: npm install
name: Install node deps
- name: Run golangci-lint
uses: golangci/golangci-lint-action@v4
uses: golangci/golangci-lint-action@v6
env:
GOGC: 100
with:
args: --timeout 10m0s
version: v1.56.2
skip-pkg-cache: true
version: v1.61.0
- name: Build Kratos
run: make install
- name: Run go-acc (tests)
Expand All @@ -112,15 +114,15 @@ jobs:
- sdk-generate
services:
postgres:
image: postgres:11.8
image: postgres:14
env:
POSTGRES_DB: postgres
POSTGRES_PASSWORD: test
POSTGRES_USER: test
ports:
- 5432:5432
mysql:
image: mysql:5.7
image: mysql:8.0
env:
MYSQL_ROOT_PASSWORD: test
ports:
Expand Down Expand Up @@ -159,6 +161,9 @@ jobs:
- uses: ory/ci/checkout@master
with:
fetch-depth: 2
- run: |
sudo apt-get update
name: apt-get update
- run: |
npm ci
cd test/e2e; npm ci
Expand All @@ -170,7 +175,7 @@ jobs:
- name: Setup Go
uses: actions/setup-go@v4
with:
go-version: "1.22"
go-version: "1.23"

- name: Install selfservice-ui-react-native
uses: actions/checkout@v3
Expand Down Expand Up @@ -211,9 +216,9 @@ jobs:
REACT_UI_PATH: react-ui
CYPRESS_RECORD_KEY: ${{ secrets.CYPRESS_RECORD_KEY }}
- if: failure()
uses: actions/upload-artifact@v2
uses: actions/upload-artifact@v4
with:
name: logs
name: cypress-${{ matrix.database }}-logs
path: test/e2e/*.e2e.log

test-e2e-playwright:
Expand All @@ -223,15 +228,15 @@ jobs:
- sdk-generate
services:
postgres:
image: postgres:11.8
image: postgres:14
env:
POSTGRES_DB: postgres
POSTGRES_PASSWORD: test
POSTGRES_USER: test
ports:
- 5432:5432
mysql:
image: mysql:5.7
image: mysql:8.0
env:
MYSQL_ROOT_PASSWORD: test
ports:
Expand Down Expand Up @@ -262,6 +267,9 @@ jobs:
- uses: ory/ci/checkout@master
with:
fetch-depth: 2
- run: |
sudo apt-get update
name: apt-get update
- run: |
npm ci
cd test/e2e; npm ci
Expand All @@ -274,7 +282,7 @@ jobs:
- name: Setup Go
uses: actions/setup-go@v4
with:
go-version: "1.22"
go-version: "1.23"
- run: go build -tags sqlite,json1 .

- name: Install selfservice-ui-react-native
Expand Down Expand Up @@ -321,14 +329,14 @@ jobs:
NODE_UI_PATH: node-ui
REACT_UI_PATH: react-ui
- if: failure()
uses: actions/upload-artifact@v2
uses: actions/upload-artifact@v4
with:
name: logs
name: playwright-${{ matrix.database }}-logs
path: test/e2e/*.e2e.log
- if: failure()
uses: actions/upload-artifact@v2
uses: actions/upload-artifact@v4
with:
name: playwright-test-results-${{ github.sha }}
name: playwright-test-results-${{ matrix.database }}-${{ github.sha }}
path: |
test/e2e/test-results/
test/e2e/playwright-report/
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/codeql-analysis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ jobs:

# Initializes the CodeQL tools for scanning.
- name: Initialize CodeQL
uses: github/codeql-action/init@v1
uses: github/codeql-action/init@v2
with:
languages: ${{ matrix.language }}
config-file: ./.github/codeql/codeql-config.yml
Expand All @@ -51,7 +51,7 @@ jobs:
# Autobuild attempts to build any compiled languages (C/C++, C#, or Java).
# If this step fails, then you should remove it and run the build manually (see below)
- name: Autobuild
uses: github/codeql-action/autobuild@v1
uses: github/codeql-action/autobuild@v2

# ℹ️ Command-line programs to run using the OS shell.
# 📚 https://git.io/JvXDl
Expand All @@ -65,4 +65,4 @@ jobs:
# make release

- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@v1
uses: github/codeql-action/analyze@v2
74 changes: 61 additions & 13 deletions .github/workflows/cve-scan.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
# AUTO-GENERATED, DO NOT EDIT!
# Please edit the original at https://github.com/ory/meta/blob/master/templates/repository/server/.github/workflows/cve-scan.yaml

name: Docker Image Scanners
on:
workflow_dispatch:
push:
branches:
- "master"
Expand All @@ -9,30 +13,69 @@ on:
branches:
- "master"

permissions:
contents: read
security-events: write

jobs:
scanners:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
uses: actions/checkout@v4
- name: Setup Env
id: vars
shell: bash
run: |
echo "SHA_SHORT=$(git rev-parse --short HEAD)" >> "${GITHUB_ENV}"
# Store values in local variables
SHA_SHORT=$(git rev-parse --short HEAD)
REPO_NAME=${{ github.event.repository.name }}
# Append -sqlite to SHA_SHORT if repo is hydra
if [ "${REPO_NAME}" = "hydra" ]; then
echo "Repo is hydra, appending -sqlite to SHA_SHORT"
IMAGE_NAME="oryd/${REPO_NAME}:${SHA_SHORT}-sqlite"
else
echo "Repo is not hydra, using default IMAGE_NAME"
IMAGE_NAME="oryd/${REPO_NAME}:${SHA_SHORT}"
fi
# Output values for debugging
echo "Values to be set:"
echo "SHA_SHORT: ${SHA_SHORT}"
echo "REPO_NAME: ${REPO_NAME}"
echo "IMAGE_NAME: ${IMAGE_NAME}"
# Set GitHub Environment variables
echo "SHA_SHORT=${SHA_SHORT}" >> "${GITHUB_ENV}"
echo "IMAGE_NAME=${IMAGE_NAME}" >> "${GITHUB_ENV}"
- name: Set up QEMU
uses: docker/setup-qemu-action@v2
uses: docker/setup-qemu-action@v3
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2
uses: docker/setup-buildx-action@v3
- name: Build images
shell: bash
run: |
IMAGE_TAG="${{ env.SHA_SHORT }}" make docker
- name: Login to GitHub Container Registry
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}

- name: Configure Trivy
run: |
mkdir -p $HOME/.cache/trivy
echo "TRIVY_USERNAME=${{ github.actor }}" >> $GITHUB_ENV
echo "TRIVY_PASSWORD=${{ secrets.GITHUB_TOKEN }}" >> $GITHUB_ENV
- name: Anchore Scanner
uses: anchore/scan-action@v3
uses: anchore/scan-action@v5
id: grype-scan
with:
image: oryd/kratos:${{ env.SHA_SHORT }}
image: ${{ env.IMAGE_NAME }}
fail-build: true
severity-cutoff: high
add-cpes-if-none: true
Expand All @@ -45,14 +88,14 @@ jobs:
echo "::endgroup::"
- name: Anchore upload scan SARIF report
if: always()
uses: github/codeql-action/upload-sarif@v2
uses: github/codeql-action/upload-sarif@v3
with:
sarif_file: ${{ steps.grype-scan.outputs.sarif }}
- name: Kubescape scanner
uses: kubescape/github-action@main
id: kubescape
with:
image: oryd/kratos:${{ env.SHA_SHORT }}
image: ${{ env.IMAGE_NAME }}
verbose: true
format: pretty-printer
# can't whitelist CVE yet: https://github.com/kubescape/kubescape/pull/1568
Expand All @@ -61,18 +104,23 @@ jobs:
uses: aquasecurity/trivy-action@master
if: ${{ always() }}
with:
image-ref: oryd/kratos:${{ env.SHA_SHORT }}
image-ref: ${{ env.IMAGE_NAME }}
format: "table"
exit-code: "42"
ignore-unfixed: true
vuln-type: "os,library"
severity: "CRITICAL,HIGH"
scanners: "vuln,secret,config"
scanners: "vuln,secret,misconfig"
env:
TRIVY_SKIP_JAVA_DB_UPDATE: "true"
TRIVY_DISABLE_VEX_NOTICE: "true"
TRIVY_DB_REPOSITORY: ghcr.io/aquasecurity/trivy-db,public.ecr.aws/aquasecurity/trivy-db

- name: Dockle Linter
uses: erzz/dockle-action@v1.3.2
uses: erzz/dockle-action@v1
if: ${{ always() }}
with:
image: oryd/kratos:${{ env.SHA_SHORT }}
image: ${{ env.IMAGE_NAME }}
exit-code: 42
failure-threshold: high
- name: Hadolint
Expand All @@ -89,5 +137,5 @@ jobs:
shell: bash
run: |
echo "::group::Hadolint Scan Details"
echo "${HADOLINT_RESULTS}" | jq '.'
echo "${HADOLINT_RESULTS}" | jq '.'
echo "::endgroup::"
2 changes: 1 addition & 1 deletion .github/workflows/format.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ jobs:
- uses: actions/checkout@v3
- uses: actions/setup-go@v3
with:
go-version: "1.22"
go-version: "1.23"
- run: make format
- name: Indicate formatting issues
run: git diff HEAD --exit-code --color
2 changes: 1 addition & 1 deletion .github/workflows/licenses.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ jobs:
- uses: actions/checkout@v2
- uses: actions/setup-go@v2
with:
go-version: "1.22"
go-version: "1.23"
- uses: actions/setup-node@v2
with:
node-version: "18"
Expand Down
Loading

0 comments on commit 61c4921

Please sign in to comment.