Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions .eslintignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
node_modules/
build/
.docusaurus/
33 changes: 33 additions & 0 deletions .eslintrc.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
module.exports = {
root: true,
env: {
browser: true,
node: true,
es2021: true,
},
parser: '@typescript-eslint/parser',
parserOptions: {
ecmaVersion: 'latest',
sourceType: 'module',
ecmaFeatures: {
jsx: true,
},
},
plugins: ['@typescript-eslint', 'react', '@docusaurus'],
extends: [
'eslint:recommended',
'plugin:react/recommended',
'plugin:@typescript-eslint/recommended',
'plugin:@docusaurus/recommended',
// 'prettier',
],
settings: {
react: {
version: 'detect',
},
},
ignorePatterns: ['node_modules/', 'build/', '.docusaurus/'],
rules: {
"react/react-in-jsx-scope": "off", // Docusaurus 3 does not require React to be in scope
},
};
122 changes: 122 additions & 0 deletions .github/CODE_OF_CONDUCT.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,122 @@
# 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

## Our 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 email 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
**contact[at]opiasec[dot]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 interaction 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.1, available at
[https://www.contributor-covenant.org/version/2/1/code_of_conduct.html][v2.1].

[homepage]: https://www.contributor-covenant.org
[v2.1]: https://www.contributor-covenant.org/version/2/1/code_of_conduct.html
154 changes: 154 additions & 0 deletions .github/CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,154 @@
# Contributing to OPIASEC

<!-- Update Repository Name -->
First off, thank you for considering contributing to OPIASEC's AppSec Labs! It's people like you that make this project such a great tool for the AppSec community. We're excited to see what you'll bring to our project.

This document outlines the process for contributing to our platform. Please read it carefully to ensure a smooth and effective collaboration.

## Code of Conduct

By participating in this project, you are expected to uphold our [Code of Conduct](CODE_OF_CONDUCT.md). Please read it before you start. All contributors are expected to follow it to help us keep this a welcoming and friendly environment.

## How Can I Contribute?

There are many ways to contribute, and all of them are valuable. You can:

* **Report Bugs:** If you find a bug, please open an issue using the "Bug Report" template. Provide as much detail as possible.
* **Suggest Enhancements:** Have an idea for a new feature or a new lab? We'd love to hear it. Open an issue using the "Feature Request" or "New Lab Proposal" template.
* **Improve Documentation:** If you find parts of our documentation confusing or incomplete, please submit a pull request with your improvements.
* **Write Code:** Help us fix bugs or implement new features.

If you're looking for a place to start, check out the issues tagged with `good first issue` or `help wanted`. You can find them here:

<!-- Adjust repository links -->
* Good First Issues: `https://github.com/opiasec/appseclabs-platform/labels/good%20first%20issue`
* Help Wanted: `https://github.com/opiasec/appseclabs-platform/labels/help%20wanted`

## Your First Code Contribution

Ready to contribute code? Here's the workflow our project follows.

### Step 1: Find or Create an Issue

<!-- Adjust issues tab link -->
Before you start writing code, please check our [Issues tab](https://github.com/opiasec/appseclabs-platform/issues) to see if there's an existing issue for what you want to do.

* If an issue exists, please leave a comment saying you'd like to work on it. This helps us avoid duplicated effort.
* If no issue exists, please create one first to discuss the proposed changes with the maintainers. For significant changes, please follow our RFC Process.

### Step 2: Fork the Repository

Click the "Fork" button at the top right of the repository page to create a personal copy of the project under your own GitHub account.

### Step 3: Set Up Your Development Environment

<!-- Adjust links -->
1. **Clone your fork:**
```bash
git clone [https://github.com/](https://github.com/)[YOUR_USERNAME]/appseclabs-platform.git
cd appseclabs-platform
```

2. **Add the `upstream` remote:** This will help you keep your fork in sync with the main project.
```bash
git remote add upstream [https://github.com/](https://github.com/)opiasec/appseclabs-platform.git
```

3. **Install dependencies:** Follow the instructions on README.md to install dependencies and test the software.

### Step 4: Create a New Branch

Create a descriptive branch name for your changes. This helps everyone understand what you're working on.

```bash
# Example for a new feature
git checkout -b feat/add-xss-lab

# Example for a bug fix
git checkout -b fix/resolve-login-issue
```

### Step 5: Write Your Code

Make your changes, write your code, and add your tests\! As you work, remember to:

* Follow the existing code style.
* Ensure your code is well-commented, especially in complex areas.
* Add or update tests as appropriate.

### Step 6: Test Your Changes

Run our linter and automated tests to make sure your changes haven't broken anything.

<!-- Add linter instructions? -->

<!--
```bash
# Run ESLint to check for style issues
npm run lint

# Run all tests
npm run test
```
-->

### Step 7: Commit Your Changes

We use **Conventional Commits** to maintain a clear and readable git history. Please format your commit messages accordingly.

Your commit message should be structured as follows:

```
<type>[optional scope]: <description>

[optional body]

[optional footer(s)]
```

**Common types:**

* `feat`: A new feature
* `fix`: A bug fix
* `docs`: Documentation only changes
* `style`: Changes that do not affect the meaning of the code (white-space, formatting, etc)
* `refactor`: A code change that neither fixes a bug nor adds a feature
* `test`: Adding missing tests or correcting existing tests
* `chore`: Changes to the build process or auxiliary tools

**Example:**

```
feat(labs): Add new stored XSS lab challenge
```

### Step 8: Push to Your Fork

Push your changes to your forked repository.

```bash
git push origin feat/add-xss-lab
```

### Step 9: Submit a Pull Request (PR)

1. Go to the original repository on GitHub. You should see a prompt to create a Pull Request from your new branch.
2. Make sure the PR is targeting the `main` branch of the upstream repository.
3. Fill out the PR template with a clear title and description of your changes. Link the issue you are resolving (e.g., "Closes \#123").
4. If your PR involves visual changes, please include screenshots or GIFs.

## The Review Process

Once you submit your PR, here's what to expect:

1. **Automated Checks:** Our CI/CD pipeline (GitHub Actions) will automatically run the linter and tests. Make sure these checks pass.
2. **Code Review:** One or more maintainers will review your code. We may ask for changes or improvements. This is a normal part of the process\! We are here to collaborate.
3. **Approval and Merge:** Once your PR is approved and all checks are passing, a maintainer will merge your code into the `main` branch.

Congratulations, and thank you for your contribution\!

## Questions?

If you have any questions, feel free to reach out on our:
* [Discord Server](https://discord.gg/xAkfKHRz)
* [GitHub Discussions](https://github.com/orgs/AppSec-Digital/discussions)
27 changes: 27 additions & 0 deletions .github/ISSUE_TEMPLATE/bug_report.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
---
name: "🐞 Bug Report / Relatório de Bug"
about: Create a report to help us improve / Crie um relatório para nos ajudar a melhorar
title: "[BUG] "
labels: bug
---

<!--
POR FAVOR, PREENCHA EM INGLÊS, SE POSSÍVEL.
PLEASE FILL THIS OUT IN ENGLISH, IF POSSIBLE.
-->

**Describe the bug / Descreva o bug**
A clear and concise description of what the bug is.
*Uma descrição clara e concisa do que é o bug.*

**To Reproduce / Para Reproduzir**
Steps to reproduce the behavior:
*Passos para reproduzir o comportamento:*
1. Go to '...' / Vá para '...'
2. Click on '....' / Clique em '....'
3. Scroll down to '....' / Role até '....'
4. See error / Veja o erro

**Expected behavior / Comportamento Esperado**
A clear and concise description of what you expected to happen.
*Uma descrição clara e concisa do que você esperava que acontecesse.*
22 changes: 22 additions & 0 deletions .github/ISSUE_TEMPLATE/feature_request.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
---
name: "✨ Feature Request / Sugestão de Funcionalidade"
about: "Suggest an idea for this project / Sugira uma ideia para este projeto"
title: "[FEAT] "
labels: feature
---

**Is your feature request related to a problem? Please describe. / A sua sugestão de funcionalidade está relacionada a um problema? Por favor, descreva.**
A clear and concise description of what the problem is. Ex: "I'm always frustrated when [...]"
*Uma descrição clara e concisa de qual é o problema. Ex: "Eu sempre fico frustrado quando [...]"*

**Describe the solution you'd like / Descreva a solução que você gostaria**
A clear and concise description of what you want to happen.
*Uma descrição clara e concisa do que você quer que aconteça.*

**Describe alternatives you've considered / Descreva as alternativas que você considerou**
A clear and concise description of any alternative solutions or features you've considered.
*Uma descrição clara e concisa de quaisquer soluções ou funcionalidades alternativas que você tenha considerado.*

**Additional context / Contexto Adicional**
Add any other context or screenshots about the feature request here.
*Adicione qualquer outro contexto ou capturas de tela sobre a sugestão de funcionalidade aqui.*
Loading
Loading