Skip to content

Commit 24e1823

Browse files
authored
Merge pull request #4991 from weiznich/feature/more_policies
Add a security and a LLM/AI policy to the projects
2 parents 0101929 + bb0c604 commit 24e1823

File tree

4 files changed

+98
-10
lines changed

4 files changed

+98
-10
lines changed

.github/ISSUE_TEMPLATE/config.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,3 +9,6 @@ contact_links:
99
- name: Feature Requests
1010
url: https://github.com/diesel-rs/diesel/discussions/categories/ideas
1111
about: If you want to suggest a new feature please create a new topic in our discussions forum
12+
- name: Report a security vulnerability
13+
url: https://github.com/diesel-rs/diesel/security/advisories/new
14+
about: Please review our security policy for more details

.github/pull_request_template.md

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
<!--
2+
Please provide a short brief summary description of your change here.
3+
Also make sure that your code passes all tests and style checks.
4+
Checkout the `CONTRIBUTING.md` file in the root of the repository for running these checks locally.
5+
It's also fine to use the CI setup for running these tests, but in this case please indicate that your PR
6+
is not ready for review yet by marking it as DRAFT until it is ready.
7+
8+
If you submit a notable change please ensure to include it into the CHANGELOG.md file in
9+
the root of the repository.
10+
11+
Also make sure to follow the projects guide lines about the usage of LLM's and AI agents as outlined
12+
in the CONTRIBUTING.md file in the root of the repository.
13+
-->
14+
15+
- [ ] I checked for similar changes and make sure to reference them
16+
- [ ] I included a changelog entry for relevant new features or changes

CONTRIBUTING.md

Lines changed: 21 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -152,16 +152,27 @@ To run rustfmt tests locally:
152152
You can also use rustfmt to make corrections or highlight issues in your editor.
153153
Check out [their README](https://github.com/rust-lang/rustfmt) for details.
154154

155-
### Usage of LLMs and AI agents
156-
157-
The Diesel project doesn't completely disallow to usage of LLMs and AI agents for contributions. There are still a number of restrictions and rules you as a PR author are asked to follow.
158-
159-
Most importantly you as the author of the PR are responsible for carefully reviewing the generated code to make sure that:
160-
161-
* It is correct to your best knowledge
162-
* It does not contain any copyrighted code that is incompatible with the license used by Diesel
163-
164-
Furthermore you are asked to disclose the usage of any such tools in your PR description.
155+
### Usage of LLM's/AI agents
156+
157+
The Diesel project does not strictly forbid the usage of LLM's and AI agents for submitting pull requests.
158+
There are still a number of restrictions and rules you as a PR author are asked to follow:
159+
160+
* You need to make sure that the code you are trying to submit can be licences under the relevant open source License used by Diesel. It cannot contain any code that is incompatible with the licenses used by Diesel.
161+
* You need to fully understand and review any generated code before submitting a PR. The expectation from the reviewer team is
162+
to discuss these changes with you as a person.
163+
* You need to ensure that the submitted code satisfies the general requirements of submitting PR's to Diesel. That especially includes the following points:
164+
+ The Code passes all tests and style checks
165+
+ The change is as minimal as possible. Huge changes will be just dismissed
166+
+ You verified that the change actually fixes/implements what it is supposed to fix/implement
167+
+ The change contains a sufficient amount of documentation to help others following the code
168+
* The usage of LLM's/AI need to be disclosed (See the linked NlNet resource on how to do that in a meaningful way)
169+
* We ask you to write pull request descriptions and discussion comments on your own.
170+
We are able to ask an AI agent on our own if we feel that might be helpful.
171+
* For issues marked as "mentoring available" or "good first issue" consider that these issues are for onboarding new contributors
172+
to the code base. Consider if fully solving such an issue only by using LLM's/AI is helping you to gain experience.
173+
174+
For a more in depth description we would like to point to NlNet's policies about [using generative AI](https://nlnet.nl/foundation/policies/generativeAI/) in projects they are funding. This document outlines many of the points
175+
above in with more details and explanations.
165176
166177
### Common Abbreviations
167178

SECURITY.md

Lines changed: 58 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,58 @@
1+
# Security Policy for Diesel
2+
3+
## Supported Versions
4+
5+
The Diesel team provides only support for the latest released version at Diesel at any point in time. Users are strongly encouraged to upgrade to the latest version for the best security posture.
6+
7+
## Reporting a Vulnerability
8+
9+
We take the security of Diesel very seriously. If you believe you've found a security vulnerability, we encourage you to inform us responsibly through coordinated disclosure.
10+
11+
### How to Report
12+
13+
**Do not report security vulnerabilities through public GitHub issues, discussions, or social media.**
14+
15+
Instead, please use one of these secure channels:
16+
17+
1. **GitHub Security Advisories** (preferred): Use the "Report a vulnerability" button in the Security tab
18+
2. **Email** (backup): Send details to `github@weiznich.de`
19+
20+
### What to Include
21+
22+
To help us understand and address the issue quickly, please include:
23+
24+
**Required Information:**
25+
- Brief description of the vulnerability type (6 or less sentences)
26+
- Affected version(s) and components
27+
- Proof-of-concept code to reproduce the issue
28+
29+
**Helpful Additional Details:**
30+
- Full paths of affected source files
31+
- Suggested mitigation or fix (if you have ideas)
32+
- A path resolving the reported problem
33+
34+
Your initial report should be rather brief. For the case that additional details might be required for confirming the reported problem or to asses the severity of the reported issue the Diesel team will provide detailed followup questions.
35+
36+
### Our Response Process
37+
38+
**What We'll Do:**
39+
1. Acknowledge your report and assign a tracking ID
40+
2. Assess the vulnerability and determine severity
41+
3. Develop and test a fix
42+
4. Coordinate disclosure timeline with you
43+
5. Release security update and publish advisory
44+
6. Credit you in our security advisory (if desired)
45+
46+
## Scope
47+
48+
This security policy applies to:
49+
50+
**In Scope:**
51+
- The Diesel Query builder
52+
- Any Diesel procedural macro
53+
- The Diesel command line tool
54+
55+
**Out of Scope:**
56+
- Any general Rust/Cargo security issue
57+
- Any issue occurring in a third party crate that cannot be triggered through Diesel code
58+

0 commit comments

Comments
 (0)