Automatically converts Chainguard's osquery-defense-kit queries to FleetDM-compatible YAML format.
- Tracks upstream osquery-defense-kit as a Git submodule
- Go-based converter parses SQL files and generates FleetDM YAML
- GitHub Actions CI/CD automatically regenerates queries on changes
- Weekly automated updates to stay current with upstream
Download the latest release from the Releases page:
chainguard-all.yml- All queries combinedchainguard-detection.yml- Threat detection querieschainguard-incident-response.yml- Incident response querieschainguard-policy.yml- Security policy queries
Then import to FleetDM:
fleetctl apply -f chainguard-all.ymlClone with submodules
git clone --recurse-submodules https://github.com/RasterSec/fleetdm-osquery-defense-kit.git
cd fleetdm-osquery-defense-kitmakeGenerated FleetDM YAML files will be in output/:
chainguard-detection.yml- Threat detection querieschainguard-incident-response.yml- Incident response querieschainguard-policy.yml- Security policy querieschainguard-all.yml- All queries combined
fleetctl apply -f output/chainguard-detection.yml
fleetctl apply -f output/chainguard-policy.yml
fleetctl apply -f output/chainguard-incident-response.ymlOr import everything at once:
fleetctl apply -f output/chainguard-all.ymlmake updateThis updates the submodule to the latest upstream commit and regenerates the YAML files.
The repository includes GitHub Actions workflows that:
- Weekly submodule update - Checks for new upstream commits and creates a PR
- Automatic releases - Creates a new GitHub release when the submodule is updated
This means the Releases page always has up-to-date FleetDM YAML files ready to download.
.
├── cmd/convert/ # Go converter tool
├── upstream/ # osquery-defense-kit submodule
├── output/ # Generated FleetDM YAML files
├── .github/workflows/ # CI/CD workflows
├── Makefile
└── README.md
- Go 1.22+
- Git
go build -o bin/convert ./cmd/convert./bin/convert -upstream upstream -output output- Chainguard osquery-defense-kit - Original query collection
- 0xBEN's approach - Inspiration for FleetDM conversion
The converter tool is MIT licensed. The upstream osquery-defense-kit queries retain their original Apache 2.0 license.