Commit Graph

30 Commits

Author SHA1 Message Date
Rachael Shaw
ae669e1749
2023-10-17 Update osquery schema version & regenerate merged schema (#14436)
When running a live query recently, I noticed some columns in the
results that we didn't have documented, and realized we weren't using
the latest osquery schema version when regenerating the merged schema.

According to the docs, [we support the latest version of
osquery](https://fleetdm.com/docs/using-fleet/enroll-hosts#supported-osquery-versions),
so figure we ought to update the schema version to the latest.

---------

Co-authored-by: Eric <eashaw@sailsjs.com>
2023-10-26 18:04:23 -05:00
Eric
1d9299dea2
Regenerate osquery_fleet_schema.json (2023-09-26) (#14161)
Changes:
- Ran the `generate-merged-schema` script to regenerate
`/schema/osquery_fleet_schema.json`
2023-09-27 16:29:58 -05:00
Eric
2de35a0ff7
Schema: Hide iptables table. (#14054)
Changes:
- Created an override file for the `iptables` table
- Regenerated merged schema.
2023-09-26 16:49:48 -05:00
Eric
45e1b56bb1
Website: sort merged osquery schema (#13959)
Closes: #13722

Changes:
- Updated the `get-extended-osquery-schema` helper to sort the merged
schema by table name.
- Regenerated `/schema/osquery_fleet_schema.JSON`
2023-09-15 18:40:57 -05:00
Eric
51485beb40
Regenerate osquery_fleet_schema.json (#13723)
Changes:
- Ran the `generate-merged-schema` script to regenerate
`schema/osquery_fleet_schema.json`.
2023-09-05 16:29:39 -05:00
Eric
08af35d294
Schema: Regenerate merged schema JSON (#13311)
Changes
- Ran the `generate-merged-schema` script to regenerate
`schema/osquery_fleet_schema.json`.
2023-08-15 18:35:19 -05:00
Lucas Manuel Rodriguez
810eb58b95
macOS CIS: Use find command (exposed as fleetd table) instead of relying on the osquery core file table (#12560)
#10292, #12554

When scanning tens of thousands of files for permissions, using the
`find` command exposed as a fleetd table is more performant than trying
to use the `file` table. This change caused the watchdog to *stop*
killing osquery because of exceeding memory or CPU limit.

- [X] Changes file added for user-visible changes in `changes/` or
`orbit/changes/`.
See [Changes
files](https://fleetdm.com/docs/contributing/committing-changes#changes-files)
for more information.
- ~[ ] Documented any API changes (docs/Using-Fleet/REST-API.md or
docs/Contributing/API-for-contributors.md)~
- ~[ ] Documented any permissions changes~
- ~[ ] Input data is properly validated, `SELECT *` is avoided, SQL
injection is prevented (using placeholders for values in statements)~
- ~[ ] Added support on fleet's osquery simulator `cmd/osquery-perf` for
new osquery data ingestion features.~
- [X] Added/updated tests
- [X] Manual QA for all new/changed functionality
  - For Orbit and Fleet Desktop changes:
- [X] Manual QA must be performed in the three main OSs, macOS, Windows
and Linux.
- ~[ ] Auto-update manual QA, from released version of component to new
version (see [tools/tuf/test](../tools/tuf/test/README.md)).~
2023-06-29 16:22:41 -03:00
RachelElysia
4c073278a8
ChromeOS tables: Add min chrome version to table schemas (#12540) 2023-06-27 14:16:51 -07:00
Sharon Katz
519982990c
Add disk_info table to chromeos (#12344) 2023-06-26 15:40:37 -04:00
RachelElysia
044935b02f
ChromeOS support: ChromeOS tables (add chromeos to existing table: screenlock, new table: system_state) (#12358) 2023-06-26 11:18:12 -07:00
Jacob Shandling
2855bc8f7f
ChromeOS privacy_preferences table (#12441)
## Addresses #11037 

### Implement the `privacy_preferences` table for the Fleetd Chrome
extension. Columns correspond to the available properties of
[`chrome.privacy`](https://developer.chrome.com/docs/extensions/reference/privacy/).

Chrome on mac:
<img width="816" alt="Screenshot 2023-06-23 at 11 55 21 AM"
src="https://github.com/fleetdm/fleet/assets/61553566/a4700749-6325-442e-acf2-c14b1c9adf8f">

Chromebook with enterprise access (actual use case):
![Image from
iOS](https://github.com/fleetdm/fleet/assets/61553566/93f2243d-357a-4d85-bd20-0aebd178388c)

* Chromebook w/o enterprise access: as you can see, sometimes certain
APIs are not available - this error occurs because the expected API
object that would have a `get` method is actually `undefined` TODO – How
to handle this case given that we want to let errors bubble up to the
level at which Fleet can catch them? Maybe it would be nice to catch
such errors and send them up to the Fleet layer, and still allow the
loop to continue to populate the columns whose APIs _are_ available.
_Decision: catch API errors here to preserve functionality of the
remaining columns_

![IMG_9407](https://github.com/fleetdm/fleet/assets/61553566/7fb26eb4-44e8-43f8-90c0-8b3d718c5ace)

- [x] Changes file
- [x] Manual QA

---------

Co-authored-by: Jacob Shandling <jacob@fleetdm.com>
2023-06-23 14:52:16 -07:00
gillespi314
87fe00db71
Create new Fleet osquery extension table to read escrowed FileVault key (#12198) 2023-06-15 10:23:59 -05:00
Eric
01106d05a6
Update platform value for ChromeOS tables, Update Fleet website to use new value, and regenerate schema JSON (#12091)
Changes:
- Updated the `platform` value for osquery tables and columns that
support chromeos to be `chrome` (Previously `chromeos`)
- Updated `get-exteneded-osquery-schema.js` to use the new `platform`
value
- Updated the Fleet website to use the `chrome` `platform`.
- Regenerated `schema/osquery_fleet_schema.json` with ChromeOS tables.
2023-06-02 17:44:06 -05:00
Marcos Oviedo
3ec04887e6
New CIS Audit table (#11381)
This relates to #11244 

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

- [x] Changes file added for user-visible changes in `changes/` or
`orbit/changes/`.
See [Changes
files](https://fleetdm.com/docs/contributing/committing-changes#changes-files)
for more information.
- [x] Manual QA for all new/changed functionality
- [x] Manual QA must be performed in the three main OSs, macOS, Windows
and Linux.

---------

Co-authored-by: Sharon Katz <121527325+sharon-fdm@users.noreply.github.com>
2023-05-12 11:16:36 -03:00
Zach Wasserman
3f0111964f
Add macos_rsr table from macadmins extension (#11537)
# Checklist for submitter

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

- [ ] Changes file added for user-visible changes in `changes/` or
`orbit/changes/`.
See [Changes
files](https://fleetdm.com/docs/contributing/committing-changes#changes-files)
for more information.
- [ ] Documented any API changes (docs/Using-Fleet/REST-API.md or
docs/Contributing/API-for-contributors.md)
- [ ] Documented any permissions changes
- [ ] Input data is properly validated, `SELECT *` is avoided, SQL
injection is prevented (using placeholders for values in statements)
- [ ] Added support on fleet's osquery simulator `cmd/osquery-perf` for
new osquery data ingestion features.
- [ ] Added/updated tests
- [ ] Manual QA for all new/changed functionality
  - For Orbit and Fleet Desktop changes:
- [ ] Manual QA must be performed in the three main OSs, macOS, Windows
and Linux.
- [ ] Auto-update manual QA, from released version of component to new
version (see [tools/tuf/test](../tools/tuf/test/README.md)).

---------

Co-authored-by: Roberto Dip <me@roperzh.com>
Co-authored-by: Lucas Rodriguez <lucas@fleetdm.com>
2023-05-05 11:02:28 -03:00
Eric
0abdc6261e
Regenerate osquery_fleet_schema.json (#11487)
Changes:
- Ran the `generate-merged-schema` script to regenerate
`/schema/osquery_fleet_schema.json`.
2023-05-02 15:15:57 -05:00
Artemis Tosini
1d2ae58d5f
Add macOS CIS 5.3.2 (#10726)
Add 2 new tables: corestorage_logical_volumes and corestorage_logical_volume_families.
Add a query that uses these tables
2023-03-28 11:57:38 -04:00
Eric
767fc39387
Update osquery schema version & regenerate merged schema (#10471)
Changes:
- Changed the version of osquery schema we merge with Fleet's overrides
from `5.7.0` to `5.8.1`
- Rand the `generate-merged-schema` script to regenerate
`osquery_fleet_schema.json` .


## EDIT
Mike: Hi Eric, if my changes look good to you, and if it's passing CI,
would you merge?

.

---------

Co-authored-by: Mike McNeil <mikermcneil@users.noreply.github.com>
2023-03-17 19:32:34 -05:00
Artemis Tosini
af4c3f7061
Add macOS CIS 5.3.1 (#10397)
This adds a new check about whether all APFS volumes are encrypted. I
needed to add a new table, and I took that opportunity to add another so
that osquery has all information from `diskutil apfs list -plist`.

Note that it is somewhat unclear whether to use the `encryption` or
`filevault` field in the query. FileVault is about whether the volume is
encrypted with a password and Encryption is about whether it is
encrypted at all, since all modern macs have hardware-backed disk
encryption.
2023-03-10 12:29:14 -05:00
Sharon Katz
8c04711f60
add minimumMixedCaseCharacters (#10401) 2023-03-09 15:44:28 -05:00
Eric
9f87abe8d5
Regenerate osquery_fleet_schema.json (#10200)
Changes: 
- Ran the `generate-merged-schema` script to regenerate
`schema/osquery_fleet_schema.json`.
2023-02-28 17:00:13 -06:00
Lucas Manuel Rodriguez
4784217b57
Add documentation for missing fleetd tables and regenerate JSON (#9960)
Updating documentation of Fleetd tables as part of the oncall duty.

Updating the json used by Fleet using the following command:
```sh
cd website
 ./node_modules/sails/bin/sails.js run generate-merged-schema
```

Samples:
![Screenshot 2023-02-20 at 17 20
55](https://user-images.githubusercontent.com/2073526/220192112-69a116e4-badb-4328-92d3-9a2a6f8657fe.png)
![Screenshot 2023-02-20 at 17 21
09](https://user-images.githubusercontent.com/2073526/220192117-dfa06c69-2166-47d4-99c3-e108911e2084.png)


@mikermcneil @eashaw: `generate-merged-schema` generates a different
output every time it's executed. Guess: It seems it should sort the
output lexicograhically?
2023-02-22 16:05:36 -03:00
Eric
4f8e0dcd0d
Regenerate osquery_fleet_schema.json (#9730)
Changes:
- Ran the `generate-merged-schema` script to regenerate
`schema/osquery_fleet_schema.json`
2023-02-07 15:30:19 -06:00
Eric
07f8ec14e6
Update YAML schema table validation (#9302)
Changes:
- Added three errors to
`website/api/helpers/get-extended-osquery-schema.js` that are thrown if
a YAML schema table has:
   - A `platforms` value that is not an array
   - A `description` value that is not a string
   - A `columns` value that is not an array
- Updated the `platforms` of YAML schema tables in `schema/tables/` that
had string `platforms` values
- Regenerated `/schema/osquery_fleet_schema.json`
 
.
2023-01-13 10:16:36 -06:00
Eric
c28056e36c
Update osquery schema version and regenerate merged schema JSON (#9292)
Changes:
- Updated the version of the osquery schema we merge with Fleet's
overrides (`5.6.0` » `5.7.0`)
- Ran the `generate-merged-schema` script to regenerate
`schema/osquery_fleet_schema.json`
 . .
2023-01-12 10:06:15 -06:00
Roberto Dip
5919931a4c
fix conflicts in docs about unified_logs vs macadmins_unified_logs (#9214)
As raised by a community member in
[Slack](https://osquery.slack.com/archives/C01DXJL16D8/p1672751794862639),
this updates our documentation to account for both `unified_log` and
`macadmins_unified_log`.

Per my testing, it should also help with the #9158 bug in Fleet's UI.

I have updated the columns of `macadmins_unified_log` according to
what's in the [source
code](50f94d0d70/tables/unifiedlog/unified_log.go (L47-L69)),
and modified the example to work.

Since I was there I have also updated the osquery version we use to pull
the JSON to `5.6.0` and fixed a small bug related to the examples we
pull from there.

. . . . . . .

Co-authored-by: Mike McNeil <mikermcneil@users.noreply.github.com>
2023-01-10 17:45:53 -06:00
Eric
11313fd833
Update osquery_fleet_schema.json (#8941) 2022-12-06 17:28:04 -06:00
RachelElysia
0eff5ce20a
Fleet queries bug: Fix 12 type instances in osquery fleet tables json (#8801) 2022-11-23 10:17:04 -05:00
Eric
403663e1ce
regenerate osquery_fleet_schema.json (#8446) 2022-10-31 16:05:01 -05:00
Eric
8fecef3ed5
Update merged schema helper and script. (#8092)
* update helper to use the osquery schema from the osquery/osquery-site repo

* update script description and generated json filename

* Add ritual to digital experience handbook

* add merged schema

* Update README.md

* Update get-extended-osquery-schema.js
2022-10-05 15:10:08 -05:00