Skip to content

Conversation

@42LoCo42
Copy link
Contributor

This PR adds BloodHound Community Edition, the successor to the legacy version currently packaged in nixpkgs.

As for deciding how to package this, I have tried to mostly mirror the upstream Dockerfile, including the way the data collectors/ingestors are bundled as well as how sources are filtered in the front- and backend builds.
Since lib.fileset sadly only works with local paths and I couldn't for the life for me figure out how to do this cleanly with lib.sources, I've opted to write my own little filter function. Hope that's okay.

When this gets merged, I'm planning to open some followup PRs for Neo4j 4.4 (since BloodHound-CE fails with 5.x) and RustHound-CE, a third-party Active Directory ingestor written in Rust.

If I've made some glaring mistakes in this PR, feel free to scream at me.
This is my first time contributing to nixpkgs, so I'm open for any criticism!

Things done

  • Built on platform:
    • x86_64-linux
    • aarch64-linux
    • x86_64-darwin
    • aarch64-darwin
  • Tested, as applicable:
  • Ran nixpkgs-review on this PR. See nixpkgs-review usage.
  • Tested basic functionality of all binary files, usually in ./result/bin/.
  • Nixpkgs Release Notes
    • Package update: when the change is major or breaking.
  • NixOS Release Notes
    • Module addition: when adding a new NixOS module.
    • Module update: when the change is significant.
  • Fits CONTRIBUTING.md, pkgs/README.md, maintainers/README.md and other READMEs.

Add a 👍 reaction to pull requests you find important.

@nixpkgs-ci nixpkgs-ci bot added 12.first-time contribution This PR is the author's first one; please be gentle! 10.rebuild-linux: 1-10 This PR causes between 1 and 10 packages to rebuild on Linux. 10.rebuild-darwin: 0 This PR does not cause any packages to rebuild on Darwin. 10.rebuild-linux: 1 This PR causes 1 package to rebuild on Linux. 9.needs: reviewer This PR currently has no reviewers requested and needs attention. 8.has: maintainer-list (update) This PR changes `maintainers/maintainer-list.nix` 10.rebuild-darwin: 1-10 This PR causes between 1 and 10 packages to rebuild on Darwin. 10.rebuild-darwin: 1 This PR causes 1 package to rebuild on Darwin. and removed 10.rebuild-darwin: 0 This PR does not cause any packages to rebuild on Darwin. labels Nov 13, 2025
@42LoCo42
Copy link
Contributor Author

nixpkgs-review result

Generated using nixpkgs-review-gha

Command: nixpkgs-review pr 461387
Commit: 36a6c2ab331ab480f7ad9a07209bbe4db978e138 (subsequent changes)
Merge: 31a2e890d1b6a93b8c3513ee88a9d15098eb4978

Logs: https://github.com/42LoCo42/nixpkgs-review-gha/actions/runs/19360236840


x86_64-linux

✅ 1 package built:
  • bloodhound-ce

aarch64-linux

✅ 1 package built:
  • bloodhound-ce

x86_64-darwin (sandbox = true)

❌ 1 package failed to build:
  • bloodhound-ce

aarch64-darwin (sandbox = true)

❌ 1 package failed to build:
  • bloodhound-ce

@42LoCo42
Copy link
Contributor Author

42LoCo42 commented Nov 14, 2025

Ran into #415328 while testing a Darwin build with full sandboxing. Trying with relaxed sandboxing now; if this still doesn't work, I'm going to mark this package as Linux-exclusive.

@42LoCo42
Copy link
Contributor Author

nixpkgs-review result

Generated using nixpkgs-review-gha

Command: nixpkgs-review pr 461387
Commit: 36a6c2ab331ab480f7ad9a07209bbe4db978e138 (subsequent changes)
Merge: 844b8adcbd260fe8bbbe94f05515895ec44d34ae

Logs: https://github.com/42LoCo42/nixpkgs-review-gha/actions/runs/19360890201


x86_64-linux

✅ 1 package built:
  • bloodhound-ce

aarch64-linux

✅ 1 package built:
  • bloodhound-ce

x86_64-darwin (sandbox = relaxed)

❌ 1 package failed to build:
  • bloodhound-ce

aarch64-darwin (sandbox = relaxed)

❌ 1 package failed to build:
  • bloodhound-ce

@nixpkgs-ci nixpkgs-ci bot added 10.rebuild-darwin: 0 This PR does not cause any packages to rebuild on Darwin. and removed 10.rebuild-darwin: 1-10 This PR causes between 1 and 10 packages to rebuild on Darwin. 10.rebuild-darwin: 1 This PR causes 1 package to rebuild on Darwin. labels Nov 14, 2025
Comment on lines 60 to 62
# cmd/ui/package.json includes "git@github.com:BloodHoundAD/dagre.git"
# which is fetched using SSH, and that doesn't work in the Nix sandbox
# so we just replace it with a standard HTTPS URL
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
# cmd/ui/package.json includes "git@github.com:BloodHoundAD/dagre.git"
# which is fetched using SSH, and that doesn't work in the Nix sandbox
# so we just replace it with a standard HTTPS URL
# cmd/ui/package.json includes "git@github.com:BloodHoundAD/dagre.git"
# which requires credential

Even if we would provide ssh, then we would still need to authenticate.

Please try to convince upstream to switch to https git cloning.

Copy link
Contributor Author

@42LoCo42 42LoCo42 Nov 22, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Even if we would provide ssh, then we would still need to authenticate.

That's what I meant with "doesn't work", but yeah I could've worded that better.

Please try to convince upstream to switch to https git cloning.

See SpecterOps/BloodHound#2096 & SpecterOps/BloodHound#2097.

Can we still merge this PR in its current state? If upstream even accepts a change like this (which imo is only really relevant for Nix and thus fits https://github.com/NixOS/nixpkgs/blob/master/pkgs/README.md#vendoring-patches), it'll still take a while for a new stable release to include the change.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sure, we can merge it without this but this is not only applicable to nix. Any CI like process would require credentials to clone the repo which is a big anti pattern.

@nixpkgs-ci nixpkgs-ci bot removed the 9.needs: reviewer This PR currently has no reviewers requested and needs attention. label Nov 22, 2025
@SuperSandro2000 SuperSandro2000 added this pull request to the merge queue Nov 26, 2025
Merged via the queue into NixOS:master with commit 8e227d6 Nov 26, 2025
29 of 31 checks passed
@42LoCo42 42LoCo42 deleted the add-bloodhound-ce branch November 26, 2025 20:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

8.has: maintainer-list (update) This PR changes `maintainers/maintainer-list.nix` 10.rebuild-darwin: 0 This PR does not cause any packages to rebuild on Darwin. 10.rebuild-linux: 1-10 This PR causes between 1 and 10 packages to rebuild on Linux. 10.rebuild-linux: 1 This PR causes 1 package to rebuild on Linux. 12.first-time contribution This PR is the author's first one; please be gentle!

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants