Open device management
Find a file
Scott Gress d5eee802eb
Detect unknown keys in GitOps (phase 1) (#40963)
<!-- Add the related story/sub-task/bug number, like Resolves #123, or
remove if NA -->
**Related issue:** Resolves #40496

# Details

This is the first phase of an effort to detect unknown keys in GitOps
.yml files. In the regular `fleetctl gitops` case, it will fail when
unknown keys are detected. This behavior can be changed with a new
`--allow-unknown-keys` flag which will log the issues and continue.

In this first phase we are detecting unknown keys in _most_ GitOps
sections, other than the top-level `org_settings:` and `settings:`
sections which have more complicated typing. I will tackle those
separately as they require a bit more thought. Also ultimately I'd like
us to be doing this validation in a more top-down fashion in one place,
rather than spreading it across the code by doing it in each individual
section, but this is a good first step.

As a bonus, I invited my pal Mr. Levenshtein to the party so that we can
make suggestions when unknown keys are detected, like:

```
 * unknown key "queyr" in "./lib/some-report.yml"; did you mean "query"?
```
> Note: the goal is to return as many validation errors as possible to
the user, so they don't have to keep running `fleetctl gitops` to get
the next error. I did _not_ update any other errors to stop returning
early, in an effort to keep this as low-touch as possible.

# Checklist for submitter

If some of the following don't apply, delete the relevant line.

- [X] Changes file added for user-visible changes in `changes/`,
`orbit/changes/` or `ee/fleetd-chrome/changes`.
See [Changes
files](https://github.com/fleetdm/fleet/blob/main/docs/Contributing/guides/committing-changes.md#changes-files)
for more information.

## Testing

- [X] Added/updated automated tests
- [X] QA'd all new/changed functionality manually
- [X] Tested this against existing it-and-security folder and one with
updated keys from https://github.com/fleetdm/fleet/pull/40959; no
unknown keys detected
- [X] Added unknown keys at various levels, GitOps errored with helpful
messages
- [X] Same as above but with `--allow-unknown-keys`; GitOps outputted
helpful messages but continued.

<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->
## Summary by CodeRabbit

* **New Features**
* GitOps runs now fail when unknown or misspelled keys are present in
configuration files.
* New CLI flag --allow-unknown-keys lets unknown keys be treated as
warnings instead of errors.
* Unknown-key messages include suggested valid key names to help correct
mistakes.

* **Tests**
* Expanded test coverage to validate unknown-key detection and the
allow-as-warning option.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->

---------

Co-authored-by: Ian Littman <iansltx@gmail.com>
2026-03-06 16:16:17 -06:00
.claude Add frontend component generator to claude.md (#40844) 2026-03-04 15:58:20 -08:00
.github Bump supported MySQL versions (#40892) 2026-03-04 12:25:20 -06:00
.storybook Updating UI for Okta config (#35204) 2025-11-18 19:34:59 -06:00
.vscode Use forked node-sql-parser, fix CTE issues in parsed SQL (#38744) 2026-01-28 16:08:33 -06:00
android Update Android RELEASE.md (#40708) 2026-03-02 15:32:39 -06:00
articles Create owning-your-linux-destiny-with-open-source.md (#41095) 2026-03-06 13:47:33 -06:00
assets Display iPad screenshot in lock modal (#38475) 2026-01-20 13:26:01 +01:00
changes Detect unknown keys in GitOps (phase 1) (#40963) 2026-03-06 16:16:17 -06:00
charts Adding changes for Fleet v4.81.1 (#40705) 2026-03-03 10:01:15 -06:00
cmd Detect unknown keys in GitOps (phase 1) (#40963) 2026-03-06 16:16:17 -06:00
docs Fix Jetbrains versions - Take 2 (#40928) 2026-03-06 12:30:20 -07:00
ee block backend software install from device user page (#41129) 2026-03-06 11:26:14 -05:00
frontend refactor path generation (#41126) 2026-03-06 12:11:37 -05:00
git-hooks Merge Android datastore into main Fleet datastore (#32233) 2025-08-25 11:41:28 -04:00
handbook Refactor marketing assets and add roadmap previews (#41174) 2026-03-06 15:23:55 -06:00
infrastructure Adding changes for Fleet v4.81.1 (#40705) 2026-03-03 10:01:15 -06:00
it-and-security Update Windows Defender compliance check configuration (#40759) 2026-02-27 22:52:22 -06:00
orbit Fix orbit crash loop on incorrect file permissions (#40887) 2026-03-06 17:41:31 -03:00
pkg Detect unknown keys in GitOps (phase 1) (#40963) 2026-03-06 16:16:17 -06:00
proposals Remove proposals (unused) (#26646) 2025-02-27 10:37:07 -06:00
schema Additions and fixes for app_sso_platform table (#41048) 2026-03-06 08:07:20 -08:00
security Add note around linux trivy (#39100) 2026-02-04 06:56:32 -03:00
server Fix Jetbrains versions - Take 2 (#40928) 2026-03-06 12:30:20 -07:00
terraform Clean up "click here" and "here" link anchors - part 1 (#29731) 2025-06-04 13:54:34 -06:00
test/upgrade Bump supported MySQL versions (#40892) 2026-03-04 12:25:20 -06:00
third_party Vendor goval-dictionary (#39430) 2026-02-11 11:11:05 -07:00
tools add tls skip-verify to MDM assets tool to allow connecting to TLS required DB's (#41135) 2026-03-06 12:01:22 -05:00
website Website: Update order confirmation email template (#41137) 2026-03-06 10:56:46 -06:00
.coderabbit.yaml Reduce coderabbit noise. (#39635) 2026-02-10 14:55:06 -06:00
.custom-gcl.yml Use nilaway to incrementally check for unsafe nil pointer dereferences (#39030) 2026-02-06 08:51:17 -06:00
.dockerignore Added support to read jwt and mysql password from a file (#141) 2021-01-04 07:58:43 -08:00
.eslintignore Allow ESCAPE in LIKE clauses to be valid SQL (#31222) 2025-07-25 10:13:55 -05:00
.eslintrc.js update storybook to 8.4.7 (#25451) 2025-01-20 16:17:33 +00:00
.gitattributes Windows friendly changes after walking through getting started guide (#1441) 2021-07-21 20:49:44 -04:00
.gitignore Use nilaway to incrementally check for unsafe nil pointer dereferences (#39030) 2026-02-06 08:51:17 -06:00
.gitpod.yml Add gitpod yml (#2915) 2021-11-19 10:03:56 -03:00
.golangci-incremental.yml Filter bogus nilaway internal error (#39554) 2026-02-09 19:59:58 -06:00
.golangci.yml Changes needed before gokit/log to slog transition. (#39527) 2026-02-11 10:08:33 -06:00
.goreleaser-snapshot.yml 🤖 Update goreleaser snapshot build to pull version number from branch name when applicable (#39593) 2026-02-10 13:51:52 -06:00
.goreleaser.yml Fix tagging of fleetdm/fleet and fleetdm/fleetctl when releasing (#28251) 2025-04-16 15:48:47 -03:00
.npmignore Move fleetdm.com into main Fleet repo (#83) 2020-12-02 14:48:03 -06:00
.pre-commit-config.yaml Updating golangci-lint to 2.7.1 (#36678) 2025-12-04 10:45:50 -06:00
.prettierignore Allow ESCAPE in LIKE clauses to be valid SQL (#31222) 2025-07-25 10:13:55 -05:00
.prettierrc.json add prettier and have it format all fleet application code (#625) 2021-04-12 14:32:25 +01:00
.yarnrc New yarn configuration: Sets installing a dependency to a specific semantic versioning instead of latest stable (#17938) 2024-03-29 10:39:20 -04:00
babel.config.json Fleet Frontend: Create integration tests QuerySidePanel.tests.tsx (#12179) 2023-06-07 12:01:59 -04:00
CHANGELOG.md Adding changes for Fleet v4.81.1 (#40705) 2026-03-03 10:01:15 -06:00
CODE_OF_CONDUCT.md Remove @fleetdm.com emails from fleetdm/fleet repo (#882) 2021-05-27 17:19:14 -04:00
codecov.yml Added dedicated Go test workflow for activity bounded context (#40653) 2026-02-27 07:53:57 -06:00
CODEOWNERS [merge after testing backwards compat.] Dogfood: teams => "fleets" and queries => "reports" (#39383) 2026-03-03 09:41:56 -06:00
docker-compose-redis-cluster.yml Target Redis 6 everywhere rather than a mix of 5 and 6 (#35373) 2025-11-10 17:05:44 -06:00
docker-compose.yml Bump supported MySQL versions (#40892) 2026-03-04 12:25:20 -06:00
Dockerfile-desktop-linux Update Debian container references from bookworm to trixie (#40349) 2026-02-24 14:50:22 -06:00
go.mod Detect unknown keys in GitOps (phase 1) (#40963) 2026-03-06 16:16:17 -06:00
go.sum Support globs in script paths in GitOps (#40799) 2026-03-02 22:18:36 -06:00
LICENSE Update LICENSE (#10) 2020-11-04 19:57:51 -06:00
Makefile adding gotestsum for better test output (#40753) 2026-03-03 16:01:11 -06:00
manifest.yml.cloudgov.example cloud.gov deployment (#7611) 2022-09-07 13:30:06 -05:00
osv-scanner.toml We have migrated from aws-sdk-go v1 to v2, remove scanner skip (#30469) 2025-07-02 13:33:31 -03:00
package.json Bump dompurify from 3.2.4 to 3.3.2 (#41068) 2026-03-06 14:00:21 -06:00
postcss.config.js Upgrade Bourbon to 5.1.0 and fix deprecation warnings (#1973) 2019-01-03 12:46:55 -08:00
README.md Removing run tests badge from README (#32131) 2025-08-20 12:54:48 -05:00
render.yaml Use Render Redis service (#23056) 2025-01-02 10:07:54 -06:00
SECURITY.md Add note about compatibility to security policy (#40555) 2026-02-27 09:28:54 -06:00
tsconfig.json Use forked node-sql-parser, fix CTE issues in parsed SQL (#38744) 2026-01-28 16:08:33 -06:00
webpack.config.js Upgrade JS deps (#39639) 2026-02-12 09:49:20 -06:00
yarn.lock Bump dompurify from 3.2.4 to 3.3.2 (#41068) 2026-03-06 14:00:21 -06:00

Fleet logo, landscape, dark text, transparent background

News   ·   Report a bug   ·   Handbook   ·   Why open source?   ·   Art

Open-source platform for IT and security teams with thousands of computers. Designed for APIs, GitOps, webhooks, YAML, and humans.

A glass city in the clouds

What's it for?

Organizations like Fastly and Gusto use Fleet for vulnerability reporting, detection engineering, device management (MDM), device health monitoring, posture-based access control, managing unused software licenses, and more.

Explore data

To see what kind of data you can use Fleet to gather, check out the table reference documentation.

Out-of-the-box policies

Fleet includes out-of-the box support for all CIS benchmarks for macOS and Windows, as well as many simpler queries.

Take as much or as little as you need for your organization.

Supported platforms

Here are the platforms Fleet currently supports:

  • Linux (all distros)
  • macOS
  • Windows
  • Chromebooks
  • Amazon Web Services (AWS)
  • Google Cloud (GCP)
  • Azure (Microsoft cloud)
  • Data centers
  • Containers (kube, etc)
  • Linux-based IoT devices

Lighter than air

Fleet is lightweight and modular. You can use it for security without using it for MDM, and vice versa. You can turn off features you are not using.

Openness

Fleet is dedicated to flexibility, accessibility, and clarity. We think everyone can contribute and that tools should be as easy as possible for everyone to understand.

Good neighbors

Fleet has no ambition to replace all of your other tools. (Though it might replace some, if you want it to.) Ready-to-use, enterprise-friendly integrations exist for Snowflake, Splunk, GitHub Actions, Vanta, Elastic Jira, Zendesk, and more.

Fleet plays well with Munki, Chef, Puppet, and Ansible, as well as with security tools like Crowdstrike and SentinelOne. For example, you can use the free version of Fleet to quickly report on what hosts are actually running your EDR agent.

Free as in free

The free version of Fleet will always be free. Fleet is independently backed and actively maintained with the help of many amazing contributors.

Longevity

The company behind Fleet is founded (and majority-owned) by true believers in open source. The company's business model is influenced by GitLab (NYSE: GTLB), with great investors, happy customers, and the capacity to become profitable at any time.

In keeping with Fleet's value of openness, Fleet Device Management's company handbook is public and open source. You can read about the history of Fleet and osquery and our commitment to improving the product.

Is it any good?

Fleet is used in production by IT and security teams with thousands of laptops and servers. Many deployments support tens of thousands of hosts, and a few large organizations manage deployments as large as 400,000+ hosts.

Chat

Please join us in MacAdmins Slack or in osquery Slack.

The Fleet community is full of kind and helpful people. Whether or not you are a paying customer, if you need help, just ask.

Contributing   Go Report Card   CII Best Practices   Twitter Follow  

The landscape of cybersecurity and IT is too complex. Let's open it up.

Contributions are welcome, whether you answer questions on Slack / GitHub / StackOverflow / LinkedIn / Twitter, improve the documentation or website, write a tutorial, give a talk at a conference or local meetup, give an interview on a podcast, troubleshoot reported issues, or submit a patch. The Fleet code of conduct is on GitHub.

What's next?

To see what Fleet can do, head over to fleetdm.com and try it out for yourself, grab time with one of the maintainers to discuss, or visit the docs and roll it out to your organization.

Production deployment

Fleet is simple enough to spin up for yourself. Or you can have us host it for you. Premium features are available either way.

Documentation

Complete documentation for Fleet can be found at https://fleetdm.com/docs.

License

The free version of Fleet is available under the MIT license. The commercial license is also designed to allow contributions to paid features for users whose employment agreements allow them to contribute to open source projects. (See LICENSE.md for details.)

Fleet is built on osquery, nanoMDM, Nudge, and swiftDialog.