Skip to content

Commit 1b1495c

Browse files
committed
init
0 parents  commit 1b1495c

File tree

14 files changed

+869
-0
lines changed

14 files changed

+869
-0
lines changed

.github/ISSUE_TEMPLATE/bug_report.md

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
---
2+
name: Bug report
3+
about: Create a report to help us improve
4+
title: "[BUG]"
5+
labels: bug
6+
assignees: mberbero
7+
8+
---
9+
10+
**Describe the bug**
11+
A clear and concise description of what the bug is.
12+
13+
**To Reproduce**
14+
Steps to reproduce the behavior:
15+
1. Go to '...'
16+
2. Click on '....'
17+
3. Scroll down to '....'
18+
4. See error
19+
20+
**Expected behavior**
21+
A clear and concise description of what you expected to happen.
22+
23+
**Screenshots**
24+
If applicable, add screenshots to help explain your problem.
25+
26+
**Additional context**
27+
Add any other context about the problem here.
Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
---
2+
name: Feature request
3+
about: Suggest an idea for this project
4+
title: "[FEATURE]"
5+
labels: enhancement
6+
assignees: mberbero
7+
8+
---
9+
10+
**Is your feature request related to a problem? Please describe.**
11+
A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]
12+
13+
**Describe the solution you'd like**
14+
A clear and concise description of what you want to happen.
15+
16+
**Describe alternatives you've considered**
17+
A clear and concise description of any alternative solutions or features you've considered.
18+
19+
**Additional context**
20+
Add any other context or screenshots about the feature request here.

.github/PULL_REQUEST_TEMPLATE.md

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
## Description
2+
3+
Please include a summary of the changes and the related issue. Please also include relevant motivation and context. List any dependencies that are required for this change.
4+
5+
Fixes #(issue)
6+
7+
## Type of Change
8+
9+
Please delete options that are not relevant.
10+
11+
- [ ] Bug fix (non-breaking change which fixes an issue)
12+
- [ ] New feature (non-breaking change which adds functionality)
13+
- [ ] Breaking change (fix or feature that would cause existing functionality to not work as expected)
14+
- [ ] Documentation update
15+
16+
## Checklist
17+
18+
- [ ] My code follows the style guidelines of this project
19+
- [ ] I have performed a self-review of my own code
20+
- [ ] I have commented my code, particularly in hard-to-understand areas
21+
- [ ] I have made corresponding changes to the documentation
22+
- [ ] My changes generate no new warnings
23+
- [ ] I have added tests that prove my fix is effective or that my feature works
24+
- [ ] New and existing unit tests pass locally with my changes
25+
- [ ] Any dependent changes have been merged and published in downstream modules
26+
27+
## Screenshots (if applicable)
28+
29+
Please add any screenshots that help explain your changes or show the new feature in action.
30+
31+
## Further Comments
32+
33+
If this is a relatively large or complex change, explain why you chose the solution you did and what alternatives you considered, etc.

.github/dependabot.yml

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
version: 2
2+
updates:
3+
- package-ecosystem: gomod
4+
directory: "/"
5+
schedule:
6+
interval: daily
7+
- package-ecosystem: github-actions
8+
directory: "/"
9+
schedule:
10+
interval: daily

.github/workflows/auto-merge.yaml

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
name: Dependabot auto-merge
2+
on: pull_request_target
3+
4+
permissions:
5+
contents: write
6+
pull-requests: write
7+
8+
jobs:
9+
dependabot:
10+
runs-on: ubuntu-latest
11+
if: ${{ github.actor == 'dependabot[bot]' }}
12+
steps:
13+
14+
- name: Approve a PR
15+
run: gh pr review --approve "$PR_URL"
16+
env:
17+
PR_URL: ${{github.event.pull_request.html_url}}
18+
GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}}
19+
20+
- name: Enable auto-merge for Dependabot PRs
21+
run: gh pr merge --auto --merge "$PR_URL"
22+
env:
23+
PR_URL: ${{github.event.pull_request.html_url}}
24+
GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}}

CODE_OF_CONDUCT.md

Lines changed: 79 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,79 @@
1+
# Contributor Covenant Code of Conduct
2+
3+
## Our Pledge
4+
5+
We as members, contributors, and leaders pledge to make participation in our community a harassment-free experience for everyone, regardless of age, body size, visible or invisible disability, ethnicity, sex characteristics, gender identity and expression, level of experience, education, socio-economic status, nationality, personal appearance, race, religion, or sexual identity and orientation.
6+
7+
We pledge to act and interact in ways that contribute to an open, welcoming, diverse, inclusive, and healthy community.
8+
9+
## Our Standards
10+
11+
Examples of behavior that contributes to a positive environment for our community include:
12+
13+
* Demonstrating empathy and kindness toward other people
14+
* Being respectful of differing opinions, viewpoints, and experiences
15+
* Giving and gracefully accepting constructive feedback
16+
* Accepting responsibility and apologizing to those affected by our mistakes, and learning from the experience
17+
* Focusing on what is best not just for us as individuals, but for the overall community
18+
19+
Examples of unacceptable behavior include:
20+
21+
* The use of sexualized language or imagery, and sexual attention or advances of any kind
22+
* Trolling, insulting or derogatory comments, and personal or political attacks
23+
* Public or private harassment
24+
* Publishing others' private information, such as a physical or email address, without their explicit permission
25+
* Other conduct which could reasonably be considered inappropriate in a professional setting
26+
27+
## Enforcement Responsibilities
28+
29+
Community leaders are responsible for clarifying and enforcing our standards of acceptable behavior and will take appropriate and fair corrective action in response to any behavior that they deem inappropriate, threatening, offensive, or harmful.
30+
31+
Community leaders have the right and responsibility to remove, edit, or reject comments, commits, code, wiki edits, issues, and other contributions that are not aligned to this Code of Conduct, and will communicate reasons for moderation decisions when appropriate.
32+
33+
## Scope
34+
35+
This Code of Conduct applies within all community spaces, and also applies when an individual is officially representing the community in public spaces. Examples of representing our community include using an official e-mail address, posting via an official social media account, or acting as an appointed representative at an online or offline event.
36+
37+
## Enforcement
38+
39+
Instances of abusive, harassing, or otherwise unacceptable behavior may be reported to the community leaders responsible for enforcement at [[email protected]]. All complaints will be reviewed and investigated promptly and fairly.
40+
41+
All community leaders are obligated to respect the privacy and security of the reporter of any incident.
42+
43+
## Enforcement Guidelines
44+
45+
Community leaders will follow these Community Impact Guidelines in determining the consequences for any action they deem in violation of this Code of Conduct:
46+
47+
### 1. Correction
48+
49+
**Community Impact**: Use of inappropriate language or other behavior deemed unprofessional or unwelcome in the community.
50+
51+
**Consequence**: A private, written warning from community leaders, providing clarity around the nature of the violation and an explanation of why the behavior was inappropriate. A public apology may be requested.
52+
53+
### 2. Warning
54+
55+
**Community Impact**: A violation through a single incident or series of actions.
56+
57+
**Consequence**: A warning with consequences for continued behavior. No interaction with the people involved, including unsolicited interaction with those enforcing the Code of Conduct, for a specified period of time. This includes avoiding interactions in community spaces as well as external channels like social media. Violating these terms may lead to a temporary or permanent ban.
58+
59+
### 3. Temporary Ban
60+
61+
**Community Impact**: A serious violation of community standards, including sustained inappropriate behavior.
62+
63+
**Consequence**: A temporary ban from any sort of interaction or public communication with the community for a specified period of time. No public or private interaction with the people involved, including unsolicited interaction with those enforcing the Code of Conduct, is allowed during this period. Violating these terms may lead to a permanent ban.
64+
65+
### 4. Permanent Ban
66+
67+
**Community Impact**: Demonstrating a pattern of violation of community standards, including sustained inappropriate behavior, harassment of an individual, or aggression toward or disparagement of classes of individuals.
68+
69+
**Consequence**: A permanent ban from any sort of public interaction within the community.
70+
71+
## Attribution
72+
73+
This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 2.1, available at [https://www.contributor-covenant.org/version/2/1/code_of_conduct.html](https://www.contributor-covenant.org/version/2/1/code_of_conduct.html).
74+
75+
Community Impact Guidelines were inspired by [Mozilla's code of conduct enforcement ladder](https://github.com/mozilla/diversity).
76+
77+
For answers to common questions about this code of conduct, see the FAQ at [https://www.contributor-covenant.org/faq](https://www.contributor-covenant.org/faq). Translations are available at [https://www.contributor-covenant.org/translations](https://www.contributor-covenant.org/translations).
78+
79+
[homepage]: https://www.contributor-covenant.org

CONTRIBUTING.md

Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
# Contributing to [Certy]
2+
3+
First off, thanks for taking the time to contribute! 🎉
4+
5+
The following is a set of guidelines for contributing to [Project Name]. These are mostly guidelines, not rules. Use your best judgment, and feel free to propose changes to this document in a pull request.
6+
7+
## How Can I Contribute?
8+
9+
### Reporting Bugs
10+
11+
If you find a bug in the project, please create an issue on GitHub. Be sure to include:
12+
13+
- A clear and descriptive title
14+
- Steps to reproduce the issue
15+
- Expected and actual results
16+
- Any relevant logs or screenshots
17+
18+
### Suggesting Enhancements
19+
20+
If you have an idea to improve the project, please create an issue on GitHub. Describe the enhancement in detail and provide any relevant examples or documentation.
21+
22+
### Submitting Pull Requests
23+
24+
#### Before Submitting a Pull Request
25+
26+
- Fork the repository and create your branch from `main`.
27+
- Ensure that your changes pass the existing tests and add new tests if necessary.
28+
- Ensure that your code adheres to the project's coding standards and style.
29+
- Update the documentation if necessary.
30+
31+
#### Pull Request Process
32+
33+
1. Ensure any install or build dependencies are removed before the end of the layer when doing a build.
34+
2. Update the README.md with details of changes to the interface, this includes new environment variables, exposed ports, useful file locations, and container parameters.
35+
3. Increase the version numbers in any examples files and the README.md to the new version that this Pull Request would represent. The versioning scheme we use is [SemVer](http://semver.org/).
36+
4. You may merge the Pull Request in once you have the sign-off of two other developers, or if you do not have permission to do that, you may request the second reviewer to merge it for you.
37+
38+
### Coding Standards
39+
40+
- Follow the existing code style.
41+
- Write clear and concise commit messages.
42+
- Document your code where necessary.

LICENSE

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
MIT License
2+
3+
Permission is hereby granted, free of charge, to any person obtaining a copy
4+
of this software and associated documentation files (the "Software"), to deal
5+
in the Software without restriction, including without limitation the rights
6+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
7+
copies of the Software, and to permit persons to whom the Software is
8+
furnished to do so, subject to the following conditions:
9+
10+
The above copyright notice and this permission notice shall be included in all
11+
copies or substantial portions of the Software.
12+
13+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
14+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
15+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
16+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
17+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
18+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
19+
SOFTWARE.

README.md

Lines changed: 75 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,75 @@
1+
<p align="center">
2+
<img src="logo.png" alt="Certy" width="200" height="200">
3+
</p>
4+
5+
6+
# Certy
7+
8+
[![Go Report Card](https://goreportcard.com/badge/github.com/kintsdev/certy)](https://goreportcard.com/report/github.com/kintsdev/certy)
9+
10+
[![GoDoc](https://godoc.org/github.com/kintsdev/certy?status.svg)](https://godoc.org/github.com/kintsdev/certy)
11+
12+
![License](https://img.shields.io/badge/License-MIT-blue.svg)
13+
14+
Certy is a Go package that automates the process of obtaining SSL certificates from Let's Encrypt using the ACME protocol. It handles the entire process from generating the account key, registering an ACME account, handling the HTTP-01 challenge, and issuing the certificate.
15+
16+
## Installation
17+
18+
To install Certy, use `go get`:
19+
20+
```sh
21+
go get github.com/kintsdev/certy
22+
```
23+
24+
## Usage
25+
26+
Here is an example of how to use Certy to issue a Let's Encrypt certificate for a domain:
27+
28+
### Import the package
29+
30+
```go
31+
import "github.com/kintsdev/certy"
32+
```
33+
34+
```go
35+
package main
36+
37+
import (
38+
"github.com/kintsdev/certy"
39+
"log"
40+
"os"
41+
)
42+
43+
func main() {
44+
email := "[email protected]"
45+
domain := "yourdomain.com"
46+
location := "/path/to/save/certificates"
47+
48+
if err := os.Setenv("ACME_ENV", "staging"); err != nil {
49+
log.Fatalf("Failed to set environment variable: %v", err)
50+
}
51+
52+
certy.IssueLetsEncryptCert(email, domain, location)
53+
}
54+
55+
```
56+
57+
### Environment Variables
58+
59+
- `ACME_ENV`: Set this environment variable to "staging" to use the Let's Encrypt staging server. This is useful for testing. If this environment variable is not set, the production server will be used.
60+
61+
## Files Generated
62+
63+
The IssueLetsEncryptCert function will generate the following files in the current directory:
64+
65+
- location/yourdomain.com/yourdomain.com-cert.pem: The certificate.
66+
- location/yourdomain.com/yourdomain.com-key.pem: The private key.
67+
- location/yourdomain.com/yourdomain.com-acme.json: The ACME registration information.
68+
69+
## License
70+
71+
This project is licensed under the MIT License - see the [LICENSE](LICENSE) file for details.
72+
73+
## Contributing
74+
75+
Contributions are welcome! Please open an issue or submit a pull request for any bugs or enhancements.

SECURITY.md

Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
# Security Policy
2+
3+
## Supported Versions
4+
5+
We take security seriously and will do our best to address security issues in a timely manner. Here is the list of versions that are currently being supported with security updates:
6+
7+
| Version | Supported |
8+
| ------- | ------------------ |
9+
| 1.x | :white_check_mark: |
10+
| < 1.0 | :x: |
11+
12+
## Reporting a Vulnerability
13+
14+
If you discover a security vulnerability, please report it to us as soon as possible. We appreciate your efforts to responsibly disclose your findings, and will make every effort to acknowledge your report promptly.
15+
16+
### How to Report
17+
18+
1. **Email:** Send an email to [[email protected]](mailto:[email protected]) with the subject line "Security Vulnerability in [Project Name]".
19+
2. **Details:** Include as much information as possible about the vulnerability. Please include:
20+
- The steps to reproduce the vulnerability
21+
- The potential impact
22+
- Any possible mitigations or fixes
23+
3. **Confidentiality:** Please do not publicly disclose the vulnerability until we have had a chance to investigate and address it.
24+
25+
### What to Expect
26+
27+
- We will acknowledge receipt of your report within 24 hours.
28+
- We will provide an estimated timeframe for addressing the vulnerability.
29+
- We will keep you informed of the progress as we work on a fix.
30+
- Once the vulnerability is fixed, we will coordinate with you on an appropriate disclosure timeline.
31+
32+
## Security Best Practices
33+
34+
While we work to ensure that [Project Name] is secure, it is also important for users to follow best practices to protect their deployments:
35+
36+
- Keep your software up to date with the latest versions.
37+
- Regularly review and apply security patches.
38+
- Use strong, unique passwords and enable multi-factor authentication (MFA) where possible.
39+
- Regularly review your system logs and monitor for unusual activity.
40+
- Backup your data regularly and verify the integrity of your backups.
41+
42+
## Contact
43+
44+
If you have any questions or need further assistance, feel free to contact us at [[email protected]](mailto:[email protected]).
45+
46+
Thank you for helping us keep [Project Name] secure!

0 commit comments

Comments
 (0)