|
| 1 | +Payloads for Metasploit Framework can now be tested when opening pull requests. This is handled by GitHub actions within |
| 2 | +our CI, this workflow will build the payloads using the appropriate repositories and branches. It will then run our |
| 3 | +acceptance tests against those changes. This requires adding GitHub labels for each corresponding payload repository. |
| 4 | +The labels will contain the `payload-testing` prefix, each supporting testing for an external repository: |
| 5 | + - `payload-testing-branch` ([https://github.com/rapid7/metasploit-payloads/](https://github.com/rapid7/metasploit-payloads/)) |
| 6 | + - `payload-testing-mettle-branch` ([https://github.com/rapid7/mettle/](https://github.com/rapid7/mettle/)) |
| 7 | + |
| 8 | +**_Note_**: |
| 9 | + |
| 10 | +The long term aim is supporting workflow dispatches for this job, but that is currently not working as expected. So as a |
| 11 | +work-around we will need to edit the workflow locally. Once the testing has been completed ensure the following locally |
| 12 | +changes are reverted before merging. |
| 13 | + |
| 14 | +Once the appropriate repository label is added, you will need to edit the GitHub workflow to point at the specific |
| 15 | +repository and branch you want to test. Below I will outline some changes that are required to make this work, update |
| 16 | +the following lines like so: |
| 17 | + |
| 18 | +1. Point at your forked repository - [line to update](https://github.com/rapid7/metasploit-framework/blob/2355ab546d02bfee99183083b12c6953836c12a1/.github/workflows/shared_meterpreter_acceptance.yml#L188): |
| 19 | +```yaml |
| 20 | +repository: foo-r7/metasploit-framework |
| 21 | +``` |
| 22 | +
|
| 23 | +2. Point at your forked repository branch - [line to update](https://github.com/rapid7/metasploit-framework/blob/2355ab546d02bfee99183083b12c6953836c12a1/.github/workflows/shared_meterpreter_acceptance.yml#L190): |
| 24 | +```yaml |
| 25 | +ref: fixes-all-the-bugs |
| 26 | +``` |
| 27 | +
|
| 28 | +3. Point at your forked repository that contains the payload changes you'd like to test - [line to update](https://github.com/rapid7/metasploit-framework/blob/2355ab546d02bfee99183083b12c6953836c12a1/.github/workflows/shared_meterpreter_acceptance.yml#L249) |
| 29 | +```yaml |
| 30 | +repository: foo-r7/metasploit-payloads |
| 31 | +``` |
| 32 | +
|
| 33 | +4. Point at your forked repository branch that contains the payload changes you'd like to test - [line to update](https://github.com/rapid7/metasploit-framework/blob/2355ab546d02bfee99183083b12c6953836c12a1/.github/workflows/shared_meterpreter_acceptance.yml#L251): |
| 34 | +```yaml |
| 35 | +ref: fixes-all-the-payload-bugs |
| 36 | +``` |
| 37 | +
|
| 38 | +Steps 3 and 4 outline the steps required when steps testing metasploit-payloads. The same steps apply for Mettle, the |
| 39 | +following lines would need updated: |
| 40 | + - Point at your forked repository that contain the payload changes you'd like to test - [line](https://github.com/rapid7/metasploit-framework/blob/2355ab546d02bfee99183083b12c6953836c12a1/.github/workflows/shared_meterpreter_acceptance.yml#L155). |
| 41 | + - Point at your forked repository branch that contains the payload changes you'd like to test - [line](https://github.com/rapid7/metasploit-framework/blob/2355ab546d02bfee99183083b12c6953836c12a1/.github/workflows/shared_meterpreter_acceptance.yml#L157). |
0 commit comments