-
Notifications
You must be signed in to change notification settings - Fork 10
Added PR- and Issue-Templates #205
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
Merged
Merged
Changes from 3 commits
Commits
Show all changes
5 commits
Select commit
Hold shift + click to select a range
b5e5ad0
Added pr- and issue-templates
whotwagner 59fbfd8
Added contribution docs
whotwagner 8cfa817
Updated README
whotwagner 3ae728a
Update .github/ISSUE_TEMPLATE/02_feature_request.md
thorinaboenke 902329d
Update docs/source/developing/contribution.rst
thorinaboenke File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,21 @@ | ||
| --- | ||
| name: 🐜 Bug report | ||
| about: If something isn't working 🔧 | ||
| --- | ||
|
|
||
| ### Subject of the issue | ||
| Describe your issue here. | ||
|
|
||
| ### Your environment | ||
| * Version of ruby | ||
| * Docker or manual installation? | ||
| * Which browser and its version | ||
|
|
||
| ### Steps to reproduce | ||
| Tell us how to reproduce this issue. | ||
|
|
||
| ### Expected behaviour | ||
| Tell us what should happen | ||
|
|
||
| ### Actual behaviour | ||
| Tell us what happens instead |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,21 @@ | ||
| --- | ||
| name: 🚀 Feature request | ||
| about: If you have a feature request 💡 | ||
| --- | ||
|
|
||
| **Context** | ||
|
|
||
| What are you trying to do and how would you want to do it differently? Is it something you currently you cannot do? Is this related to an issue/problem? | ||
|
|
||
| **Alternatives** | ||
|
|
||
| Can you achieve the same result doing it in an alternative way? Is the alternative considerable? | ||
|
|
||
| **Has the feature been requested before?** | ||
|
|
||
| Please provide a link to the issue. | ||
|
|
||
| **If the feature request is approved, would you be willing to submit a PR?** | ||
|
|
||
| Yes / No _(Help can be provided if you need assistance submitting a PR)_ | ||
|
|
||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1 @@ | ||
| blank_issues_enabled: false |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,19 @@ | ||
| # Task | ||
| <!-- Please add link a relevant issue or task --> | ||
|
|
||
| # Description | ||
| <!-- Please include a summary of the change --> | ||
| <!-- Any details that you think are important to review this PR? --> | ||
| <!-- Are there other PRs related to this one? --> | ||
|
|
||
| # How Has This Been Tested? | ||
| <!-- Please describe how you tested your changes --> | ||
|
|
||
| # Checklist | ||
| <!-- Go over all the following points, and put an `x` in all the boxes that apply --> | ||
|
|
||
| - [ ] This Pull-Request goes to the **development** branch. | ||
| - [ ] I have successfully run prek locally. | ||
| - [ ] I have added tests to cover my changes. | ||
| - [ ] I have linked the issue-id to the task-description. | ||
| - [ ] I have performed a self-review of my own code. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,3 @@ | ||
| AttackMate should only be executed against own test or training systems. For this reason, every software bug is treated equally, regardless of whether it is security relevant or not. | ||
|
|
||
| *Please note that AttackMate could easily be executed in a dangerous way. For example, by parsing the RESULT_STDOUT of a malicious server. The server response could lead to a command injection. Keep that in mind! |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,151 @@ | ||
| .. _contribution: | ||
|
|
||
| ============ | ||
| Contributing | ||
| ============ | ||
|
|
||
| We're happily taking patches and other contributions. Below is a summary of the processes we follow for any contribution. | ||
|
|
||
| Bug reports and enhancement requests | ||
| ==================================== | ||
|
|
||
| Bug reports and enhancement requests are an important part of making `attackmate` more stable and are curated through Github issues. | ||
| Before reporting an issue, check our backlog of open issues to see if anybody else has already reported it. | ||
| If that is the case, you might be able to give additional information on that issue. | ||
| Bug reports are very helpful to us in improving the software, and therefore, they are very welcome. It is very important to give us | ||
| at least the following information in a bug report: | ||
|
|
||
| 1. Description of the bug. Describe the problem clearly. | ||
| 2. Steps to reproduce. With the following configuration, go to.., click.., see error | ||
| 3. Expected behavoir. What should happen? | ||
| 4. Environment. What was the environment for the test(version, browser, etc..) | ||
|
|
||
| For reporting security-related issues, see `SECURITY.md`_ | ||
|
|
||
| .. _SECURITY.md: https://github.com/ait-testbed/attackmate/blob/main/SECURITY.md | ||
|
|
||
| Working on the codebase | ||
| ======================= | ||
|
|
||
| To contribute to this project, you must fork the project and create a pull request to the upstream repository. The following figure shows the workflow: | ||
|
|
||
| .. image:: ../images/GitHub-Contrib.drawio.png | ||
|
|
||
|
|
||
| 1. Fork | ||
| ------- | ||
|
|
||
| Go to `https://github.com/ait-testbed/attackmate.git <https://github.com/ait-testbed/attackmate.git>`_ and click on fork. Please note that you must login first to GitHub. | ||
|
|
||
| 2. Clone | ||
| -------- | ||
|
|
||
| After forking the repository into your own workspace, clone the development branch of that repository. | ||
|
|
||
| :: | ||
|
|
||
| git clone -b development git@github.com:YOURUSERNAME/attackmate.git | ||
|
|
||
| 3. Create a feature branch | ||
| -------------------------- | ||
|
|
||
| Every single workpackage should be developed in it's own feature-branch. Use a name that describes the feature: | ||
|
|
||
| :: | ||
|
|
||
| cd attackmate | ||
| git checkout -b feature-some_important_work | ||
|
|
||
| 4. Develop your feature and improvements in the feature-branch | ||
| -------------------------------------------------------------- | ||
|
|
||
| Please make sure that you commit only improvements that are related to the workpage you created the feature-branch for. See the section :ref:`Development <development>` for detailed information about how to develope code for `attackmate`. | ||
|
|
||
| .. note:: | ||
|
|
||
| `attackmate` uses `prek`_ to ensure code quality. Make sure that you use it properly | ||
|
thorinaboenke marked this conversation as resolved.
Outdated
|
||
|
|
||
| .. _prek: https://github.com/j178/prek | ||
|
|
||
| 5. Fetch and merge from the upstream | ||
| ------------------------------------ | ||
|
|
||
| If your work on this feature-branch is done, make sure that you are in sync with the branch of the upstream: | ||
|
|
||
| :: | ||
|
|
||
| git remote add upstream git@github.com:ait-testbed/attackmate.git | ||
| git pull upstream development | ||
|
|
||
| If any conflicts occur, fix them and add them using `git add` and continue with the merge or fast-forward. | ||
|
|
||
| Additional infos: | ||
|
|
||
| * `https://www.atlassian.com/git/tutorials/merging-vs-rebasing <https://www.atlassian.com/git/tutorials/merging-vs-rebasing>`_ | ||
| * `https://www.atlassian.com/git/tutorials/merging-vs-rebasing#the-golden-rule-of-rebasing <https://www.atlassian.com/git/tutorials/merging-vs-rebasing#the-golden-rule-of-rebasing>`_ | ||
| * `https://dev.to/toogoodyshoes/mastering-rebasing-and-fast-forwarding-in-git-2j19 <https://dev.to/toogoodyshoes/mastering-rebasing-and-fast-forwarding-in-git-2j19>`_ | ||
|
|
||
| 6. Push the changes to your GitHub-repository | ||
| --------------------------------------------- | ||
|
|
||
| Before we can push our changes, we have to make sure that we don't have unnecessary commits. First checkout our commits: | ||
|
|
||
| :: | ||
|
|
||
| git log | ||
|
|
||
| After that we can squash the last n commits together: | ||
|
|
||
| :: | ||
|
|
||
| git rebase -i HEAD~n | ||
|
|
||
| Finally you can push the changes to YOUR github-repository: | ||
|
|
||
| :: | ||
|
|
||
| git push | ||
|
|
||
| Additional documentation: | ||
|
|
||
| * `https://www.atlassian.com/git/tutorials/merging-vs-rebasing <https://www.atlassian.com/git/tutorials/merging-vs-rebasing>`_ | ||
|
|
||
| 7. Submit your pull-request | ||
| --------------------------- | ||
|
|
||
| Use the GitHub-Webinterface to create a pull-request. Make sure that the target-repository is `ait-testbed/attackmate`. | ||
|
|
||
| If your pull-request was accepted and merged into the development branch continue with :ref:`Update your local main branch <update-local-branch>`. If it wasn't accepted, read the comments and fix the problems. Before pushing the changes make sure that you squashed them with your last commit: | ||
|
|
||
| :: | ||
|
|
||
| git rebase -i HEAD~2 | ||
|
|
||
| Delete your local feature-branch after the pull-request was merged into the development branch. | ||
|
|
||
| .. _update-local-branch: | ||
|
|
||
| 8. Update your local main branch | ||
| -------------------------------- | ||
|
|
||
| Update your local development branch: | ||
|
|
||
| :: | ||
|
|
||
| git fetch upstream development | ||
| git checkout -b development | ||
| git rebase upstream/development | ||
|
|
||
| Additional infos: | ||
|
|
||
| * `https://www.atlassian.com/git/tutorials/merging-vs-rebasing <https://www.atlassian.com/git/tutorials/merging-vs-rebasing>`_ | ||
|
|
||
| 9. Update your main branch in your github-repository | ||
| ---------------------------------------------------- | ||
|
|
||
| Please make sure that you updated your local development branch as described in section 8. above. After that push the changes to your github-repository to keep it up2date: | ||
|
|
||
| :: | ||
|
|
||
| git push | ||
|
|
||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,55 @@ | ||
| .. _development: | ||
|
|
||
| =========== | ||
| Development | ||
| =========== | ||
|
|
||
| This section describes how to setup a development environment and how to contribute to `attackmate`. | ||
|
|
||
| .. note:: | ||
|
|
||
| Read the :ref:`Contribution Guide <contribution>` to follow and understand the development workflow. | ||
|
|
||
|
|
||
|
|
||
| Setup a development environment | ||
| =============================== | ||
|
|
||
| For development we recommend using `uv`_. You can install all optional dependencies: | ||
|
|
||
| .. _uv: https://docs.astral.sh/uv/ | ||
|
|
||
| :: | ||
|
|
||
| uv sync --dev | ||
|
|
||
| *Please note that this step is not necessary. `uv run --dev` will automatically download all dependencies.* | ||
|
|
||
|
|
||
| Use prek to run code checks | ||
| =========================== | ||
|
|
||
| Every code contributer must use `prek`_ to run basic checks at commit time. | ||
| `prek` is configured via the existing `.pre-commit-config.yaml` | ||
| and can be installed as part of the `dev` extras. To ensure pre-commit hooks run before each commit, run: | ||
|
|
||
| .. _prek: https://github.com/j178/prek | ||
|
|
||
| :: | ||
|
|
||
| uv run prek install | ||
|
|
||
| To run the checks manually, you can execute: | ||
|
|
||
| :: | ||
|
|
||
| uv run prek run -a | ||
|
|
||
| Add tests and run pytest | ||
| ======================== | ||
|
|
||
| In oder to run the tests run the following command: | ||
|
|
||
| :: | ||
|
|
||
| uv run --dev pytest |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.