snapshot of https://github.com/ory/kratos.git (master, 2026-09-15; blobs > 131072B omitted)
Some checks failed
CI / Run tests and lints (push) Failing after 29s
CI / Build CLI docs (push) Has been skipped
CI / Run Playwright end-to-end tests (mysql) (push) Failing after 3s
CI / Run Playwright end-to-end tests (postgres) (push) Failing after 2s
CI / Run Playwright end-to-end tests (sqlite) (push) Failing after 3s
CodeQL / Analyze (go) (push) Failing after 4s
CodeQL / Analyze (javascript) (push) Failing after 3s
Docker Image Scanners / scanners (push) Failing after 4s
Synchronize Issue Labels / Synchronize Issue Labels (push) Has been skipped
CI / Run end-to-end tests (postgres) (push) Failing after 19s
CI / Run end-to-end tests (sqlite) (push) Failing after 2s
CI / Run Playwright end-to-end tests (cockroach) (push) Failing after 2s
CI / Draft newsletter (push) Has been skipped
CI / Generate release (push) Has been skipped
CI / Pending approval Slack notification (push) Has been skipped
CI / Send newsletter (push) Has been skipped

This commit is contained in:
upstream-mirror
2026-09-15 21:19:12 +05:00
commit c60cc7ca75
8092 changed files with 394160 additions and 0 deletions

1
.github/CODEOWNERS vendored Normal file
View File

@@ -0,0 +1 @@
* @aeneasr @ory/product-development

8
.github/FUNDING.yml vendored Normal file
View File

@@ -0,0 +1,8 @@
# AUTO-GENERATED, DO NOT EDIT!
# Please edit the original at https://github.com/ory/meta/blob/master/templates/repository/common/.github/FUNDING.yml
# These are supported funding model platforms
# github:
patreon: _ory
open_collective: ory

122
.github/ISSUE_TEMPLATE/BUG-REPORT.yml vendored Normal file
View File

@@ -0,0 +1,122 @@
# AUTO-GENERATED, DO NOT EDIT!
# Please edit the original at https://github.com/ory/meta/blob/master/templates/repository/common/.github/ISSUE_TEMPLATE/BUG-REPORT.yml
description: "Create a bug report"
labels:
- bug
name: "Bug Report"
body:
- attributes:
value: "Thank you for taking the time to fill out this bug report!\n"
type: markdown
- attributes:
label: "Preflight checklist"
options:
- label:
"I could not find a solution in the existing issues, docs, nor
discussions."
required: true
- label:
"I agree to follow this project's [Code of
Conduct](https://github.com/ory/kratos/blob/master/CODE_OF_CONDUCT.md)."
required: true
- label:
"I have read and am following this repository's [Contribution
Guidelines](https://github.com/ory/kratos/blob/master/CONTRIBUTING.md)."
required: true
- label:
"I have joined the [Ory Community Slack](https://slack.ory.com)."
- label:
"I am signed up to the [Ory Security Patch
Newsletter](https://www.ory.com/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."
label: "Ory Network Project"
placeholder: "https://<your-project-slug>.projects.oryapis.com"
id: ory-network-project
type: input
- attributes:
description: "A clear and concise description of what the bug is."
label: "Describe the bug"
placeholder: "Tell us what you see!"
id: describe-bug
type: textarea
validations:
required: true
- attributes:
description: |
Clear, formatted, and easy to follow steps to reproduce the behavior:
placeholder: |
Steps to reproduce the behavior:
1. Run `docker run ....`
2. Make API Request to with `curl ...`
3. Request fails with response: `{"some": "error"}`
label: "Reproducing the bug"
id: reproduce-bug
type: textarea
validations:
required: true
- attributes:
description:
"Please copy and paste any relevant log output. This will be
automatically formatted into code, so no need for backticks. Please
redact any sensitive information"
label: "Relevant log output"
render: shell
placeholder: |
log=error ....
id: logs
type: textarea
- attributes:
description:
"Please copy and paste any relevant configuration. This will be
automatically formatted into code, so no need for backticks. Please
redact any sensitive information!"
label: "Relevant configuration"
render: yml
placeholder: |
server:
admin:
port: 1234
id: config
type: textarea
- attributes:
description: "What version of our software are you running?"
label: Version
id: version
type: input
validations:
required: true
- attributes:
label: "On which operating system are you observing this issue?"
options:
- Ory Network
- macOS
- Linux
- Windows
- FreeBSD
- Other
id: operating-system
type: dropdown
- attributes:
label: "In which environment are you deploying?"
options:
- Ory Network
- Docker
- "Docker Compose"
- "Kubernetes with Helm"
- Kubernetes
- Binary
- Other
id: deployment
type: dropdown
- attributes:
description: "Add any other context about the problem here."
label: Additional Context
id: additional
type: textarea

125
.github/ISSUE_TEMPLATE/DESIGN-DOC.yml vendored Normal file
View File

@@ -0,0 +1,125 @@
# AUTO-GENERATED, DO NOT EDIT!
# Please edit the original at https://github.com/ory/meta/blob/master/templates/repository/common/.github/ISSUE_TEMPLATE/DESIGN-DOC.yml
description:
"A design document is needed for non-trivial changes to the code base."
labels:
- rfc
name: "Design Document"
body:
- attributes:
value: |
Thank you for writing this design document.
One of the key elements of Ory's software engineering culture is the use of defining software designs through design docs. These are relatively informal documents that the primary author or authors of a software system or application create before they embark on the coding project. The design doc documents the high level implementation strategy and key design decisions with emphasis on the trade-offs that were considered during those decisions.
Ory is leaning heavily on [Google's design docs process](https://www.industrialempathy.com/posts/design-docs-at-google/)
and [Golang Proposals](https://github.com/golang/proposal).
Writing a design doc before contributing your change ensures that your ideas are checked with
the community and maintainers. It will save you a lot of time developing things that might need to be changed
after code reviews, and your pull requests will be merged faster.
type: markdown
- attributes:
label: "Preflight checklist"
options:
- label:
"I could not find a solution in the existing issues, docs, nor
discussions."
required: true
- label:
"I agree to follow this project's [Code of
Conduct](https://github.com/ory/kratos/blob/master/CODE_OF_CONDUCT.md)."
required: true
- label:
"I have read and am following this repository's [Contribution
Guidelines](https://github.com/ory/kratos/blob/master/CONTRIBUTING.md)."
required: true
- label:
"I have joined the [Ory Community Slack](https://slack.ory.com)."
- label:
"I am signed up to the [Ory Security Patch
Newsletter](https://www.ory.com/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."
label: "Ory Network Project"
placeholder: "https://<your-project-slug>.projects.oryapis.com"
id: ory-network-project
type: input
- attributes:
description: |
This section gives the reader a very rough overview of the landscape in which the new system is being built and what is actually being built. This isn’t a requirements doc. Keep it succinct! The goal is that readers are brought up to speed but some previous knowledge can be assumed and detailed info can be linked to. This section should be entirely focused on objective background facts.
label: "Context and scope"
id: scope
type: textarea
validations:
required: true
- attributes:
description: |
A short list of bullet points of what the goals of the system are, and, sometimes more importantly, what non-goals are. Note, that non-goals aren’t negated goals like “The system shouldn’t crash”, but rather things that could reasonably be goals, but are explicitly chosen not to be goals. A good example would be “ACID compliance”; when designing a database, you’d certainly want to know whether that is a goal or non-goal. And if it is a non-goal you might still select a solution that provides it, if it doesn’t introduce trade-offs that prevent achieving the goals.
label: "Goals and non-goals"
id: goals
type: textarea
validations:
required: true
- attributes:
description: |
This section should start with an overview and then go into details.
The design doc is the place to write down the trade-offs you made in designing your software. Focus on those trade-offs to produce a useful document with long-term value. That is, given the context (facts), goals and non-goals (requirements), the design doc is the place to suggest solutions and show why a particular solution best satisfies those goals.
The point of writing a document over a more formal medium is to provide the flexibility to express the problem at hand in an appropriate manner. Because of this, there is no explicit guidance on how to actually describe the design.
label: "The design"
id: design
type: textarea
validations:
required: true
- attributes:
description: |
If the system under design exposes an API, then sketching out that API is usually a good idea. In most cases, however, one should withstand the temptation to copy-paste formal interface or data definitions into the doc as these are often verbose, contain unnecessary detail and quickly get out of date. Instead, focus on the parts that are relevant to the design and its trade-offs.
label: "APIs"
id: apis
type: textarea
- attributes:
description: |
Systems that store data should likely discuss how and in what rough form this happens. Similar to the advice on APIs, and for the same reasons, copy-pasting complete schema definitions should be avoided. Instead, focus on the parts that are relevant to the design and its trade-offs.
label: "Data storage"
id: persistence
type: textarea
- attributes:
description: |
Design docs should rarely contain code, or pseudo-code except in situations where novel algorithms are described. As appropriate, link to prototypes that show the feasibility of the design.
label: "Code and pseudo-code"
id: pseudocode
type: textarea
- attributes:
description: |
One of the primary factors that would influence the shape of a software design and hence the design doc, is the degree of constraint of the solution space.
On one end of the extreme is the “greenfield software project”, where all we know are the goals, and the solution can be whatever makes the most sense. Such a document may be wide-ranging, but it also needs to quickly define a set of rules that allow zooming in on a manageable set of solutions.
On the other end are systems where the possible solutions are very well defined, but it isn't at all obvious how they could even be combined to achieve the goals. This may be a legacy system that is difficult to change and wasn't designed to do what you want it to do or a library design that needs to operate within the constraints of the host programming language.
In this situation, you may be able to enumerate all the things you can do relatively easily, but you need to creatively put those things together to achieve the goals. There may be multiple solutions, and none of them are great, and hence such a document should focus on selecting the best way given all identified trade-offs.
label: "Degree of constraint"
id: constrait
type: textarea
- attributes:
description: |
This section lists alternative designs that would have reasonably achieved similar outcomes. The focus should be on the trade-offs that each respective design makes and how those trade-offs led to the decision to select the design that is the primary topic of the document.
While it is fine to be succinct about a solution that ended up not being selected, this section is one of the most important ones as it shows very explicitly why the selected solution is the best given the project goals and how other solutions, that the reader may be wondering about, introduce trade-offs that are less desirable given the goals.
label: Alternatives considered
id: alternatives
type: textarea

View File

@@ -0,0 +1,86 @@
# AUTO-GENERATED, DO NOT EDIT!
# Please edit the original at https://github.com/ory/meta/blob/master/templates/repository/common/.github/ISSUE_TEMPLATE/FEATURE-REQUEST.yml
description:
"Suggest an idea for this project without a plan for implementation"
labels:
- feat
name: "Feature Request"
body:
- attributes:
value: |
Thank you for suggesting an idea for this project!
If you already have a plan to implement a feature or a change, please create a [design document](https://github.com/aeneasr/gh-template-test/issues/new?assignees=&labels=rfc&template=DESIGN-DOC.yml) instead if the change is non-trivial!
type: markdown
- attributes:
label: "Preflight checklist"
options:
- label:
"I could not find a solution in the existing issues, docs, nor
discussions."
required: true
- label:
"I agree to follow this project's [Code of
Conduct](https://github.com/ory/kratos/blob/master/CODE_OF_CONDUCT.md)."
required: true
- label:
"I have read and am following this repository's [Contribution
Guidelines](https://github.com/ory/kratos/blob/master/CONTRIBUTING.md)."
required: true
- label:
"I have joined the [Ory Community Slack](https://slack.ory.com)."
- label:
"I am signed up to the [Ory Security Patch
Newsletter](https://www.ory.com/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."
label: "Ory Network Project"
placeholder: "https://<your-project-slug>.projects.oryapis.com"
id: ory-network-project
type: input
- attributes:
description:
"Is your feature request related to a problem? Please describe."
label: "Describe your problem"
placeholder:
"A clear and concise description of what the problem is. Ex. I'm always
frustrated when [...]"
id: problem
type: textarea
validations:
required: true
- attributes:
description: |
Describe the solution you'd like
placeholder: |
A clear and concise description of what you want to happen.
label: "Describe your ideal solution"
id: solution
type: textarea
validations:
required: true
- attributes:
description: "Describe alternatives you've considered"
label: "Workarounds or alternatives"
id: alternatives
type: textarea
validations:
required: true
- attributes:
description: "What version of our software are you running?"
label: Version
id: version
type: input
validations:
required: true
- attributes:
description:
"Add any other context or screenshots about the feature request here."
label: Additional Context
id: additional
type: textarea

14
.github/ISSUE_TEMPLATE/config.yml vendored Normal file
View File

@@ -0,0 +1,14 @@
# AUTO-GENERATED, DO NOT EDIT!
# Please edit the original at https://github.com/ory/meta/blob/master/templates/repository/common/.github/ISSUE_TEMPLATE/config.yml
blank_issues_enabled: false
contact_links:
- name: Ory Kratos Forum
url: https://github.com/ory/kratos/discussions
about:
Please ask and answer questions here, show your implementations and
discuss ideas.
- name: Ory Chat
url: https://www.ory.com/chat
about:
Hang out with other Ory community members to ask and answer questions.

16
.github/auto_assign.yml vendored Normal file
View File

@@ -0,0 +1,16 @@
# AUTO-GENERATED, DO NOT EDIT!
# Please edit the original at https://github.com/ory/meta/blob/master/templates/repository/common/.github/auto_assign.yml
# Set to true to add reviewers to pull requests
addReviewers: true
# Set to true to add assignees to pull requests
addAssignees: true
# A list of reviewers to be added to pull requests (GitHub user name)
assignees:
- ory/maintainers
# A number of reviewers added to the pull request
# Set 0 to add all the reviewers (default: 0)
numberOfReviewers: 0

8
.github/codeql/codeql-config.yml vendored Normal file
View File

@@ -0,0 +1,8 @@
name: "CodeQL config"
queries:
- uses: security-and-quality
paths-ignore:
- "/test/"
- "/pkg/testhelpers"

6
.github/config.yml vendored Normal file
View File

@@ -0,0 +1,6 @@
# AUTO-GENERATED, DO NOT EDIT!
# Please edit the original at https://github.com/ory/meta/blob/master/templates/repository/common/.github/config.yml
todo:
keyword: "@todo"
label: todo

5
.github/conventional_commits.json vendored Normal file
View File

@@ -0,0 +1,5 @@
{
"$schema": "https://raw.githubusercontent.com/ory/ci/master/conventional_commit_config/dist/config.schema.json",
"addTypes": ["improvement", "perf"],
"addScopes": ["cli", "sql"]
}

67
.github/labels.json vendored Normal file
View File

@@ -0,0 +1,67 @@
[
{
"name": "package/2fa",
"color": "0A28FD",
"aliases": ["module:2fa"]
},
{
"name": "package/cli",
"color": "0A28FD",
"aliases": ["module:cli"]
},
{
"name": "package/courier",
"color": "0A28FD",
"aliases": ["module:courier"]
},
{
"name": "package/courier",
"color": "0A28FD",
"aliases": ["module:docs"]
},
{
"name": "package/selfservice/errorx",
"color": "0A28FD",
"aliases": ["module:errorx"]
},
{
"name": "package/identity",
"color": "0A28FD",
"aliases": ["module:identity"]
},
{
"name": "package/persistence/sql",
"color": "0A28FD",
"aliases": ["module:migrations"]
},
{
"name": "package/selfservice",
"color": "0A28FD",
"aliases": ["module:selfservice"]
},
{
"name": "package/selfservice/oidc",
"color": "0A28FD",
"aliases": ["module:ss/oidc"]
},
{
"name": "package/selfservice/password",
"color": "0A28FD",
"aliases": ["module:ss/password"]
},
{
"name": "package/selfservice/verification",
"color": "0A28FD",
"aliases": ["module:verification"]
},
{
"name": "package/selfservice/recovery",
"color": "0A28FD",
"aliases": []
},
{
"name": "package/session",
"color": "0A28FD",
"aliases": ["module:session"]
}
]

60
.github/pull_request_template.md vendored Normal file
View File

@@ -0,0 +1,60 @@
<!--
Describe the big picture of your changes here to communicate to the maintainers why we should accept this pull request.
This text will be included in the changelog. If applicable, include links to documentation or pieces of code.
If your change includes breaking changes please add a code block documenting the breaking change:
```
BREAKING CHANGES: This patch changes the behavior of configuration item `foo` to do bar. To keep the existing
behavior please do baz.
```
-->
## Related issue(s)
<!--
If this pull request
1. is a fix for a known bug, link the issue where the bug was reported in the format of `#1234`;
2. is a fix for a previously unknown bug, explain the bug and how to reproduce it in this pull request;
3. implements a new feature, link the issue containing the design document in the format of `#1234`;
4. improves the documentation, no issue reference is required.
Pull requests introducing new features, which do not have a design document linked are more likely to be rejected and take on average 2-8 weeks longer to
get merged.
You can discuss changes with maintainers either in the Github Discussions in this repository or
join the [Ory Chat](https://www.ory.com/chat).
-->
## Checklist
<!--
Put an `x` in the boxes that apply. You can also fill these out after creating the PR.
Please be aware that pull requests must have all boxes ticked in order to be merged.
If you're unsure about any of them, don't hesitate to ask. We're here to help!
-->
- [ ] I have read the [contributing guidelines](../blob/master/CONTRIBUTING.md).
- [ ] I have referenced an issue containing the design document if my change
introduces a new feature.
- [ ] I am following the
[contributing code guidelines](../blob/master/CONTRIBUTING.md#contributing-code).
- [ ] I have read the [security policy](../security/policy).
- [ ] I confirm that this pull request does not address a security
vulnerability. If this pull request addresses a security vulnerability, I
confirm that I got the approval (please contact
[security@ory.com](mailto:security@ory.com)) from the maintainers to push
the changes.
- [ ] I have added tests that prove my fix is effective or that my feature
works.
- [ ] I have added or changed [the documentation](https://github.com/ory/docs).
## Further Comments
<!--
If this is a relatively large or complex change, kick off the discussion by explaining why you chose the solution
you did and what alternatives you considered, etc...
-->

385
.github/workflows/ci.yaml vendored Normal file
View File

@@ -0,0 +1,385 @@
name: CI
on:
push:
branches:
- master
tags:
- "*"
pull_request:
# Cancel in-progress runs in current workflow.
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
env:
CGO_ENABLED: "0"
jobs:
test:
name: Run tests and lints
runs-on: ubuntu-latest
services:
postgres:
image: postgres:18
env:
POSTGRES_DB: postgres
POSTGRES_PASSWORD: test
POSTGRES_USER: test
ports:
- 5432:5432
mysql:
image: mysql:9.6
env:
MYSQL_ROOT_PASSWORD: test
ports:
- 3306:3306
env:
TEST_DATABASE_POSTGRESQL: "postgres://test:test@localhost:5432/postgres?sslmode=disable"
TEST_DATABASE_MYSQL: "mysql://root:test@(localhost:3306)/mysql?parseTime=true&multiStatements=true"
TEST_DATABASE_COCKROACHDB: "cockroach://root@localhost:26257/defaultdb?sslmode=disable"
steps:
- run: |
docker create --name cockroach -p 26257:26257 \
cockroachdb/cockroach:latest-v25.4 start-single-node --insecure \
|| true
docker start cockroach
name: Start CockroachDB
- run: docker pull oryd/hydra:v2.2.0
name: Pull Hydra
- uses: ory/ci/checkout@master
with:
fetch-depth: 2
- uses: actions/setup-go@v6
with:
check-latest: true
go-version-file: go.mod
- run: go list -json > go.list
- name: Run nancy
uses: sonatype-nexus-community/nancy-github-action@v1.0.3
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
if: ${{ github.ref_type != 'tag' }}
uses: golangci/golangci-lint-action@v9
env:
GOGC: 100
with:
args: --timeout 10m0s
version: latest
only-new-issues: "true"
- name: Build Kratos
run: make install
- name: Run go tests
run: make test-coverage
- name: Submit to Codecov
run: |
bash <(curl -s https://codecov.io/bash)
env:
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
test-e2e:
name: Run end-to-end tests
runs-on: ubuntu-latest
services:
postgres:
image: postgres:18
env:
POSTGRES_DB: postgres
POSTGRES_PASSWORD: test
POSTGRES_USER: test
ports:
- 5432:5432
mysql:
image: mysql:9.6
env:
MYSQL_ROOT_PASSWORD: test
ports:
- 3306:3306
mailslurper:
image: oryd/mailslurper:latest-smtps
ports:
- 4436:4436
- 4437:4437
- 1025:1025
env:
TEST_DATABASE_POSTGRESQL: "postgres://test:test@localhost:5432/postgres?sslmode=disable"
TEST_DATABASE_MYSQL: "mysql://root:test@(localhost:3306)/mysql?parseTime=true&multiStatements=true"
TEST_DATABASE_COCKROACHDB: "cockroach://root@localhost:26257/defaultdb?sslmode=disable"
strategy:
fail-fast: false
matrix:
database: ["postgres", "sqlite"]
# "cockroach", "mysql" TODO: fix tests and uncomment
steps:
- uses: actions/setup-node@v6
with:
node-version: "24"
- run: |
docker create --name cockroach -p 26257:26257 \
cockroachdb/cockroach:latest-v25.4 start-single-node --insecure
docker start cockroach
name: Start CockroachDB
- uses: browser-actions/setup-chrome@latest
name: Install Chrome
# - uses: browser-actions/setup-firefox@latest
# name: Install Firefox
# - uses: browser-actions/setup-geckodriver@latest
# name: Install Geckodriver
# with:
# geckodriver-version: 0.32.0
- 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
npm i -g expo-cli
name: Install node deps
- run: |
sudo apt-get install -y moreutils gettext
name: Install tools
- name: Setup Go
uses: actions/setup-go@v6
with:
check-latest: true
go-version-file: go.mod
- name: Install selfservice-ui-react-native
uses: actions/checkout@v7
with:
repository: ory/kratos-selfservice-ui-react-native
path: react-native-ui
- run: |
cd react-native-ui
npm install
- name: Install selfservice-ui-node
uses: actions/checkout@v7
with:
repository: ory/kratos-selfservice-ui-node
path: node-ui
- run: |
cd node-ui
npm install --legacy-peer-deps
- name: Install selfservice-ui-react-nextjs
uses: actions/checkout@v7
with:
repository: ory/kratos-selfservice-ui-react-nextjs
path: react-ui
- run: |
cd react-ui
npm ci
- run: |
echo 'RN_UI_PATH='"$(realpath react-native-ui)" >> "$GITHUB_ENV"
echo 'NODE_UI_PATH='"$(realpath node-ui)" >> "$GITHUB_ENV"
echo 'REACT_UI_PATH='"$(realpath react-ui)" >> "$GITHUB_ENV"
- name: "Run Cypress tests"
run: ./test/e2e/run.sh ${{ matrix.database }}
env:
RN_UI_PATH: react-native-ui
NODE_UI_PATH: node-ui
REACT_UI_PATH: react-ui
CYPRESS_RECORD_KEY: ${{ secrets.CYPRESS_RECORD_KEY }}
- if: failure()
uses: actions/upload-artifact@v7
with:
name: cypress-${{ matrix.database }}-logs
path: test/e2e/*.e2e.log
test-e2e-playwright:
name: Run Playwright end-to-end tests
runs-on: ubuntu-latest
services:
postgres:
image: postgres:18
env:
POSTGRES_DB: postgres
POSTGRES_PASSWORD: test
POSTGRES_USER: test
ports:
- 5432:5432
mysql:
image: mysql:9.6
env:
MYSQL_ROOT_PASSWORD: test
ports:
- 3306:3306
mailslurper:
image: oryd/mailslurper:latest-smtps
ports:
- 4436:4436
- 4437:4437
- 1025:1025
env:
TEST_DATABASE_POSTGRESQL: "postgres://test:test@localhost:5432/postgres?sslmode=disable"
TEST_DATABASE_MYSQL: "mysql://root:test@(localhost:3306)/mysql?parseTime=true&multiStatements=true"
TEST_DATABASE_COCKROACHDB: "cockroach://root@localhost:26257/defaultdb?sslmode=disable"
strategy:
fail-fast: false
matrix:
database: ["postgres", "cockroach", "sqlite", "mysql"]
steps:
- uses: actions/setup-node@v6
with:
node-version: "24"
- run: |
docker create --name cockroach -p 26257:26257 \
cockroachdb/cockroach:latest-v25.4 start-single-node --insecure
docker start cockroach
name: Start CockroachDB
- 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
npx playwright install --with-deps
npm i -g expo-cli
name: Install node deps
- run: |
sudo apt-get install -y moreutils gettext
name: Install tools
- name: Setup Go
uses: actions/setup-go@v6
with:
check-latest: true
go-version-file: go.mod
- run: go build .
- name: Install selfservice-ui-react-native
uses: actions/checkout@v7
with:
repository: ory/kratos-selfservice-ui-react-native
path: react-native-ui
- run: |
cd react-native-ui
npm install
- name: Install selfservice-ui-node
uses: actions/checkout@v7
with:
repository: ory/kratos-selfservice-ui-node
path: node-ui
- run: |
cd node-ui
npm install --legacy-peer-deps
- name: Install selfservice-ui-react-nextjs
uses: actions/checkout@v7
with:
repository: ory/kratos-selfservice-ui-react-nextjs
path: react-ui
- run: |
cd react-ui
npm ci
- run: |
echo 'RN_UI_PATH='"$(realpath react-native-ui)" >> "$GITHUB_ENV"
echo 'NODE_UI_PATH='"$(realpath node-ui)" >> "$GITHUB_ENV"
echo 'REACT_UI_PATH='"$(realpath react-ui)" >> "$GITHUB_ENV"
- name: "Set up environment"
run: test/e2e/run.sh --only-setup
- name: "Run Playwright tests"
run: |
cd test/e2e
npm run playwright
env:
DB: ${{ matrix.database }}
RN_UI_PATH: react-native-ui
NODE_UI_PATH: node-ui
REACT_UI_PATH: react-ui
- if: failure()
uses: actions/upload-artifact@v7
with:
name: playwright-${{ matrix.database }}-logs
path: test/e2e/*.e2e.log
- if: failure()
uses: actions/upload-artifact@v7
with:
name: playwright-test-results-${{ matrix.database }}-${{ github.sha }}
path: |
test/e2e/test-results/
test/e2e/playwright-report/
docs-cli:
runs-on: ubuntu-latest
name: Build CLI docs
needs:
- test
steps:
- uses: ory/ci/docs/cli-next@master
with:
token: ${{ secrets.ORY_BOT_PAT }}
arg: "."
output-dir: docs/kratos
release:
name: Generate release
runs-on: ubuntu-latest
if: ${{ github.ref_type == 'tag' }}
needs:
- test
- test-e2e
steps:
- uses: ory/ci/releaser@master
with:
token: ${{ secrets.ORY_BOT_PAT }}
goreleaser_key: ${{ secrets.GORELEASER_KEY }}
cosign_pwd: ${{ secrets.COSIGN_PWD }}
docker_username: ${{ secrets.DOCKERHUB_USERNAME }}
docker_password: ${{ secrets.DOCKERHUB_PASSWORD }}
newsletter-draft:
name: Draft newsletter
runs-on: ubuntu-latest
if: ${{ github.ref_type == 'tag' }}
needs:
- release
steps:
- uses: ory/ci/newsletter@master
with:
mailchimp_list_id: f605a41b53
mailchmip_segment_id: 6479477
mailchimp_api_key: ${{ secrets.MAILCHIMP_API_KEY }}
draft: "true"
ssh_key: ${{ secrets.ORY_BOT_SSH_KEY }}
slack-approval-notification:
name: Pending approval Slack notification
runs-on: ubuntu-latest
if: ${{ github.ref_type == 'tag' }}
needs:
- newsletter-draft
steps:
- uses: ory/ci/newsletter/slack-notify@master
with:
slack-webhook-url: ${{ secrets.SLACK_WEBHOOK_URL }}
newsletter-send:
name: Send newsletter
runs-on: ubuntu-latest
needs:
- newsletter-draft
if: ${{ github.ref_type == 'tag' }}
environment: production
steps:
- uses: ory/ci/newsletter@master
with:
mailchimp_list_id: f605a41b53
mailchmip_segment_id: 6479477
mailchimp_api_key: ${{ secrets.MAILCHIMP_API_KEY }}
draft: "false"
ssh_key: ${{ secrets.ORY_BOT_SSH_KEY }}

30
.github/workflows/closed_references.yml vendored Normal file
View File

@@ -0,0 +1,30 @@
# AUTO-GENERATED, DO NOT EDIT!
# Please edit the original at https://github.com/ory/meta/blob/master/templates/repository/common/.github/workflows/closed_references.yml
name: Closed Reference Notifier
on:
schedule:
- cron: "0 0 * * *"
workflow_dispatch:
inputs:
issueLimit:
description: Max. number of issues to create
required: true
default: "5"
jobs:
find_closed_references:
if: github.repository_owner == 'ory'
runs-on: ubuntu-latest
name: Find closed references
steps:
- uses: actions/checkout@v7
- uses: actions/setup-node@v6
with:
node-version: "24"
- uses: ory/closed-reference-notifier@v1
with:
token: ${{ secrets.GITHUB_TOKEN }}
issueLabels: upstream,good first issue,help wanted
issueLimit: ${{ github.event.inputs.issueLimit || '5' }}

68
.github/workflows/codeql-analysis.yml vendored Normal file
View File

@@ -0,0 +1,68 @@
# For most projects, this workflow file will not need changing; you simply need
# to commit it to your repository.
#
# You may wish to alter this file to override the set of languages analyzed,
# or to provide custom queries or build logic.
#
# ******** NOTE ********
# We have attempted to detect the languages in your repository. Please check
# the `language` matrix defined below to confirm you have the correct set of
# supported CodeQL languages.
#
name: "CodeQL"
on:
push:
branches: [master]
pull_request:
# The branches below must be a subset of the branches above
branches: [master]
schedule:
- cron: "26 21 * * 3"
jobs:
analyze:
name: Analyze
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
language: ["go", "javascript"]
# CodeQL supports [ 'cpp', 'csharp', 'go', 'java', 'javascript', 'python' ]
# Learn more:
# https://docs.github.com/en/free-pro-team@latest/github/finding-security-vulnerabilities-and-errors-in-your-code/configuring-code-scanning#changing-the-languages-that-are-analyzed
steps:
- name: Checkout repository
uses: actions/checkout@v7
# Initializes the CodeQL tools for scanning.
- name: Initialize CodeQL
uses: github/codeql-action/init@v4
with:
languages: ${{ matrix.language }}
config-file: ./.github/codeql/codeql-config.yml
# If you wish to specify custom queries, you can do so here or in a config file.
# By default, queries listed here will override any specified in a config file.
# Prefix the list here with "+" to use these queries and those in the config file.
# queries: ./path/to/local/query, your-org/your-repo/queries@main
# 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@v4
# ℹ️ Command-line programs to run using the OS shell.
# 📚 https://git.io/JvXDl
# ✏️ If the Autobuild fails above, remove it and uncomment the following three lines
# and modify them (or add more) to build your code if your project
# uses a compiled language
#- run: |
# make bootstrap
# make release
- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@v4

View File

@@ -0,0 +1,59 @@
# AUTO-GENERATED, DO NOT EDIT!
# Please edit the original at https://github.com/ory/meta/blob/master/templates/repository/common/.github/workflows/conventional_commits.yml
name: Conventional commits
# This GitHub CI Action enforces that pull request titles follow conventional commits.
# More info at https://www.conventionalcommits.org.
#
# The Ory-wide defaults for commit titles and scopes are below.
# Your repository can add/replace elements via a configuration file at the path below.
# More info at https://github.com/ory/ci/blob/master/conventional_commit_config/README.md
on:
pull_request_target:
types:
- edited
- opened
- ready_for_review
- reopened
# pull_request: # for debugging, uses config in local branch but supports only Pull Requests from this repo
jobs:
main:
name: Validate PR title
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v7
- id: config
uses: ory/ci/conventional_commit_config@master
with:
config_path: .github/conventional_commits.json
default_types: |
feat
fix
revert
docs
style
refactor
test
build
autogen
security
ci
chore
default_scopes: |
deps
docs
default_require_scope: false
- uses: amannn/action-semantic-pull-request@v6
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
types: ${{ steps.config.outputs.types }}
scopes: ${{ steps.config.outputs.scopes }}
requireScope: ${{ steps.config.outputs.requireScope }}
subjectPattern: ^(?![A-Z]).+$
subjectPatternError: |
The subject should start with a lowercase letter, yours is uppercase:
"{subject}"

114
.github/workflows/cve-scan.yaml vendored Normal file
View File

@@ -0,0 +1,114 @@
# 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"
tags:
- "v*.*.*"
pull_request:
branches:
- "master"
permissions:
contents: read
security-events: write
jobs:
scanners:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v7
- name: Setup Env
id: vars
shell: bash
run: |
# Store values in local variables
SHA_SHORT=$(git rev-parse --short HEAD)
REPO_NAME=${{ github.event.repository.name }}
IMAGE_NAME="oryd/${REPO_NAME}:${SHA_SHORT}"
# 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@v4
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v4
with:
driver: docker
- name: Build images
shell: bash
run: |
IMAGE_TAG="${{ env.SHA_SHORT }}" make docker
- name: Login to GitHub Container Registry
uses: docker/login-action@v4
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Anchore Scanner
uses: anchore/scan-action@v7
id: grype-scan
with:
image: ${{ env.IMAGE_NAME }}
fail-build: true
severity-cutoff: high
add-cpes-if-none: true
- name: Inspect action SARIF report
shell: bash
if: ${{ always() }}
run: |
echo "::group::Anchore Scan Details"
jq '.runs[0].results' ${{ steps.grype-scan.outputs.sarif }}
echo "::endgroup::"
- name: Anchore upload scan SARIF report
if: always()
uses: github/codeql-action/upload-sarif@v4
with:
sarif_file: ${{ steps.grype-scan.outputs.sarif }}
- name: Kubescape scanner
uses: kubescape/github-action@main
id: kubescape
with:
image: ${{ env.IMAGE_NAME }}
verbose: true
format: pretty-printer
# can't whitelist CVE yet: https://github.com/kubescape/kubescape/pull/1568
severityThreshold: critical
- name: Dockle Linter
uses: erzz/dockle-action@v1
if: ${{ always() }}
with:
image: ${{ env.IMAGE_NAME }}
exit-code: 42
failure-threshold: high
- name: Hadolint
uses: hadolint/hadolint-action@v3.3.0
id: hadolint
if: ${{ always() }}
with:
dockerfile: .docker/Dockerfile-build
verbose: true
format: "json"
failure-threshold: "error"
- name: View Hadolint results
if: ${{ always() }}
shell: bash
run: |
echo "::group::Hadolint Scan Details"
echo "${HADOLINT_RESULTS}" | jq '.'
echo "::endgroup::"

21
.github/workflows/format.yml vendored Normal file
View File

@@ -0,0 +1,21 @@
name: Format
on:
pull_request:
merge_group:
env:
CGO_ENABLED: "0"
jobs:
format:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v7
- uses: actions/setup-go@v6
with:
check-latest: true
go-version-file: go.mod
- run: make format
- name: Indicate formatting issues
run: git diff HEAD --exit-code --color

25
.github/workflows/labels.yml vendored Normal file
View File

@@ -0,0 +1,25 @@
# AUTO-GENERATED, DO NOT EDIT!
# Please edit the original at https://github.com/ory/meta/blob/master/templates/repository/common/.github/workflows/labels.yml
name: Synchronize Issue Labels
on:
workflow_dispatch:
push:
branches:
- master
jobs:
milestone:
if: github.repository_owner == 'ory'
name: Synchronize Issue Labels
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v7
- name: Synchronize Issue Labels
uses: ory/label-sync-action@v0
with:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
dry: false
forced: true

33
.github/workflows/milestone.yml vendored Normal file
View File

@@ -0,0 +1,33 @@
# AUTO-GENERATED, DO NOT EDIT!
# Please edit the original at https://github.com/ory/meta/blob/master/templates/repository/server/.github/workflows/milestone.yml
name: Generate and Publish Milestone Document
on:
workflow_dispatch:
schedule:
- cron: "0 0 * * *"
jobs:
milestone:
if: github.repository_owner == 'ory'
name: Generate and Publish Milestone Document
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v7
with:
token: ${{ secrets.TOKEN_PRIVILEGED }}
- name: Milestone Documentation Generator
uses: ory/milestone-action@v0
with:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
outputFile: docs/docs/milestones.md
- name: Commit Milestone Documentation
uses: EndBug/add-and-commit@v10.0.0
with:
message: "autogen(docs): update milestone document"
author_name: aeneasr
author_email: "3372410+aeneasr@users.noreply.github.com"
env:
GITHUB_TOKEN: ${{ secrets.TOKEN_PRIVILEGED }}

30
.github/workflows/pm.yml vendored Normal file
View File

@@ -0,0 +1,30 @@
name: Synchronize with product board
on:
issues:
types:
- opened
pull_request:
types:
- opened
- ready_for_review
jobs:
automate:
if: github.event.pull_request.head.repo.fork == false
name: Add issue to project
runs-on: ubuntu-latest
timeout-minutes: 5
steps:
- uses: ory-corp/planning-automation-action@v0.2
with:
project: 5
organization: ory-corp
token: ${{ secrets.ORY_BOT_PAT }}
todoLabel: "Needs Triage"
statusName: Status
prStatusValue: "Needs Triage"
issueStatusValue: "Needs Triage"
includeEffort: "false"
monthlyMilestoneName: Roadmap Monthly
quarterlyMilestoneName: Roadmap

47
.github/workflows/stale.yml vendored Normal file
View File

@@ -0,0 +1,47 @@
# AUTO-GENERATED, DO NOT EDIT!
# Please edit the original at https://github.com/ory/meta/blob/master/templates/repository/common/.github/workflows/stale.yml
name: "Close Stale Issues"
on:
workflow_dispatch:
schedule:
- cron: "0 0 * * *"
jobs:
stale:
if: github.repository_owner == 'ory'
runs-on: ubuntu-latest
steps:
- uses: actions/stale@v10
with:
repo-token: ${{ secrets.GITHUB_TOKEN }}
stale-issue-message: |
Hello contributors!
I am marking this issue as stale as it has not received any engagement from the community or maintainers for a year. That does not imply that the issue has no merit! If you feel strongly about this issue
- open a PR referencing and resolving the issue;
- leave a comment on it and discuss ideas on how you could contribute towards resolving it;
- leave a comment and describe in detail why this issue is critical for your use case;
- open a new issue with updated details and a plan for resolving the issue.
Throughout its lifetime, Ory has received over 10.000 issues and PRs. To sustain that growth, we need to prioritize and focus on issues that are important to the community. A good indication of importance, and thus priority, is activity on a topic.
Unfortunately, [burnout](https://www.jeffgeerling.com/blog/2016/why-i-close-prs-oss-project-maintainer-notes) has become a [topic](https://opensource.guide/best-practices/#its-okay-to-hit-pause) of [concern](https://docs.brew.sh/Maintainers-Avoiding-Burnout) amongst open-source projects.
It can lead to severe personal and health issues as well as [opening](https://haacked.com/archive/2019/05/28/maintainer-burnout/) catastrophic [attack vectors](https://www.gradiant.org/en/blog/open-source-maintainer-burnout-as-an-attack-surface/).
The motivation for this automation is to help prioritize issues in the backlog and not ignore, reject, or belittle anyone.
If this issue was marked as stale erroneously you can exempt it by adding the `backlog` label, assigning someone, or setting a milestone for it.
Thank you for your understanding and to anyone who participated in the conversation! And as written above, please do participate in the conversation if this topic is important to you!
Thank you 🙏✌️
stale-issue-label: "stale"
exempt-issue-labels: "bug,blocking,docs,backlog"
days-before-stale: 365
days-before-close: 30
exempt-milestones: true
exempt-assignees: true
only-pr-labels: "stale"