Skip to content

Commit 86ee1ee

Browse files
add code of conduct, contributing and security guidelines (#61)
1 parent adcbf61 commit 86ee1ee

File tree

5 files changed

+182
-34
lines changed

5 files changed

+182
-34
lines changed

CONTRIBUTING.md

Lines changed: 59 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,59 @@
1+
# MinIO Console Server Contribution Guide [![Slack](https://slack.min.io/slack?type=svg)](https://slack.min.io)
2+
3+
This is a REST portal server created using [go-swagger](https://github.com/go-swagger/go-swagger)
4+
5+
The API handlers are created using a YAML definition located in `swagger.YAML`.
6+
7+
To add new api, the YAML file needs to be updated with all the desired apis using the [Swagger Basic Structure](https://swagger.io/docs/specification/2-0/basic-structure/), this includes paths, parameters, definitions, tags, etc.
8+
9+
## Generate server from YAML
10+
Once the YAML file is ready we can autogenerate the code needed for the new api by just running:
11+
12+
Validate it:
13+
```
14+
swagger validate ./swagger.yml
15+
```
16+
Update server code:
17+
```
18+
make swagger-gen
19+
```
20+
21+
This will update all the necessary code.
22+
23+
`./restapi/configure_mcs.go` is a file that contains the handlers to be used by the application, here is the only place where we need to update our code to support the new apis. This file is not affected when running the swagger generator and it is safe to edit.
24+
25+
## Unit Tests
26+
`./restapi/handlers_test.go` needs to be updated with the proper tests for the new api.
27+
28+
To run tests:
29+
```
30+
go test ./restapi
31+
```
32+
33+
## Commit changes
34+
After verification, commit your changes. This is a [great post](https://chris.beams.io/posts/git-commit/) on how to write useful commit messages
35+
36+
```
37+
$ git commit -am 'Add some feature'
38+
```
39+
40+
### Push to the branch
41+
Push your locally committed changes to the remote origin (your fork)
42+
```
43+
$ git push origin my-new-feature
44+
```
45+
46+
### Create a Pull Request
47+
Pull requests can be created via GitHub. Refer to [this document](https://help.github.com/articles/creating-a-pull-request/) for detailed steps on how to create a pull request. After a Pull Request gets peer reviewed and approved, it will be merged.
48+
49+
## FAQs
50+
### How does ``mcs`` manages dependencies?
51+
``MinIO`` uses `go mod` to manage its dependencies.
52+
- Run `go get foo/bar` in the source folder to add the dependency to `go.mod` file.
53+
54+
To remove a dependency
55+
- Edit your code and remove the import reference.
56+
- Run `go mod tidy` in the source folder to remove dependency from `go.mod` file.
57+
58+
### What are the coding guidelines for mcs?
59+
``mcs`` is fully conformant with Golang style. Refer: [Effective Go](https://github.com/golang/go/wiki/CodeReviewComments) article from Golang project. If you observe offending code, please feel free to send a pull request or ping us on [Slack](https://slack.min.io).

DEVELOPMENT.md

Lines changed: 0 additions & 31 deletions
This file was deleted.

README.md

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -62,6 +62,5 @@ export MCS_MINIO_SERVER=http://localhost:9000
6262

6363
You can verify that the apis work by doing the request on `localhost:9090/api/v1/...`
6464

65-
# Development
66-
67-
For development on this project please refer to our [DEVELOPMENT.md](DEVELOPMENT.md)
65+
# Contribute to mcs Project
66+
Please follow mcs [Contributor's Guide](https://github.com/minio/mcs/blob/master/CONTRIBUTING.md)

SECURITY.md

Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
# Security Policy
2+
3+
## Supported Versions
4+
5+
We always provide security updates for the [latest release](https://github.com/minio/mcs/releases/latest).
6+
Whenever there is a security update you just need to upgrade to the latest version.
7+
8+
## Reporting a Vulnerability
9+
10+
All security bugs in [minio/mcs](https://github,com/minio/mcs) (or other minio/* repositories)
11+
should be reported by email to [email protected]. Your email will be acknowledged within 48 hours,
12+
and you'll receive a more detailed response to your email within 72 hours indicating the next steps
13+
in handling your report.
14+
15+
Please, provide a detailed explanation of the issue. In particular, outline the type of the security
16+
issue (DoS, authentication bypass, information disclose, ...) and the assumptions you're making (e.g. do
17+
you need access credentials for a successful exploit).
18+
19+
If you have not received a reply to your email within 48 hours or you have not heard from the security team
20+
for the past five days please contact the security team directly:
21+
- Primary security coordinator: [email protected]
22+
- Secondary coordinator: [email protected], [email protected]
23+
- If you receive no response: [email protected]
24+
25+
### Disclosure Process
26+
27+
MinIO uses the following disclosure process:
28+
29+
1. Once the security report is received one member of the security team tries to verify and reproduce
30+
the issue and determines the impact it has.
31+
2. A member of the security team will respond and either confirm or reject the security report.
32+
If the report is rejected the response explains why.
33+
3. Code is audited to find any potential similar problems.
34+
4. Fixes are prepared for the latest release.
35+
5. On the date that the fixes are applied a security advisory will be published on https://blog.min.io.
36+
Please inform us in your report email whether MinIO should mention your contribution w.r.t. fixing
37+
the security issue. By default MinIO will **not** publish this information to protect your privacy.
38+
39+
This process can take some time, especially when coordination is required with maintainers of other projects.
40+
Every effort will be made to handle the bug in as timely a manner as possible, however it's important that we
41+
follow the process described above to ensure that disclosures are handled consistently.

code_of_conduct.md

Lines changed: 80 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,80 @@
1+
# Contributor Covenant Code of Conduct
2+
3+
## Our Pledge
4+
5+
In the interest of fostering an open and welcoming environment, we as
6+
contributors and maintainers pledge to making participation in our project and
7+
our community a harassment-free experience for everyone, regardless of age, body
8+
size, disability, ethnicity, gender identity and expression, level of experience,
9+
nationality, personal appearance, race, religion, or sexual identity and
10+
orientation.
11+
12+
## Our Standards
13+
14+
Examples of behavior that contributes to creating a positive environment
15+
include:
16+
17+
* Using welcoming and inclusive language
18+
* Being respectful of differing viewpoints and experiences
19+
* Gracefully accepting constructive criticism
20+
* Focusing on what is best for the community
21+
* Showing empathy towards other community members
22+
23+
Examples of unacceptable behavior by participants include:
24+
25+
* The use of sexualized language or imagery and unwelcome sexual attention or
26+
advances
27+
* Trolling, insulting/derogatory comments, and personal or political attacks
28+
* Public or private harassment
29+
* Publishing others' private information, such as a physical or electronic
30+
address, without explicit permission
31+
* Other conduct which could reasonably be considered inappropriate in a
32+
professional setting
33+
34+
## Our Responsibilities
35+
36+
Project maintainers are responsible for clarifying the standards of acceptable
37+
behavior and are expected to take appropriate and fair corrective action in
38+
response to any instances of unacceptable behavior, in compliance with the
39+
licensing terms applying to the Project developments.
40+
41+
Project maintainers have the right and responsibility to remove, edit, or
42+
reject comments, commits, code, wiki edits, issues, and other contributions
43+
that are not aligned to this Code of Conduct, or to ban temporarily or
44+
permanently any contributor for other behaviors that they deem inappropriate,
45+
threatening, offensive, or harmful. However, these actions shall respect the
46+
licensing terms of the Project Developments that will always supersede such
47+
Code of Conduct.
48+
49+
## Scope
50+
51+
This Code of Conduct applies both within project spaces and in public spaces
52+
when an individual is representing the project or its community. Examples of
53+
representing a project or community include using an official project e-mail
54+
address, posting via an official social media account, or acting as an appointed
55+
representative at an online or offline event. Representation of a project may be
56+
further defined and clarified by project maintainers.
57+
58+
## Enforcement
59+
60+
Instances of abusive, harassing, or otherwise unacceptable behavior may be
61+
reported by contacting the project team at [email protected]. The project team
62+
will review and investigate all complaints, and will respond in a way that it deems
63+
appropriate to the circumstances. The project team is obligated to maintain
64+
confidentiality with regard to the reporter of an incident.
65+
Further details of specific enforcement policies may be posted separately.
66+
67+
Project maintainers who do not follow or enforce the Code of Conduct in good
68+
faith may face temporary or permanent repercussions as determined by other
69+
members of the project's leadership.
70+
71+
## Attribution
72+
73+
This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 1.4,
74+
available at [http://contributor-covenant.org/version/1/4][version]
75+
76+
This version includes a clarification to ensure that the code of conduct is in
77+
compliance with the free software licensing terms of the project.
78+
79+
[homepage]: http://contributor-covenant.org
80+
[version]: http://contributor-covenant.org/version/1/4/

0 commit comments

Comments
 (0)