apparmor.d/docs/development/index.md

73 lines
3.1 KiB
Markdown
Raw Normal View History

2023-01-29 22:18:22 +01:00
---
title: Development
---
If you're looking to contribute to `apparmor.d` you can get started by going to the project [GitHub repository](https://github.com/roddhjav/apparmor.d/)! All contributions are welcome no matter how small. In this page you will find all the useful information needed to contribute to the apparmor.d project.
2023-01-29 22:18:22 +01:00
2024-10-02 02:08:06 +02:00
??? info "How to contribute pull requests?"
2023-01-29 22:18:22 +01:00
2023-10-27 16:27:23 +02:00
1. If you don't have git on your machine, [install it](https://help.github.com/articles/set-up-git/).
2024-10-02 02:08:06 +02:00
1. Fork this repo by clicking on the fork button on the top of the [project GitHub](https://github.com/roddhjav/apparmor.d) page.
1. [Generate a new SSH key]( https://docs.github.com/en/authentication/connecting-to-github-with-ssh/generating-a-new-ssh-key-and-adding-it-to-the-ssh-agent) and add it to your GitHub account.
1. Clone the forked repository and go to the directory:
2023-01-29 22:18:22 +01:00
```sh
2024-10-02 02:08:06 +02:00
git clone git@github.com:your-github-username/apparmor.d.git
2023-01-29 22:18:22 +01:00
cd apparmor.d
```
2024-10-02 02:08:06 +02:00
1. Create a branch:
2023-01-29 22:18:22 +01:00
```
git checkout -b my_contribution
```
2024-10-02 02:08:06 +02:00
1. Make the changes and commit:
2023-01-29 22:18:22 +01:00
```
git add <files changed>
git commit -m "A message to sum up my contribution"
2023-01-29 22:18:22 +01:00
```
2024-10-02 02:08:06 +02:00
1. Push changes to GitHub:
2023-01-29 22:18:22 +01:00
```
git push origin my_contribution
```
2024-10-02 02:08:06 +02:00
1. Submit your changes for review: If you go to your repository on GitHub,
2023-01-29 22:18:22 +01:00
you'll see a Compare & pull request button, fill and submit the pull request.
2024-10-02 02:08:06 +02:00
<div class="grid cards" markdown>
- :material-arrow-right: &nbsp; **[See the workflow to write profiles](workflow.md)**
</div>
2023-01-29 22:18:22 +01:00
## Project rules
#### Rule :material-numeric-1-circle: - Mandatory Access Control
2023-01-29 22:18:22 +01:00
: As these are mandatory access control policies **only** what is explicitly required
2023-01-29 22:18:22 +01:00
should be authorized. Meaning, you should **not** allow everything (or a large area)
2024-06-03 20:06:02 +02:00
and deny some sub areas.
2023-01-29 22:18:22 +01:00
#### Rule :material-numeric-2-circle: - Do not break a program
2023-01-29 22:18:22 +01:00
: A profile **should not break a normal usage of the confined software**. this can
2023-01-29 22:18:22 +01:00
be complex as simply running the program for your own use case is not always
exhaustive of the program features and required permissions.
#### Rule :material-numeric-3-circle: - Do not confine everything
2023-01-29 22:18:22 +01:00
: Some programs should not be confined by a MAC policy.
#### Rule :material-numeric-4-circle: - Distribution and devices agnostic
: A profile should be compatible with all distributions, software, and devices
in the Linux world. You cannot deny access to resources you do not use on
your devices or for your use case.
2023-01-29 22:18:22 +01:00
2024-10-02 02:08:06 +02:00
## Additional recommended documentation
2023-01-29 22:18:22 +01:00
2024-10-02 02:08:06 +02:00
* [The AppArmor Core Policy Reference](https://gitlab.com/apparmor/apparmor/-/wikis/AppArmor_Core_Policy_Reference)
* [The openSUSE Documentation](https://doc.opensuse.org/documentation/leap/security/html/book-security/part-apparmor.html)
* https://documentation.suse.com/sles/12-SP5/html/SLES-all/cha-apparmor-intro.html
* [The AppArmor.d man page](https://man.archlinux.org/man/apparmor.d.5)
* [F**k AppArmor](https://presentations.nordisch.org/apparmor/#/)
* [A Brief Tour of Linux Security Modules](https://www.starlab.io/blog/a-brief-tour-of-linux-security-modules)