Commit graph

686 commits

Author SHA1 Message Date
Dante Catalfamo
7be7d17489
Identify if the release is older than npm, publish with tag (#26787)
#26520
2025-03-11 09:46:01 -04:00
Dante Catalfamo
d5e9153cea
Add LabelsIncludeAny to queries endpoint (#26823)
#16413 

---------

Co-authored-by: Scott Gress <scottmgress@gmail.com>
2025-03-11 09:45:01 -04:00
dependabot[bot]
6bbf645c10
Bump axios from 1.7.9 to 1.8.2 in /tools/fleetctl-npm (#26994) 2025-03-10 15:01:42 -05:00
Konstantin Sykulev
13003cf5fc
Updated developer on-call (#26795)
Updated docs to point developers to bash script to pull open community
issues and prs.

Added greater limit to existing pr fetch call.
2025-03-10 11:28:08 -05:00
Scott Gress
f5f2a16867
Clear db before restoring from backup (#26928)
For #26478 

## Details

This PR updates the db snapshot script to have it add a `drop database
if exists` line to the top. This means that snapshots will start from a
clean state, so that they won't get out of sync with migrations.

## Testing

I tested this by:

1. starting with an up-to-date database, restoring an old snapshot while
on the main code branch, then trying `fleet prepare db`.
2. This failed because the migrations it tried to run were creating
tables that already existed in the database.
3. I made a new copy of this snapshot by dropping my db and doing
`create database fleet`, restoring the snapshot and snapshotting again.
4. On the main branch, I reset my db using `make db-reset` and then
restore my new snapshot
5. Finally, did `fleet prepare db` and this time it worked since the new
snapshot dropped the database before restoring.
2025-03-10 10:01:52 -05:00
Victor Lyuboslavsky
b976956b24
Add DigiCert configs. (#26780)
For #26603

This PR includes:
- DigiCert configs
- Some config code for custom SCEP, but not fully functional
- Validation tests for DigiCert Configs
- DigiCert activities (manually tested)

This PR does not include the following:
- Encryption of DigiCert API tokens -- this requires DB migration (in
next PR)
- Making an HTTP call to DigiCert API for validation (in later PR)
- Integration tests (in later PR)
- Changes file (in later PR)

# Checklist for submitter

- [x] Added/updated automated tests
- [x] Manual QA for all new/changed functionality
2025-03-05 15:02:26 -06:00
Luke Heath
df60b75f2e
Adding changes for Fleet v4.64.2 (#26850) (#26857) 2025-03-05 11:40:16 -06:00
Victor Lyuboslavsky
46719c9fb2
Auto-generate and check Android schema.sql (#26720)
For #26218 

This is an infrastructure change. No functional feature changes.
2025-02-28 16:30:40 -06:00
Victor Lyuboslavsky
ac6885a865
Updated custom lint rules to include Android datastore. (#26722)
For #26218 

### Observations
The custom lint rules don't catch many issues. For example: this checks
for an illegal use of reader/writer in a function
(`containsIllegal(m["fn"]))`), but if the reader/writer code is
refactored into a different function, then this check will not fail.

Also, the rules lack tests, making them hard to maintain and potentially
irrelevant after code is refactored.
2025-02-28 15:08:39 -06:00
George Karr
ced7332a1d
Cleaning up publish release and adding chart version increment (#26535)
For #23680
2025-02-28 15:03:33 -06:00
Scott Gress
f7e4a39915
Add help system to Makefile + FDM command (#25028) 2025-02-28 07:42:32 -06:00
Lucas Manuel Rodriguez
df5461cb4c
Remove unused code (from Fleet's sandbox implementation) (#26645)
Removing unused code and APIs (these APIs and code were used by "Fleet
Sandbox" which doesn't exist anymore).
2025-02-27 17:37:56 -03:00
Lucas Manuel Rodriguez
ae00add76e
Update alpine to patch vulnerability with severity "HIGH" (#26593)
The vulnerability was posted by a prospect.

Posting manual command until we get #25902 done.
```sh
trivy image --ignore-unfixed --pkg-types os,library --severity CRITICAL,HIGH --show-suppressed fleetdm/fleet:v4.64.1
[...]
fleetdm/fleet:v4.64.1 (alpine 3.21.0)

Total: 2 (HIGH: 2, CRITICAL: 0)

┌────────────┬────────────────┬──────────┬────────┬───────────────────┬───────────────┬──────────────────────────────────────────────────────────┐
│  Library   │ Vulnerability  │ Severity │ Status │ Installed Version │ Fixed Version │                          Title                           │
├────────────┼────────────────┼──────────┼────────┼───────────────────┼───────────────┼──────────────────────────────────────────────────────────┤
│ libcrypto3 │ CVE-2024-12797 │ HIGH     │ fixed  │ 3.3.2-r4          │ 3.3.3-r0      │ openssl: RFC7250 handshakes with unauthenticated servers │
│            │                │          │        │                   │               │ don't abort as expected                                  │
│            │                │          │        │                   │               │ https://avd.aquasec.com/nvd/cve-2024-12797               │
├────────────┤                │          │        │                   │               │                                                          │
│ libssl3    │                │          │        │                   │               │                                                          │
│            │                │          │        │                   │               │                                                          │
│            │                │          │        │                   │               │                                                          │
└────────────┴────────────────┴──────────┴────────┴───────────────────┴───────────────┴──────────────────────────────────────────────────────────┘
```
2025-02-25 18:33:24 -03:00
George Karr
4a03051c10
Adding changes for Fleet v4.64.1 (#26491) 2025-02-20 19:39:26 -06:00
Scott Gress
39e9c0a349
Fix issues related to architecture-namespaced binaries (#26453)
This PR fixes a couple of issues introduced when we started releasing
separate amd64 and arm64 versions of our windows and linux binaries:

* Adds the architecture string to the download url in the fleetctl npm
package
* Updates the goreleaser templates to only add the architecture to
non-macos (i.e. windows and linux) packages
* Updates the script that the website uses to download fleetctl

I did a weak test of the fleetctl npm installer by hardcoding what was
returned for my system type and at least verified that the download url
worked. Doing some more checks on VMs now.
2025-02-20 16:42:14 -06:00
jacobshandling
c22f575150
Add gitops app config fields, API access, activities, tests (#26282)
## For #26230 

- Add `gitops` settings to app config
- GET and PATCH endpoint functionality to retrieve and modify these
settings
- generate activities for enabling and disabling GitOps mode
- Premium only
- Update tests

<img width="1355" alt="Screenshot 2025-02-17 at 9 22 13 AM"
src="https://github.com/user-attachments/assets/e03d7fd6-8795-4df2-9c8f-ffbcabd2d212"
/>

<img width="1575" alt="Screenshot 2025-02-17 at 9 24 33 AM"
src="https://github.com/user-attachments/assets/5bf963d4-6fb7-4586-8f6f-9e605c25bf06"
/>

## Checklist for submitter

- [x] Added/updated automated tests
- [ ] A detailed QA plan exists on the associated ticket (if it isn't
there, work with the product group's QA engineer to add it)
- [x] Manual QA for all new/changed functionality

---------

Co-authored-by: Jacob Shandling <jacob@fleetdm.com>
2025-02-20 08:40:46 -08:00
George Karr
076fe894c5
Adding changes for Fleet v4.63.1 (#26471) 2025-02-20 10:02:42 -06:00
Victor Lyuboslavsky
fc33df1981
Basic Android MDM on/off functionality (#26309)
For #26218 

Basic Android MDM on/off backend functionality. Manually tested.

The following env vars must be set:
```
FLEET_DEV_ANDROID_ENABLED=1
FLEET_DEV_ANDROID_SERVICE_CREDENTIALS=$(cat credentials.json)
FLEET_DEV_ANDROID_PUBSUB_TOPIC=projects/your-project/topics/your-topic
```

I picked https://github.com/go-json-experiment/json as the JSON library,
which seems like the safest option.
- will become json/v2 at some point
- currently used in production by other companies, like Tailscale
- well-maintained
- Some context here: https://github.com/fleetdm/fleet/issues/25512

Plan for next work:
- refactoring from 1st PR
- add pubsub with device enroll -> spec proxy for fleetdm.com
- come back to this sub-task to add tests and finish TODOs

# Checklist for submitter

- [x] Added/updated automated tests
- [x] Manual QA for all new/changed functionality
2025-02-18 09:43:11 -06:00
Lucas Manuel Rodriguez
df3954ba44
Fixes to releaser.sh (#26397)
For #26324.

My previous PR broke the script. This fixes it. (I used to release
osqueryd 5.16.0 to edge.)
2025-02-17 19:10:55 -03:00
Lucas Manuel Rodriguez
3ba12fd082
Small improvements to releaser.sh (#26385)
These were discussed during the release of 1.39.0 to our `edge` channel.
2025-02-17 14:10:59 -03:00
Victor Lyuboslavsky
c1e8f36493
Added --update-interval=1m to prompts to help with releasing. (#26263)
Updated releaser.sh script

Increasing the update frequency makes it faster to see the update pushed
out to your local agent.
2025-02-17 12:42:37 -03:00
Victor Lyuboslavsky
4b007e20e1
Android scaffold (#26274)
Android scaffold code and refactorings
- Android packages intended to be decoupled from other Fleet code

Video explaining the PR: https://www.youtube.com/watch?v=cza-35Z9Wxk

# Checklist for submitter

- [x] If database migrations are included, checked table schema to
confirm autoupdate
- For database migrations:
- [x] Checked schema for all modified table for columns that will
auto-update timestamps during migration.
- [x] Confirmed that updating the timestamps is acceptable, and will not
cause unwanted side effects.
- [x] Ensured the correct collation is explicitly set for character
columns (`COLLATE utf8mb4_unicode_ci`).
- [x] Added/updated automated tests
- [x] Manual QA for all new/changed functionality
2025-02-13 14:32:19 -06:00
Martin Angers
240f55b9e8
Add script execs and software installs stats to osquery-perf (#26239) 2025-02-11 12:46:53 -05:00
Lucas Manuel Rodriguez
562670961d
Update releaser.sh to use new TUF (#26068)
For #25863.

I will test this script when releasing `1.39.0` to the `edge` channel.
2025-02-07 18:46:13 -03:00
Lucas Manuel Rodriguez
9114d0405b
Update TUF status generation to use new TUF repository (#26099)
For #25853.
2025-02-07 08:30:07 -03:00
Luke Heath
6a0432fd8e
Update release script to reflect new release article URL convention (#26041) 2025-02-06 15:48:21 -06:00
Reed Haynes
943919b1a2
Update Fleetd-auto-update-test-guide.md (#26156)
updating the ordering of commands and adding semantic version for
windows desktop build
2025-02-06 18:47:17 -03:00
Janis Watts
8bc00096d2
Add troubleshooting note to README.md (#26145)
Adding a troubleshooting note to the README.md to address failures to
generate ARM Linux enrollment packages when running Docker Desktop on an
Apple Silicon Mac.

---------

Co-authored-by: Lucas Manuel Rodriguez <lucas@fleetdm.com>
2025-02-06 15:26:10 -06:00
Lucas Manuel Rodriguez
5c5fc1cf1b
Fix local TUF windows orbit build on Apple silicon (#26097) 2025-02-05 18:57:49 -03:00
Scott Gress
94eb573736
Add Fleet dev snapshot tool (#25909)
For #23750 

# Overview

This PR adds a basic tool for creating and restoring Fleet dev
snapshots. In this first iteration a snapshot is just a folder
containing a MySQL db dump made using the existing backup/restore
scripts, and the tool allows you to easily save and restore snapshots
interactively.

## Usage

* `make snapshot` to create a new snapshot
* `make restore` to select and restore a snapshot 

## Future plans

Future iterations can add metadata to snapshots to integrate things
like:

* node keys from osquery-perf, so you can easily reconnect to hosts
created in a previous session
* env vars from when the snapshot was made
* the branch from when the snapshot was made, to allow switching to that
branch and restarting the server as part of the restore process
*
![image](https://github.com/user-attachments/assets/6dc86581-5c12-4b57-b900-5034e00bc496)

## Demo


https://github.com/user-attachments/assets/1590c37a-3df9-4201-a42b-ccd1a36cb6cf
2025-02-05 09:52:10 -06:00
Luke Heath
5e83ba6cc8
Adding changes for Fleet v4.63.0 (#25433) 2025-02-04 13:55:00 -06:00
Luke Heath
647c24042e
Simplify release prompt for accuracy (#26036) 2025-02-04 13:50:12 -06:00
George Karr
9e5ecfb1bc
Adding changes for Fleet v4.62.3 (#25768)
Co-authored-by: Robert Fairburn <8029478+rfairburn@users.noreply.github.com>
2025-01-29 07:49:45 -06:00
Lucas Manuel Rodriguez
a4db139e82
Remove fleetctl binary from fleetdm/fleet image and remove unused Dockerfile (#25749)
For #25748.

Manually tested by:
1. Building a `fleet` executable for Linux on a Ubuntu VM (with
`-extldflags "-static"`) for Alpine.
2. Placing the executable in `tools/fleet-docker`.
3. Building a local docker image using `docker build -t
fleetdm/fleet:v42.42.42 --platform=linux/amd64 .`.
4. Running the docker image (using `docker run`) and use Fleet on the
browser.
```
docker run -v $(pwd)/../osquery:/run -p 8412:8412 -e FLEET_MYSQL_ADDRESS=host.docker.internal:3306 -e FLEET_MYSQL_DATABASE=fleet -e FLEET_MYSQL_USERNAME=fleet -e FLEET_MYSQL_PASSWORD=insecure -e FLEET_REDIS_ADDRESS=host.docker.internal:6379 -e FLEET_SERVER_ADDRESS=0.0.0.0:8412 -e FLEET_SERVER_CERT=/run/fleet.crt -e FLEET_SERVER_KEY=/run/fleet.key -e FLEET_LOGGING_JSON='true' -e FLEET_VULNERABILITIES_CURRENT_INSTANCE_CHECKS="yes" -e FLEET_VULNERABILITIES_DATABASES_PATH=/vulndb -e FLEET_LOGGING_DEBUG='true' -it fleetdm/fleet:v42.42.42
```

- [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/Committing-Changes.md#changes-files)
for more information.
- [x] Manual QA for all new/changed functionality
2025-01-28 19:58:20 -03:00
Luke Heath
b0de218606
Clean up engineering docs (#25708)
No additions, just cleaning up organization and moving some things
around.
2025-01-23 16:20:42 -06:00
Lucas Manuel Rodriguez
9ec02dff0b
Fix migration script to add arm64 on second and third generation of p… (#25737) 2025-01-23 18:19:17 -03:00
Lucas Manuel Rodriguez
d6e026982a
Update migration_test.sh (#25707) 2025-01-22 20:04:13 -03:00
Lucas Manuel Rodriguez
5c6fe54a10
Update migration_test.sh (#25696) 2025-01-22 18:01:05 -03:00
Reed Haynes
ede9086e0a
Update migration_test.sh (#25693)
add prompt when downgrading hosts to 1.37
2025-01-22 18:00:26 -03:00
Luke Heath
ce012687cc
Adding changes for Fleet v4.62.2 (#25564) 2025-01-17 14:55:09 -06:00
George Karr
5cbf1fa3fc
Update publish_release.sh (#25435)
Just updating publish script to fix new qa and teams
2025-01-17 14:38:39 -06:00
Lucas Manuel Rodriguez
14d7749138
Migration script to support multiple hosts and rpm and arm64 (#25542) 2025-01-17 14:13:27 -03:00
Lucas Manuel Rodriguez
4b523bc6ae
Add support for universal binary on test migration script (#25483) 2025-01-16 13:07:09 -03:00
Lucas Manuel Rodriguez
70096e86ac
Changes for migration TUF QA (#25468) 2025-01-15 18:36:53 -03:00
George Karr
a672ff8f1d
Adding changes for Fleet v4.62.1 (#25417) 2025-01-14 15:19:54 -06:00
Lucas Manuel Rodriguez
f1705280fe
Add instructions to use ngrok for migration testing (#25420)
Adding some capabilities to test migration locally with ngrok. To test
HTTPS.
2025-01-14 17:25:05 -03:00
Luke Heath
4cca22384d
Adding changes for Fleet v4.62.0 (#25092)
Ready for review.
2025-01-13 16:23:26 -06:00
dependabot[bot]
de530407f2
Bump golang.org/x/net from 0.25.0 to 0.33.0 in /tools/terraform (#25342) 2025-01-10 13:32:34 -06:00
Lucas Manuel Rodriguez
009f54bdda
Changes to migrate to new TUF repository (#23588)
# Changes

- orbit >= 1.38.0, when configured to connect to
https://tuf.fleetctl.com (existing fleetd deployments) will now connect
to https://updates.fleetdm.com and start using the metadata in path
`/opt/orbit/updates-metadata.json`.
- orbit >= 1.38.0, when configured to connect to some custom TUF (not
Fleet's TUFs) will copy `/opt/orbit/tuf-metadata.json` to
`/opt/orbit/updates-metadata.json` (if it doesn't exist) and start using
the latter.
- fleetctl `4.63.0` will now generate artifacts using
https://updates.fleetdm.com by default (or a custom TUF if
`--update-url` is set) and generate two (same file) metadata files
`/opt/orbit/updates-metadata.json` and the legacy one to support
downgrades `/opt/orbit/tuf-metadata.json`.
- fleetctl `4.62.0` when configured to use custom TUF (not Fleet's TUF)
will generate just the legacy metadata file
`/opt/orbit/tuf-metadata.json`.

## User stories

See "User stories" in
https://github.com/fleetdm/confidential/issues/8488.

- [x] Update `update.defaultRootMetadata` and `update.DefaultURL` when
the new repository is ready.
- [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/Committing-Changes.md#changes-files)
for more information.
- [X] Added/updated tests
- [X] Manual QA for all new/changed functionality
- For Orbit and Fleet Desktop changes:
- [X] Orbit runs on macOS, Linux and Windows. Check if the orbit
feature/bugfix should only apply to one platform (`runtime.GOOS`).
- [X] Manual QA must be performed in the three main OSs, macOS, Windows
and Linux.
- [X] Auto-update manual QA, from released version of component to new
version (see [tools/tuf/test](../tools/tuf/test/README.md)).
2025-01-10 14:27:30 -03:00
Ian Littman
6014908ab6
Correct fix for long MSI interned strings (#25104)
h/t https://github.com/binref/refinery/issues/72, for #24720. No changes
file as this is an unreleased bug.

Also added output for version in the custom package parser tool.

# Checklist for submitter

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

<!-- Note that API documentation changes are now addressed by the
product design team. -->

- [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/Committing-Changes.md#changes-files)
for more information.
- [x] Manual QA for all new/changed functionality
2025-01-02 14:43:36 -06:00