Skip to content

Latest commit

 

History

History
224 lines (146 loc) · 10 KB

CONTRIBUTING.md

File metadata and controls

224 lines (146 loc) · 10 KB

Contributing Guide

This is Horusec contributing guide. Please read the following sections to learn how to ask questions and how to work on something.

Table of contents

1.2. Legal

2.3. Issues

Before you contribute

Code of Conduct

Please follow the Code of Conduct in all your interactions with our project.

Legal

Prerequisites

Check out the requisites before contributing to Horusec:

Developer Certificate of Origin - DCO

This is a security layer for the project and for the developers. It is mandatory.

Follow one of these two methods to add DCO to your commits:

1. Command line Follow the steps: Step 1: Configure your local git environment adding the same name and e-mail configured at your GitHub account. It helps to sign commits manually during reviews and suggestions.

git config --global user.name “Name”
git config --global user.email “email@domain.com.br”

Step 2: Add the Signed-off-by line with the '-s' flag in the git commit command:

$ git commit -s -m "This is my commit message"

2. GitHub website

You can also manually sign your commits during GitHub reviews and suggestions, follow the steps below:

Step 1: When the commit changes box opens, manually type or paste your signature in the comment box, see the example:

Signed-off-by: Name < e-mail address >

For this method, your name and e-mail must be the same registered on your GitHub account.

Code Review

  • All your submissions needs a review.

Issues

If you have a bug or an idea, check out the following sections before submitting your contribution.

Check the issue tracker

All our issues are centralized in our main repository, it is quite likely that you will find a topic that is being discussed. Check the open issues, another good way to start is good first issues.

Use the GitHub's search filter to help you. For example:

  • Test related issues: is:open is:issue label:kind/tests
  • Issues that need extra attention: is:open is:issue label:"help wanted"
  • Issues related to a bug: is:issue is:open label:kind/bug

Open an issue for any new problem

Writing a good issue will help our team better analyze and manage your contributions, therefore, follow the standards and best practices below:

With the title:

Project:Scope - Title Description

Project: Name of the project or repository you want to contribute to.

Scope: Add what your issue refers to:

Example: Horusec-cli:Improvement - Suggestion for CLI installation experience

With the issue description:

Try to explain the scenario to us by following these tips:

  • Context: explain the conditions which led you to write this issue.
  • Problem or idea: the context should lead to something, an idea or a problem that you’re facing.
  • Solution or next step: this where you move forward. You can engage others (request feedback), assign somebody else to the issue, or simply leave it for further investigation, but you absolutely need to propose a next step towards solving the issue.

Pull Requests

When you open a Pull Request, follow the requirements below:

  1. Add a title with the following pattern:

PKG:TYPE - Description

PKG: Name of the package or main service you want to change.

TYPE: Add what your Pull Request (PR) refers to:

  • feature: PR refers to a new activity.
  • bugfix: PR refers to corrections for the next release.
  • hotfix: PR refers to corrections where you will need a cherry-pick and the update of the minor version.
  • chore: PR refers to changes for the next release, but it was only maintenance without an activity impact.

Example: start:bugfix - fix bug when Horusec haven't read the new flag of authorization

  1. Answer the questions about what you did, how to verify it and a short description for the changelog, see an example below:

architecture

How to contribute?

See the guidelines to submit your changes:

Prepare your development environment

To start contributing with Horusec, you need to install Go. The minimal version required to build is 1.17. GNU Make is also required to development.

After installing Go you can build using make build-dev.

Testing

Horusec has a suite of unit and end-to-end tests you can run them using the following commands.

make test

make test-e2e

Make sure all the tests pass before you commit and push :)

Coverage

You can get the test coverage using the following command.

make coverage

go tool cover -html=coverage.out # Open coverage status in your browser

Repositories

Horusec has other repositories, check them below:

First contribution

Contributing to a new feature is only allowed in the main repository.

Before contributing to this repository, please discuss the changes you wish to make via e-mail or forum.

Add new feature, bug fixing or improvement

If you want to add an improvement, a new feature or bug fix, follow the steps to contribute:

Step 1: Make sure your branch is based on main;

Step 2: When opening an issue, choose a template to answer the questions regarding what you want to contribute:

Step 3: Make your changes and open a GitHub pull request;

Step 4: Make sure to write a title describing what you have done;

Step 5: Fill in the template in the PR, here you need to write what you did and how the team can verify it;

Step 6: You must commit to comply with the DCO rules. It will need to be signed-off and verified. Example: git commit -s --amend.

Pull Request's approval

Your pull request is approved when:

  • 2 code owners approve it.
  • Pass all GitHub actions checking process (lint, test, coverage, license, build, e2e, security, dco).

After your pull request's approval

  • If it is a bug fix, the team will perform the changes and there will be a new release.
  • If it is a feature, it will be in the next release.

Community

  • Do you have any question about Horusec? Send to our mailing list.
  • Let's chat in our forum.

Thank you for your contribution, you rock! 🚀

Horusec team