Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
49 changes: 27 additions & 22 deletions .github/pull_request_template.md
Original file line number Diff line number Diff line change
@@ -1,35 +1,40 @@
## Description

<!--- Describe your changes in detail -->
<!-- Describe your changes in detail -->

## Motivation and Context
<!-- Why is this change required? What problem does it solve? -->

<!--- Why is this change required? What problem does it solve? -->
<!--- If it fixes an open issue, please link to the issue here. -->
This PR addresses: [GitHub issue or Jira ticket number]

## How Has This Been Tested?

<!--- Please describe in detail how you tested your changes. -->
<!--- Include details of your testing environment, and the tests you ran to -->
<!--- see how your change affects other areas of the code, etc. -->
<!--
Please describe in detail how you tested your changes.
Include details of your testing environment, and the tests you ran to
see how your change affects other areas of the code, etc.*
-->

## Screenshots (if appropriate):

## Types of changes
<!-- What types of changes does your code introduce? Put an `x` in all the boxes that apply: -->

<!--- What types of changes does your code introduce? Put an `x` in all the boxes that apply: -->

- [ ] 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:

<!--- Go over all the following points, and put an `x` in all the boxes that apply. -->
<!--- If you're unsure about any of these, don't hesitate to ask. We're here to help! -->

- [ ] 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.
<!-- Please make sure you have completed all following checks. -->
<!-- If you're unsure about any of these, don't hesitate to ask. We're here to help! -->

- [ ] 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
62 changes: 26 additions & 36 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -1,54 +1,44 @@
name: Build

on:
push:
branches: [ dev ]
pull_request:
branches: [ dev ]
branches: [ 2.X ]
types: [opened, synchronize]

jobs:
build:
runs-on: windows-latest
defaults:
run:
shell: bash

strategy:
matrix:
release:
- type: Debug
suffix: '-debug'
- type: Release
suffix: ''

name: Build (${{ matrix.release.type }})

steps:
- uses: actions/checkout@v2

- name: Setup .NET
uses: actions/setup-dotnet@v1
uses: actions/setup-dotnet@v5
with:
dotnet-version: 5.0.x

- name: Restore Dependencies
run: dotnet restore
- name: Checkout SharpHoundCommon
uses: actions/checkout@v6
with:
repository: SpecterOps/SharpHoundCommon
ref: v4
path: SharpHoundCommon

- name: Build
run: dotnet build -c ${{ matrix.release.type }} -p:Version=0.0.0-rolling+${{ github.sha }}
- name: Restore SharpHoundCommon Dependencies
working-directory: SharpHoundCommon
run: dotnet restore

- name: Zip
if: "! startsWith(github.event_name, 'pull_request')"
run: 7z a -tzip -mx9 SharpHound${{ matrix.release.suffix }}.zip $PWD/bin/${{ matrix.release.type }}/net472/*
- name: Build SharpHoundCommon
working-directory: SharpHoundCommon
run: dotnet build --no-restore

- name: Update Rolling Release
if: "! startsWith(github.event_name, 'pull_request')"
uses: softprops/action-gh-release@v1
- name: Checkout SharpHound
uses: actions/checkout@v6
with:
name: Rolling Release (unstable)
tag_name: rolling
prerelease: true
files: SharpHound${{ matrix.release.suffix }}.zip
body: |
Rolling release of SharpHound compiled from source (${{ github.sha }})
This is automatically kept up-to-date with the `${{ github.ref_name }}` ${{ github.ref_type }}.
path: SharpHound

- name: Restore SharpHound Dependencies
working-directory: SharpHound
run: dotnet restore

- name: Build SharpHound
working-directory: SharpHound
run: dotnet build --no-restore
2 changes: 1 addition & 1 deletion .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ name: Publish
on:
push:
tags:
- "v*.*.*"
- v[0-9]+.[0-9]+.[0-9]+*

jobs:
build:
Expand Down
22 changes: 17 additions & 5 deletions Sharphound.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,11 @@
<AssemblyName>SharpHound</AssemblyName>
<AllowUnsafeBlocks>True</AllowUnsafeBlocks>
</PropertyGroup>

<PropertyGroup>
<CommonLibPath>..\SharpHoundCommon\src\CommonLib\bin\$(Configuration)\net472\SharpHoundCommonLib.dll</CommonLibPath>
<RPCPath>..\SharpHoundCommon\src\SharpHoundRPC\bin\$(Configuration)\net472\SharpHoundRPC.dll</RPCPath>
</PropertyGroup>

<ItemGroup>
<PackageReference Include="CommandLineParser" Version="2.8.0" />
Expand All @@ -25,17 +30,24 @@
<PackageReference Include="Microsoft.Bcl.AsyncInterfaces" Version="8.0.0" />
<PackageReference Include="Microsoft.Extensions.Logging.Abstractions" Version="8.0.0" />
<PackageReference Include="Newtonsoft.Json" Version="13.0.1" />
<PackageReference Include="SharpHoundCommon" Version="4.5.3" />
<PackageReference Include="SharpHoundRPC" Version="4.5.3" />
<PackageReference Include="SharpZipLib" Version="1.3.3" />
<PackageReference Include="System.Runtime.CompilerServices.Unsafe" Version="6.0.0" />
<PackageReference Include="System.Threading.Channels" Version="8.0.0" />
<PackageReference Include="System.ValueTuple" Version="4.5.0" />
</ItemGroup>
<ItemGroup Condition="!Exists('$(CommonLibPath)') and !Exists('$(RPCPath)')">
<PackageReference Include="SharpHoundCommon" Version="4.5.3" />
<PackageReference Include="SharpHoundRPC" Version="4.5.3" />
</ItemGroup>
<ItemGroup Condition="Exists('$(CommonLibPath)') and Exists('$(RPCPath)')">
<Reference Include="SharpHoundCommonLib">
<HintPath>$(CommonLibPath)</HintPath>
</Reference>
<Reference Include="SharpHoundRPC">
<HintPath>$(RPCPath)</HintPath>
</Reference>
</ItemGroup>
<ItemGroup>
<!-- <Reference Include="SharpHoundCommon">-->
<!-- <HintPath>..\SharpHoundCommon\src\CommonLib\bin\Debug\net472\SharpHoundCommonLib.dll</HintPath>-->
<!-- </Reference>-->
<Reference Include="System.DirectoryServices" />
<Reference Include="System.DirectoryServices.Protocols" />
<Reference Include="System.IO.Compression" />
Expand Down
Loading