Skip to content

Commit cdc83f9

Browse files
committed
Add contributing guidelines and a pull request template
CONTRIBUTING.md names the branch pull requests target, describes the quality checks they must pass, points security reports to private vulnerability reporting, and sets out the policy for AI-assisted contributions: the human contributor stays accountable, and AI help is disclosed with Assisted-by trailers rather than Co-Authored-By. The pull request template asks for the same disclosure. Assisted-by: Google Antigravity (gemini-4-argon, initial draft) Assisted-by: Claude Code (claude-opus-5-5, review & corrections)
1 parent 869eea6 commit cdc83f9

2 files changed

Lines changed: 97 additions & 0 deletions

File tree

‎.github/PULL_REQUEST_TEMPLATE.md‎

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
## Description
2+
3+
<!-- Briefly describe the changes introduced by this Pull Request and the motivation behind them. -->
4+
5+
## Checklist
6+
7+
- [ ] Tests have been added or updated to cover the changes.
8+
- [ ] All quality checks and tests pass (`composer pre-commit`).
9+
- [ ] Documentation has been updated if applicable.
10+
11+
## AI Usage Disclosure
12+
13+
<!-- Please see CONTRIBUTING.md for our AI-Assisted Contributions Policy. -->
14+
15+
- [ ] No AI tools were materially used in preparing this contribution.
16+
- [ ] AI tools were used to assist with this contribution, and I have personally reviewed, tested, and understood all submitted changes.
17+
18+
<!-- If AI tools were used, please list them below (or ensure `Assisted-by:` trailers are included in your commits): -->
19+
<!-- Example:
20+
Assisted-by: Claude Code (claude-opus-5-5, implementation & unit tests)
21+
Assisted-by: OpenAI Codex (gpt-6.1-sol, xhigh review)
22+
-->

‎CONTRIBUTING.md‎

Lines changed: 75 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,75 @@
1+
# Contributing to SimpleSAMLphp Module OIDC
2+
3+
Thank you for your interest in contributing to `simplesamlphp-module-oidc`!
4+
5+
## Target Branch
6+
7+
Open pull requests against the `master` branch, which tracks the currently released version.
8+
9+
## Development & Quality Checks
10+
11+
Before submitting a Pull Request, please make sure your changes adhere to the project's coding standards and pass all automated checks:
12+
13+
1. **Line Endings:** Use Unix-style LF (`\n`) line endings across all files.
14+
2. **Quality & Test Suite:** Run the pre-commit suite defined in `composer.json`:
15+
16+
```bash
17+
composer pre-commit
18+
```
19+
20+
This executes:
21+
* **PHP_CodeSniffer** (`vendor/bin/phpcbf` and `vendor/bin/phpcs`)
22+
* **Psalm** (`vendor/bin/psalm`)
23+
* **PHPUnit** (`vendor/bin/phpunit`)
24+
25+
`phpcbf` fixes coding-standard violations in place. If it changes any files, review the changes and run the command again until it passes.
26+
27+
3. **Targeted Tests:** You can also run unit and integration suites separately:
28+
29+
```bash
30+
composer unit-tests
31+
composer integration-tests
32+
```
33+
34+
The integration tests start their dependencies in containers (Testcontainers), so they need a running Docker daemon.
35+
36+
## Reporting Security Vulnerabilities
37+
38+
Please do not report security vulnerabilities in public issues or pull requests. Report them privately through [GitHub's private vulnerability reporting](https://github.com/simplesamlphp/simplesamlphp-module-oidc/security/advisories/new) for this repository instead.
39+
40+
## AI-Assisted Contributions Policy
41+
42+
We welcome the responsible use of Large Language Models (LLMs) and AI coding assistants, provided that **human accountability** and **transparency** are maintained.
43+
44+
### 1. Human Accountability
45+
46+
* **You are the author:** The human contributor bears 100% responsibility for the correctness, licensing compliance, and security of the submitted code.
47+
* **Understand what you submit:** Because this module implements security-critical authentication and authorization protocols (OAuth 2.0 / OpenID Connect), you must personally review, test, and understand every line of code in your contribution. Unverified or unreviewed AI-generated pull requests will be closed.
48+
49+
### 2. Mandatory Disclosure
50+
51+
If AI tools materially assisted with your contribution (for example: drafting code, writing unit/integration tests, refactoring, or automated code reviews whose findings you acted on—beyond basic single-line IDE autocomplete), you must disclose their use.
52+
53+
#### In Commit Messages (Preferred)
54+
55+
Include one or more `Assisted-by:` trailers at the bottom of your commit message specifying the tool, the model (its exact identifier, as the tool reports it), and optionally the scope of assistance:
56+
57+
```text
58+
Assisted-by: <Tool Name> (<Model ID>, <optional scope>)
59+
```
60+
61+
Examples:
62+
63+
```text
64+
Assisted-by: Claude Code (claude-opus-5-5, implementation & unit tests)
65+
Assisted-by: OpenAI Codex (gpt-6.1-sol, xhigh review)
66+
Assisted-by: Google Antigravity (gemini-3.8-flash-high, review)
67+
```
68+
69+
#### In Pull Requests
70+
71+
Fill out the **AI Usage Disclosure** section in the Pull Request template when opening a PR (especially if you did not include `Assisted-by:` trailers in individual commits).
72+
73+
### 3. Avoid `Co-Authored-By:` for AI Tools
74+
75+
Please **do not** use `Co-Authored-By:` (e.g., `Co-Authored-By: ... <noreply@...>`) or `Reviewed-by:` trailers for AI models. In Git history, authorship and formal review sign-off are reserved for human contributors; use `Assisted-by:` instead to record AI tool provenance.

0 commit comments

Comments
 (0)