-
Notifications
You must be signed in to change notification settings - Fork 2.8k
Contributing
The basics of contributing to Atomic Red Team™ on Github.
We use Github issues to track the following:
- Bug reports, including broken atomic tests
- New feature requests
- Requests for updates or changes
View the list of current issues here. If you have a new issue, submit it here.
Use pull requests to submit changes to the repository for review. All pull requests are reviewed by the project maintainers and the continuous integration program CircleCI.
Submitting a basic PR using the Web Interface is easier for beginners and more intuitive. You can find a demo video for creating a Pull Request using the web interface here. If you are making changes to multiple files within the repository, you may prefer to use Git
to make your changes. For more information on how to get started using Git on the command line, we have provided a walkthrough.
There are two ways to create new atomic tests:
- Use the atomic GUI web interface. See the atomic GUI wiki page.
- Write a new test by hand. Use the atomic test YAML specification file as a template.
You can also make changes to existing atomic tests by editing the YAML test
file in a given technique directory. For example, you can make changes to
existing Process Injection tests by
editing atomic-red-team/atomics/T1055/T1055.yaml
.
👉 Note: CircleCI automatically generates the auto_generated_guid
for a new test (in the YAML). You never need to add this manually.
When you're ready to open a pull request, follow these steps:
- Navigate to the
atomics
directory of the Atomic Red Team repository. - Select the directory named after the MITRE ATT&CK® technique you want to contribute to. If no such directory exists, create one.
- Make changes to the YAML file in the technique directory.
- Add source file dependencies to the
src
directory, if necessary. - Add binary dependencies to the
bin
directory, if necessary.
- Add source file dependencies to the
- Commit your changes and open a pull request.
👉 Note: CircleCI automatically generates the Markdown test files and the
list of tests in atomics/Indexes
. You never need to update them manually.
You must fix any failed checks before a project maintainer can approve your pull request:
- Go to your pull request page on Github.
- Select Conversation > Show all checks > Details.
- Read CircleCI's error messages and make the required changes.
- Commit the changes to your existing pull request.
You'll know your test is ready for manual review when CircleCI displays the "All checks have passed" message:
First-time contributors get a free Red Canary t-shirt when their pull request is merged. To claim your t-shirt, message Marrelle Bailey on the Atomic Red Team Slack workspace.
Adhere to these guidelines when designing new atomic tests.
- Users should be able to execute cleanup commands repeatedly without generating
errors. You can accomplish this by piping error outputs to
null
in most command lines, or by using the-ErrorAction Ignore
argument in PowerShell. - Don't write cleanup commands that delete dependencies.
- Provide the source code of any custom binaries.
- Don't commit dependencies with dedicated repositories. Instead, use the
prereq_commands
YAML key to download any dependencies from their original sources. - Refer to external repositories with permanent Github links to prevent unexpected changes.
- If a dependency is built into an operating system by default, don't write any commands to check for or install it.
Each technique directory contains the following:
- A YAML test file
- A human-readable, CircleCI-generated Markdown test file
- An optional
src
directory for source file dependencies - An optional
bin
directory for binary dependencies
- Use input arguments for items that the user might want to customize.
- Include the technique number in any output file names.
- Include a description of what the test does and a description of the expected output.
- Include links to web pages that describe the attack in detail, if possible.
- Include enough information in the test name to give the user a general idea of what the test does.
- Make tests as portable as possible. For example, use environment variables instead of hard-coded paths.
- Prefer
sh
tobash
for Linux tests.
Questions? Get connected to the community on the Atomic Red Team™ Slack channel.