diff --git a/.github/pull_request_template.md b/.github/pull_request_template.md index 04134906c..3604a9323 100644 --- a/.github/pull_request_template.md +++ b/.github/pull_request_template.md @@ -1,35 +1,40 @@ ## Description - - + ## Motivation and Context + - - +This PR addresses: [GitHub issue or Jira ticket number] ## How Has This Been Tested? - - - - + ## Screenshots (if appropriate): ## Types of changes + - - -- [ ] Chore (a change that does not modify the application functionality) -- [ ] Bug fix (non-breaking change which fixes an issue) -- [ ] New feature (non-breaking change which adds functionality) -- [ ] Breaking change (fix or feature that would cause existing functionality to change) +- [ ] Chore (a change that does not modify the application functionality) +- [ ] Bug fix (non-breaking change which fixes an issue) +- [ ] New feature (non-breaking change which adds functionality) +- [ ] Breaking change (fix or feature that would cause existing functionality to change) ## Checklist: - - - - -- [ ] Documentation updates are needed, and have been made accordingly. -- [ ] I have added and/or updated tests to cover my changes. -- [ ] All new and existing tests passed. -- [ ] My changes include a database migration. + + + +- [ ] I have met the contributing prerequisites + - Assigned myself to this PR + - Added the appropriate labels + - Associated an issue: https://github.com/SpecterOps/BloodHound/issues/672 + - Read the Contributing guide: https://github.com/SpecterOps/BloodHound/wiki/Contributing +- [ ] I have ensured that related documentation is up-to-date + - Open API docs + - Code comments +- [ ] I have followed proper test practices + - Added/updated tests to cover my changes + - All new and existing tests passed diff --git a/.github/workflows/build.yml b/.github/workflows/build-and-test.yml similarity index 51% rename from .github/workflows/build.yml rename to .github/workflows/build-and-test.yml index 71807ef54..9f8e1ed2a 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build-and-test.yml @@ -1,15 +1,18 @@ -name: Build +name: Build and Test -on: pull_request +on: + pull_request: + branches: [ v4 ] jobs: - build: + build-and-test: runs-on: windows-latest + steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v6 - name: Setup .NET - uses: actions/setup-dotnet@v3 + uses: actions/setup-dotnet@v5 with: dotnet-version: | 7.0.x @@ -19,7 +22,7 @@ jobs: run: dotnet restore - name: Build - run: dotnet build + run: dotnet build --no-restore - name: Test - run: dotnet test + run: dotnet test --no-build \ No newline at end of file diff --git a/src/CommonLib/Processors/CertAbuseProcessor.cs b/src/CommonLib/Processors/CertAbuseProcessor.cs index 7da4f46c5..38f983921 100644 --- a/src/CommonLib/Processors/CertAbuseProcessor.cs +++ b/src/CommonLib/Processors/CertAbuseProcessor.cs @@ -24,7 +24,8 @@ public class CertAbuseProcessor public delegate Task ComputerStatusDelegate(CSVComputerStatus status); public event ComputerStatusDelegate ComputerStatusEvent; - public CertAbuseProcessor(ILdapUtils utils, IRegistryAccessor registryAccessor, ISAMServerAccessor samServerAccessor, ILogger log = null) { + //TODO: temp change to test github build pipeline + public CertAbuseProcessor(ILdapUtils utils, IRegistryAccessor registryAccessor, ISAMServerAccessor samServerAccessor, String test, ILogger log = null) { _utils = utils; _registryAccessor = registryAccessor; _samServerAccessor = samServerAccessor; diff --git a/test/unit/CertAbuseProcessorTest.cs b/test/unit/CertAbuseProcessorTest.cs index 5c65f1c78..dda8a4db3 100644 --- a/test/unit/CertAbuseProcessorTest.cs +++ b/test/unit/CertAbuseProcessorTest.cs @@ -37,7 +37,8 @@ public CertAbuseProcessorTest() { _mockLdapUtils = new Mock(); _mockRegistryAccessor = new Mock(); _mockSAMServerAccessor = new Mock(); - _certAbuseProcessor = new CertAbuseProcessor(_mockLdapUtils.Object, _mockRegistryAccessor.Object, _mockSAMServerAccessor.Object); + //TODO: temp change to test github build pipeline + _certAbuseProcessor = new CertAbuseProcessor(_mockLdapUtils.Object, _mockRegistryAccessor.Object, _mockSAMServerAccessor.Object, ""); _certAbuseProcessor.ComputerStatusEvent += status => { _receivedCompStatus = status; @@ -53,7 +54,7 @@ public CertAbuseProcessorTest() { public async Task CertAbuseProcessor_IsUserSpecifiesSanEnabled_ReturnsResult(int editFlags, bool expectedResult) { const string subKey = $"SYSTEM\\CurrentControlSet\\Services\\CertSvc\\Configuration\\{CAName}\\PolicyModules\\CertificateAuthority_MicrosoftDefault.Policy"; const string subValue = "EditFlags"; - + _mockRegistryAccessor .Setup(ra => ra.GetRegistryKeyData( TargetName,