Skip to content

Commit

Permalink
feat: update everything in the repo (#316)
Browse files Browse the repository at this point in the history
  • Loading branch information
favna authored Jan 29, 2022
1 parent 82a5765 commit 45bf8dd
Show file tree
Hide file tree
Showing 57 changed files with 4,769 additions and 3,730 deletions.
16 changes: 8 additions & 8 deletions .eslintrc.json
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
{
"extends": "bamboo",
"rules": {
"no-useless-constructor": 0,
"@typescript-eslint/unified-signatures": 0
},
"globals": {
"BigInt": true
}
"extends": "@sapphire",
"rules": {
"no-useless-constructor": 0,
"@typescript-eslint/unified-signatures": 0
},
"globals": {
"BigInt": true
}
}
1 change: 0 additions & 1 deletion .gitattributes

This file was deleted.

8 changes: 8 additions & 0 deletions .github/CODEOWNERS
Validating CODEOWNERS rules …
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
# Source files
/src/ @kyranet
/tests/ @kyranet

# Project setup
.yarnrc.yml @favna
tsconfig.base.json @favna
tsconfig.eslint.json @favna
128 changes: 128 additions & 0 deletions .github/CODE_OF_CONDUCT.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,128 @@
# Contributor Covenant Code of Conduct

## Our Pledge

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.

We pledge to act and interact in ways that contribute to an open, welcoming,
diverse, inclusive, and healthy community.

## Our Standards

Examples of behavior that contributes to a positive environment for our
community include:

- Demonstrating empathy and kindness toward other people
- Being respectful of differing opinions, viewpoints, and experiences
- Giving and gracefully accepting constructive feedback
- Accepting responsibility and apologizing to those affected by our mistakes,
and learning from the experience
- Focusing on what is best not just for us as individuals, but for the
overall community

Examples of unacceptable behavior include:

- The use of sexualized language or imagery, and sexual attention or
advances of any kind
- Trolling, insulting or derogatory comments, and personal or political attacks
- Public or private harassment
- Publishing others' private information, such as a physical or email
address, without their explicit permission
- Other conduct which could reasonably be considered inappropriate in a
professional setting

## Enforcement Responsibilities

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.

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.

## Scope

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.

## Enforcement

Instances of abusive, harassing, or otherwise unacceptable behavior may be
reported to the community leaders responsible for enforcement at
kyradiscord@gmail.com.
All complaints will be reviewed and investigated promptly and fairly.

All community leaders are obligated to respect the privacy and security of the
reporter of any incident.

## Enforcement Guidelines

Community leaders will follow these Community Impact Guidelines in determining
the consequences for any action they deem in violation of this Code of Conduct:

### 1. Correction

**Community Impact**: Use of inappropriate language or other behavior deemed
unprofessional or unwelcome in the community.

**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.

### 2. Warning

**Community Impact**: A violation through a single incident or series
of actions.

**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.

### 3. Temporary Ban

**Community Impact**: A serious violation of community standards, including
sustained inappropriate behavior.

**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.

### 4. Permanent Ban

**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.

**Consequence**: A permanent ban from any sort of public interaction within
the community.

## Attribution

This Code of Conduct is adapted from the [Contributor Covenant][homepage],
version 2.0, available at
https://www.contributor-covenant.org/version/2/0/code_of_conduct.html.

Community Impact Guidelines were inspired by [Mozilla's code of conduct
enforcement ladder](https://github.com/mozilla/diversity).

[homepage]: https://www.contributor-covenant.org

For answers to common questions about this code of conduct, see the FAQ at
https://www.contributor-covenant.org/faq. Translations are available at
https://www.contributor-covenant.org/translations.
4 changes: 2 additions & 2 deletions .github/FUNDING.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,6 @@
github: [kyranet]
patreon: kyranet
open_collective: # Replace with a single Open Collective username
ko_fi: # Replace with a single Ko-fi username
ko_fi: kyranet
tidelift: # Replace with a single Tidelift platform-name/package-name e.g., npm/babel
custom: # Replace with a single custom sponsorship URL
custom: https://donate.skyra.pw/paypal
21 changes: 0 additions & 21 deletions .github/ISSUE_TEMPLATE.md

This file was deleted.

56 changes: 56 additions & 0 deletions .github/ISSUE_TEMPLATE/bug_report.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
name: Bug Report
description: File a bug report here
title: 'bug: '
labels: ['Bug: Unverified']
body:
- type: markdown
attributes:
value: |
Thanks for taking the time to fill out this bug report!
- type: checkboxes
id: new-bug
attributes:
label: Is there an existing issue for this?
description: Please search to see if an issue already exists for the bug you encountered.
options:
- label: I have searched the existing issues
required: true
- type: textarea
id: bug-description
attributes:
label: Description of the bug
description: Tell us what bug you encountered and what should have happened
validations:
required: true
- type: textarea
id: steps-to-reproduce
attributes:
label: Steps To Reproduce
description: Steps to reproduce the behavior.
placeholder: |
Please tell us how to reproduce this bug, for example:
1. Write '...'
2. Click on '...'
3. See error
validations:
required: true
- type: textarea
id: expected-behavior
attributes:
label: Expected behavior
description: What should be the expected behavior.
placeholder: A clear and concise description of what you expected to happen.
validations:
required: true
- type: textarea
id: screenshots
attributes:
label: Screenshots
description: If applicable, add screenshots to help explain your problem.
placeholder: Paste your screenshots here.
- type: textarea
id: additional-context
attributes:
label: Additional context
description: Do you want to share any additional context about this bug?
placeholder: Add any other context about the problem here.
5 changes: 5 additions & 0 deletions .github/ISSUE_TEMPLATE/config.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
blank_issues_enabled: false
contact_links:
- name: Discord server
url: https://discord.gg/pE5sfxK
about: Please visit our Discord server for questions and support requests.
46 changes: 46 additions & 0 deletions .github/ISSUE_TEMPLATE/feature_request.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
name: Feature request
description: Suggest an idea for this project
title: 'request: '
labels: ['Meta: Feature']
body:
- type: markdown
attributes:
value: Thank you for suggesting this feature! The more information you provide, the more likely it is that it will be picked up.
- type: checkboxes
id: new-bug
attributes:
label: Is there an existing issue or pull request for this?
description: Please search to see if an issue or pull request already exists for the feature you desire.
options:
- label: I have searched the existing issues and pull requests
required: true
- type: textarea
id: feature-description
attributes:
label: Feature description
description: Is your feature request related to a problem? Please describe.
placeholder: A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]
validations:
required: true
- type: textarea
id: steps-to-reproduce
attributes:
label: Desired solution
description: Describe the solution you'd like
placeholder: A clear and concise description of what you want to happen.
validations:
required: true
- type: textarea
id: expected-behavior
attributes:
label: Alternatives considered
description: Describe alternatives you've considered
placeholder: A clear and concise description of any alternative solutions or features you've considered.
validations:
required: true
- type: textarea
id: additional-context
attributes:
label: Additional context
description: Do you want to share any additional context about this bug?
placeholder: Add any other context about the problem here.
9 changes: 4 additions & 5 deletions .github/PULL_REQUEST_TEMPLATE.md
Original file line number Diff line number Diff line change
@@ -1,9 +1,8 @@
### Description of the PR


### Semver Classification

- [ ] This PR only includes documentation or non-code changes.
- [ ] This PR fixes a bug and does not change the (intended) API/interface.
- [ ] This PR adds methods or properties to the API/interface.
- [ ] This PR removes or renames methods or properties in the API/interface.
- [ ] This PR only includes documentation or non-code changes.
- [ ] This PR fixes a bug and does not change the (intended) API/interface.
- [ ] This PR adds methods or properties to the API/interface.
- [ ] This PR removes or renames methods or properties in the API/interface.
41 changes: 21 additions & 20 deletions SECURITY.md → .github/SECURITY.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,17 +17,18 @@ If your Veza server is only supposed to run only in its local machine, we strong
# Allow access to the XXXX port in localhost
$ iptables -A INPUT -p tcp -s localhost --dport XXXX -j ACCEPT
```

```bash
# Deny access to the XXXX port elsewhere
$ iptables -A INPUT -p tcp --dport XXXX -j DROP
```

> The `iptables` command is a *root-only* command, if you are not using root but a [sudoer][] account, you might need to
use `sudo`.
> The `iptables` command is a _root-only_ command, if you are not using root but a [sudoer][] account, you might need to
> use `sudo`.
Inside containers like [Docker][] or equivalents, this can be unnecessary, since the ports are not exposed by default.

For Windows users, SpiceWorks has a [nice guide][WindowsFirewall] about this process.
For Windows users, SpiceWorks has a [nice guide][windowsfirewall] about this process.

## Handshakes

Expand All @@ -36,29 +37,29 @@ with `iptables` (besides `localhost` itself) or implement **an additional handsh

Additional handshakes can be made by sending a message from the Server to the Client (or vice versa) and compare certain
values, for example an unique key. This approach may take security approaches such as encrypting the "authenticate"
payload with a special key and adding a timer to avoid [man-in-the-middle attacks][ManInTheMiddle], as they usually have
payload with a special key and adding a timer to avoid [man-in-the-middle attacks][maninthemiddle], as they usually have
latency implications.

## Messages

There are many techniques that can be used to enhance security between Veza nodes on the public network, involving a
little cryptography with it. Some of the most common techniques can include:

- Send the content and a [MD5][] hash of it, this is exposes the contents but can protect nodes from malicious contents
or requests ─ if the content does not generate the same hash as the from the message, the message is invalid. This
approach is very simple but also very efective.
- [Public-key cryptography][PublicKeyCryptography], this approach is one of the fundamental security ingredients in
modern [cryptosystems][], applications and protocols assuring the confidentiality, authenticity and non-repudiability of
electronic communications and data storage, it is more complex than the previous approach but does not expose the
messages contents.

[PROTOCOL]: ./PROTOCOL.md
[TLS]: https://en.wikipedia.org/wiki/Transport_Layer_Security
[Firewall]: https://en.wikipedia.org/wiki/Firewall_(computing)
- Send the content and a [MD5][] hash of it, this is exposes the contents but can protect nodes from malicious contents
or requests ─ if the content does not generate the same hash as the from the message, the message is invalid. This
approach is very simple but also very efective.
- [Public-key cryptography][publickeycryptography], this approach is one of the fundamental security ingredients in
modern [cryptosystems][], applications and protocols assuring the confidentiality, authenticity and non-repudiability of
electronic communications and data storage, it is more complex than the previous approach but does not expose the
messages contents.

[protocol]: ./PROTOCOL.md
[tls]: https://en.wikipedia.org/wiki/Transport_Layer_Security
[firewall]: https://en.wikipedia.org/wiki/Firewall_(computing)
[sudoer]: https://help.ubuntu.com/community/Sudoers
[Docker]: https://www.docker.com/
[WindowsFirewall]: https://community.spiceworks.com/how_to/159244-block-or-allow-tcp-ip-port-in-windows-firewall
[ManInTheMiddle]: https://en.wikipedia.org/wiki/Man-in-the-middle_attack
[MD5]: https://en.wikipedia.org/wiki/MD5
[PublicKeyCryptography]: https://en.wikipedia.org/wiki/Public-key_cryptography
[docker]: https://www.docker.com/
[windowsfirewall]: https://community.spiceworks.com/how_to/159244-block-or-allow-tcp-ip-port-in-windows-firewall
[maninthemiddle]: https://en.wikipedia.org/wiki/Man-in-the-middle_attack
[md5]: https://en.wikipedia.org/wiki/MD5
[publickeycryptography]: https://en.wikipedia.org/wiki/Public-key_cryptography
[cryptosystems]: https://en.wikipedia.org/wiki/Cryptosystem
Loading

0 comments on commit 45bf8dd

Please sign in to comment.