Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update Contributing docs #4424

Open
wants to merge 24 commits into
base: main
Choose a base branch
from

Conversation

ShohamBit
Copy link
Collaborator

@ShohamBit ShohamBit commented Dec 11, 2024

1. Explain what the PR does

  • enhance documentation of the guidelines
  • add sections on contributing to Tracee source code
  • improve docs on build traces
  • improve docs on the build environment
  • refactor Tracee docs on how to contribute
  • enhance the issues section
  • enhance PR section

0a6f8cc added backport and cherry-pick labels
1ea57fb Merge branch 'main' of https://github.com/aquasecurity/tracee into contributing_docs
f63b97d Merge branch 'contributing_docs' of https://github.com/ShohamBit/tracee into contributing_docs
9f72406 add candidate label docs
6153e85 enhance backported and cherry-picked labels docs
8d70805 Update docs/contributing/overview.md
fe05d9a enhance Issues docs part, added candidate labe docs
5b9a520 Merge branch 'main' of https://github.com/aquasecurity/tracee into contributing_docs
4aae9c7 add help text
c14fbca update make help
540c8ce improve guidelines to use makefiles mostly
ab51f00 improve metrics=1 docs
a6b3995 resolve most changes
0501e58 fix minor issues
363e7b2 add checkers docsto guidelines
c61ecc5 Merge branch 'main' of https://github.com/aquasecurity/tracee into contributing_docs
3b78323 add Kubernetes, Performance and Man docs to tracee

8d70805 Update docs/contributing/overview.md

Co-authored-by: Gregório G. <[email protected]>

2. Explain how to test it

Read the docs and check if they are properly aligned with Tracee's design

3. Other comments

Close #4406

Copy link
Member

@geyslan geyslan left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

First pass.

docs/contributing/building/building.md Show resolved Hide resolved
docs/contributing/building/building.md Show resolved Hide resolved
docs/contributing/building/environment.md Outdated Show resolved Hide resolved
docs/contributing/guidelines.md Outdated Show resolved Hide resolved
@ShohamBit ShohamBit requested a review from geyslan December 16, 2024 15:13
@ShohamBit ShohamBit requested a review from geyslan December 17, 2024 20:59
@rscampos
Copy link
Collaborator

rscampos commented Dec 20, 2024

First pass

Need to update the result of make help


The difference:

  • need to add: make tracee-operator and make clean-tracee-operator
  • need to remove: make test-signatures

Copy link
Member

@geyslan geyslan left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Put some thoughts.

docs/contributing/kubernetes.md Show resolved Hide resolved
docs/contributing/overview.md Outdated Show resolved Hide resolved
Copy link
Member

@geyslan geyslan left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM when consider my last suggestions.

@yanivagman @rscampos it would be nice to have other passes from you, as it concerns different areas.

docs/contributing/overview.md Outdated Show resolved Hide resolved
docs/contributing/overview.md Outdated Show resolved Hide resolved
docs/contributing/overview.md Outdated Show resolved Hide resolved
-v -o dist/tracee \
./cmd/tracee

9. Build enabling BPF metrics by setting `METRICS=1`.
Copy link
Collaborator

@rscampos rscampos Jan 13, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit: only topic 9 end with a dot, should we remove?

@@ -163,19 +119,16 @@
>plugin.Open("/tracee/dist/signatures/builtin.so"): Dynamic loading not supported
>```

8. Build a **debugable binary** with DWARF generation by setting `DEBUG=1`
8. Build a **debuggable binary** with DWARF generation by setting `DEBUG=1`
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit: The phrase is clear enough, but I'd change to:

Build a debuggable binary with DWARF debug symbols by setting DEBUG=1

WDYT?


* Alpine
* Ubuntu
The reason for that is that **Alpine Linux** is based in the [musl](https://en.wikipedia.org/wiki/Musl) C standard library.
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think we can combine both:

The reason for that is that Alpine Linux is based in the musl C standard library, while the Ubuntu Linux uses glibc.


> **Note**: the generated binary must be compatible to your host (depending on
> glibc version, for example).
* Show help for make file:
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit: makefile

Could you check if make sense?


2. Verify the executable is static

* Note: ldd print the shared libraries required by an executable file
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit: prints


Tracee relies on several generated files and has strict formatting requirements. Ensure you run the following commands before committing:

**`NOTE:`** In order to not depend on host's libraries versions, We recommend that you always run make and other project dependencies on a virtual environment so the formatting will be align with tracee guidelines
Copy link
Collaborator

@rscampos rscampos Jan 13, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit: Should we replace tracee to Tracee?


!!! check-code Example
**`NOTE:`** If your host machine dependencies doesn't align with tracee dependencies, This command have to run on a supported [environment](./building/environment.md)
Copy link
Collaborator

@rscampos rscampos Jan 13, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ditto: Should we replace tracee to Tracee?


Tracee relies on several generated files and has strict formatting requirements. Ensure you run the following commands before committing:

**`NOTE:`** In order to not depend on host's libraries versions, We recommend that you always run make and other project dependencies on a virtual environment so the formatting will be align with tracee guidelines
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit: libraries versions, we recommend


### Kubernetes Considerations

If your contribution impacts Tracee's behavior within a Kubernetes cluster, follow the guidelines in [Kubernetes Considerations](./kubernetes.md)
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit: end with dot. Should we also end with a dot all the notes?

2. **Performance Dashboard:** The provided performance dashboard allows visualization of host metrics, CPU flame graphs, and other performance-related data. Follow these steps to deploy locally and see instructions on using the dasboard:

```bash
make -f builder/Makefile.performance dashboard-start
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

When we run dashboard-start it will complains that Tracee need to be run with the flag --pprof. We can add a note under Performance Dashboard section I think or change the sudo ./dist/tracee --pyroscope to be sudo ./dist/tracee --pyroscope --pprof. WDYT?

-rwxr-xr-x 1 vagrant vagrant 62619312 Mar 29 19:08 tracee
-rw-r--r-- 1 vagrant vagrant 10753624 Mar 29 19:06 tracee.bpf.o
```
Open a terminal and navigate to the directory containing the `Vagrantfile.builder` within the cloned Tracee repository. Rename `Vagrantfile.builder` to `Vagrantfile`.
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What file Vagrantfile.builder are you referencing for?

...
```
```bash
export VM_TYPE=dev
Copy link
Collaborator

@rscampos rscampos Jan 13, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think would be good to add a note explaining about the default option (if none of the following is used).

Copy link
Collaborator

@rscampos rscampos left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@ShohamBit I did a second pass... LGTM.

  1. For simplicity, maybe only consider version 14 since (remove 12 and 13)? we use version 14 in the Vagrant file (https://github.com/aquasecurity/tracee/blame/main/Vagrantfile) and the actions (https://github.com/aquasecurity/tracee/blob/main/.github/actions/build-dependencies/action.yaml)

    1. **clang** && **llvm** (12, 13 or 14)

  2. Both links doesn't exists:

    > 1. [packaging/Dockerfile.ubuntu-packaging](https://github.com/aquasecurity/tracee/blob/main/packaging/Dockerfile.ubuntu-packaging)
    > 1. [packaging/Dockerfile.fedora-packaging](https://github.com/aquasecurity/tracee/blob/main/packaging/Dockerfile.fedora-packaging)

    Maybe we can replace with:
    https://github.com/aquasecurity/tracee/blob/main/builder/Dockerfile.alpine-tracee-make
    https://github.com/aquasecurity/tracee/blob/main/builder/Dockerfile.ubuntu-tracee-make

  3. Nit: add dot at the end

    1. [Announcements](https://github.com/aquasecurity/tracee/discussions/categories/announcements): One way communication from the team to the community. Consider this like our mini blog

  4. Personal notes (WIP topics)
    It seems there are three places with some personal notes (I think) in this file.
    https://github.com/aquasecurity/tracee/blob/0a6f8cc66b103d3cfd0da5cc17b2e4a9ad03129c/docs/contributing/performance.md

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Update docs/contributing
3 participants