Commit graph

2846 commits

Author SHA1 Message Date
Lucas Manuel Rodriguez
7f01e20c0a
Rearrange migration released in v4.57.2 (#22605)
#22571

`20241002104104_UpdateUninstallScript.go` will be released in v4.57.2,
thus I'm moving the unreleased migrations in main to run after it.
2024-10-02 18:01:57 -05:00
Tim Lee
46ade66c0f
Align battery health reporting (#22569) 2024-10-02 15:43:19 -06:00
Victor Lyuboslavsky
1f6890d1d4
Migration to new uninstall script (#22582)
#22571
2024-10-02 15:52:25 -05:00
Lucas Manuel Rodriguez
862cd142a3
Add filter to default unintaller for pkgs to only remove .app folders (#22585)
#22571

- [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
2024-10-02 17:50:27 -03:00
Jahziel Villasana-Espinoza
24c84edd7b
fix: attempt to prevent race in profile adding and deleting (#22338)
> Follow up on: #21891

# 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] Input data is properly validated, `SELECT *` is avoided, SQL
injection is prevented (using placeholders for values in statements)
- [x] Added/updated tests
- [x] Manual QA for all new/changed functionality
2024-10-01 12:32:41 -04:00
Lucas Manuel Rodriguez
f8f24e0a80
Add support to upload RPM packages (#22502)
#22473

- [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] Manual QA must be performed in the three main OSs, macOS, Windows
and Linux.

---------

Co-authored-by: RachelElysia <71795832+RachelElysia@users.noreply.github.com>
Co-authored-by: Ian Littman <iansltx@gmail.com>
2024-10-01 13:02:13 -03:00
Jahziel Villasana-Espinoza
80f0fd8889
fix: reset token team assignments to defaults (#22326)
> Related issue: #22198

# 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] Added/updated tests
- [x] Manual QA for all new/changed functionality
2024-10-01 10:26:16 -04:00
Tim Lee
937627f4ea
Windows Battery Status (#22455) 2024-09-30 16:58:00 -06:00
Tim Lee
658431e17f
Query optimization on Hosts query stats (#22417) 2024-09-30 15:39:17 -06:00
Lucas Manuel Rodriguez
b1ee0526f0
Remove sandbox backend tests (#22510)
Removing some Sandbox tests and some old proposals that are not valid
anymore.

(As agreed in weekly backend.)
2024-09-30 16:25:47 -03:00
Tim Lee
ff005d050b
Cleanup live queries (#22438) 2024-09-30 10:58:46 -06:00
Tim Lee
98c0bd8d12
Add Fedora built in label (#22465) 2024-09-30 10:02:54 -06:00
Ian Littman
de537692a1
Update MSRC feed URL in test (#22494)
Whoops, _this_ was the failing test from earlier. Related to #22492
#22493.

- [x] Added/updated tests
2024-09-28 09:18:55 -05:00
Ian Littman
e8a6456f13
Don't reuse GitHub HTTP client to pull MSRC feeds (#22493)
See #22492

As of today, MSRC's API will 401 if you pass it a JWT it doesn't expect,
and by reusing the GitHub API HTTP client for MSRC pulls we were passing
the API an unexpected JWT. Wasn't able to reproduce this locally because
I didn't need a GitHub token locally to pull release details, while the
token is populated in Actions. Was able to repro both the issue and this
fix inside Actions on my fork.

This also updates to call v3.0 of the API directly, which v2.0 has been
redirecting to for awhile.

Finally, adds slightly better logging so we know which part of the feed
generation process we're in when we're running this in Actions.

# 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
2024-09-27 21:23:48 -05:00
Lucas Manuel Rodriguez
f52e0a0e8c
Fix to not panic if MSRC for current month is not available (#21749)
See #21745.

---------

Co-authored-by: Ian Littman <iansltx@gmail.com>
2024-09-27 16:59:43 -05:00
Roberto Dip
00ec402f18
fix VPP migration edge case (#22460)
https://github.com/fleetdm/fleet/issues/22415

# 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] Input data is properly validated, `SELECT *` is avoided, SQL
injection is prevented (using placeholders for values in statements)
- [x] Added/updated tests
- [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] Manual QA for all new/changed functionality
2024-09-27 14:13:27 -03:00
Victor Lyuboslavsky
e0faa14025
Updating scep package with latest fixes (#22372)
Updating scep package with changes up to
github.com/micromdm/scep@781f8042a79cabcf61a5e6c01affdbadcb785932
Fixes needed for NDES client for #21955 

Manually pulled in the recent changes. You can view the changes in the
remote like:
https://github.com/getvictor/scep/compare/fleet...micromdm%3Ascep%3Amain
2024-09-27 07:04:11 -05:00
Ian Littman
b43dab7198
Fix software-with-bundle-ID add when the same title with different/no bundle ID, add missing request timeout special case for edit package endpoint (#22413)
Same as #22412, for #21370, but against `main` rather than 4.57.0.

# 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] Added/updated tests
- [x] Manual QA for all new/changed functionality

---------

Co-authored-by: Roberto Dip <rroperzh@gmail.com>
2024-09-26 15:23:50 -03:00
Tim Lee
839106c572
Hotfix CVE test (#22349) 2024-09-24 17:45:37 -06:00
Sarah Gillespie
ea0175ea0c
Improve MySQL queries that aggregate MDM profile statuses for Apple hosts (#22252) 2024-09-24 14:47:46 -05:00
Lucas Manuel Rodriguez
8d664bd456
Make software batch endpoint asynchronous (#22258)
#22069

API changes: https://github.com/fleetdm/fleet/pull/22259

QAd by applying 10 pieces of software on a team, which took 3+ minutes
in total (which, before these changes was timing out at 100s.)

With this approach, a GitOps CI run timing out might leave the
background process running (which will eventually be applied to the
database). The team discussed and agreed that we can fix this edge case
later.

- [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] Input data is properly validated, `SELECT *` is avoided, SQL
injection is prevented (using placeholders for values in statements)
- [X] Added/updated tests
- [X] Manual QA for all new/changed functionality
2024-09-20 11:55:47 -03:00
Jahziel Villasana-Espinoza
90c04eef37
fix: stop profiles that never reached the host from showing up as failed (#22186)
> Related issue: #21891

# 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] Added/updated tests
- [x] Manual QA for all new/changed functionality
2024-09-19 11:31:46 -04:00
Lucas Manuel Rodriguez
90959dbc9f
Fixes for no-team.yml GitOps (#22210)
#22185

- [X] Manual QA for all new/changed functionality
2024-09-18 14:16:59 -03:00
Roberto Dip
2bfbf2fe3f
Allow CA certificates with extendedKeyUsage attributes. (#22160) 2024-09-17 18:07:34 -03:00
Ian Littman
518a4a1f98
Use previous package filename for activity if installer edit doesn't change the package (#22177)
Also adds a line in the makefile help for generate-doc, as it took me
way too long to find that command this time.

# Checklist for submitter

- [x] Manual QA for all new/changed functionality
2024-09-17 15:21:25 -05:00
Lucas Manuel Rodriguez
2d05f2450d
Minor fixes to policy software installations (#22148)
PR for the three fixes described in #22104.

- [X] Added/updated tests
- [X] Manual QA for all new/changed functionality
2024-09-17 13:30:27 -03:00
Ian Littman
8575535116
Add installer edit side effects to batch installer update (via GitOps) (#22100)
#21612 

# Checklist for submitter

- [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] Input data is properly validated, `SELECT *` is avoided, SQL
injection is prevented (using placeholders for values in statements)
- [x] Added/updated tests

---------

Co-authored-by: RachelElysia <rachel@fleetdm.com>
Co-authored-by: Luke Heath <luke@fleetdm.com>
Co-authored-by: Jacob Shandling <jacob@fleetdm.com>
Co-authored-by: Victor Lyuboslavsky <victor.lyuboslavsky@gmail.com>
2024-09-17 11:00:46 -05:00
RachelElysia
1c1ebef4ef
20404: Edit packages feature (#21812)
## Issue
Cerra #20404

## Description
- Add frontend/API backend for editing software packages. GitOps will be
a separate PR.

## More
- Please see subtasks for change lists
  - #21611 
  - #21613

# 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] Input data is properly validated, `SELECT *` is avoided, SQL
injection is prevented (using placeholders for values in statements)
- [x] Manual QA for all new/changed functionality

Automated tests will follow in another PR.

---------

Co-authored-by: Ian Littman <iansltx@gmail.com>
Co-authored-by: Luke Heath <luke@fleetdm.com>
Co-authored-by: Jacob Shandling <jacob@fleetdm.com>
Co-authored-by: Victor Lyuboslavsky <victor.lyuboslavsky@gmail.com>
2024-09-17 08:40:47 -05:00
Lucas Manuel Rodriguez
d69b4df08a
Add docs around server WriteTimeout (#22153)
Related to #22069 and core review comments in #22146.
2024-09-17 10:21:54 -03:00
Victor Lyuboslavsky
ef8e48c9d0
Uninstall script runs after failed post-install script (#22098) 2024-09-16 16:15:31 -05:00
Tim Lee
1da93d4c3c
Ubuntu Python Package Filtering (#21989) 2024-09-16 10:01:21 -06:00
Victor Lyuboslavsky
394caa0138
Fixed created_at timestamp for install results. (#22093)
Unreleased bug #22091 
# Checklist for submitter

- [x] Added/updated tests
- [x] Manual QA for all new/changed functionality
2024-09-13 16:29:51 -05:00
Roberto Dip
519ee09117
add new changes for BYOD and fix issues (#22079)
for #21019 

# 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] Added/updated tests
- [x] Manual QA for all new/changed functionality
2024-09-13 14:53:05 -03:00
Tim Lee
1deccdb68d
Add cpe translation for macos vbox (#22082) 2024-09-13 10:57:50 -06:00
Tim Lee
160d11a2cc
Fix Host Software Vulnerability Filter (#21899) 2024-09-13 08:28:26 -06:00
Ian Littman
463b0048fc
Update installer extensions based on file contents as part of uninstall script migration cron (#22060)
# Checklist for submitter

- [x] Input data is properly validated, `SELECT *` is avoided, SQL
injection is prevented (using placeholders for values in statements)
- [x] Added/updated tests

Automated integration tests fully exercise this change (and have been
revised to assert that this works correctly).
2024-09-13 08:03:28 -05:00
Jahziel Villasana-Espinoza
a2c6de65d6
fix: add missing check for invalid email (#22057)
> Related issue: #21813

# 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] Added/updated tests
- [x] Manual QA for all new/changed functionality
2024-09-13 08:41:52 -04:00
Tim Lee
419433fb44
Homebrew git false negative vulnerability (#22002) 2024-09-13 06:00:12 -06:00
Victor Lyuboslavsky
3eccbb1bd0
Uninstall migration cron job (#22036) 2024-09-12 20:07:56 -05:00
Ian Littman
199dad272b
Add software installer extension column to database (#22017)
#22044 

This is distinct from the filename extension due to being based on
package introspection.

# Checklist for submitter

- [x] Input data is properly validated, `SELECT *` is avoided, SQL
injection is prevented (using placeholders for values in statements)
- [x] Added/updated tests
- [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] Manual QA for all new/changed functionality
2024-09-12 16:22:35 -05:00
Lucas Manuel Rodriguez
169d9de24c
Clear policy results and stats when setting or changing an installer (#22053)
Follow up PR for #21428.

After some discussions with Noah we want to clear policy results when a
user sets for the first time or changes an installer on a policy.
2024-09-12 16:56:12 -03:00
Lucas Manuel Rodriguez
92c4c529c7
Fix breaking changes tests (#22054)
Related to #21467 and #20320
2024-09-12 16:33:44 -03:00
Victor Lyuboslavsky
b60ebbc63e
Added GitOps support for uninstall script. (#21969)
`fleetctl gitops` subtask for #20320

# Checklist for submitter

- [x] Input data is properly validated, `SELECT *` is avoided, SQL
injection is prevented (using placeholders for values in statements)
- [x] Added/updated tests
- [x] Manual QA for all new/changed functionality
2024-09-12 13:25:40 -05:00
Dante Catalfamo
0074a5f964
Validate orbit access to installer package before returning it (#21337) 2024-09-12 13:36:19 -04:00
Lucas Manuel Rodriguez
4c24729df0
Add policies for "No team" (#21972)
#21467

- [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] Input data is properly validated, `SELECT *` is avoided, SQL
injection is prevented (using placeholders for values in statements)
- [X] Added/updated tests
- [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] Manual QA for all new/changed functionality
2024-09-12 14:23:25 -03:00
Victor Lyuboslavsky
8e5d056198
Uninstall packages (#21892)
#20320

# Demo video(s)
- API demo: https://www.loom.com/share/037c82cbde9743cfa42778eb04612482

# Checklist for submitter

- [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] Input data is properly validated, `SELECT *` is avoided, SQL
injection is prevented (using placeholders for values in statements)
- [x] Added/updated BE tests
- [ ] Added/updated FE tests
- [ ] If paths of existing endpoints are modified without backwards
compatibility, checked the frontend/CLI for any necessary changes
- [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] Manual BE QA for all new/changed functionality
- [ ] Manual end-to-end QA for all new/changed functionality
2024-09-12 11:39:41 -05:00
Victor Lyuboslavsky
f5fb6ba75c
Fixes from BE code review. 2024-09-12 10:29:28 -05:00
Martin Angers
a1f6e22622
Fix cron profile delivery when a single Windows VM has duplicate enrollment entries for its host_uuid (#21983) 2024-09-11 17:18:59 -04:00
Victor Lyuboslavsky
ea5100b97c
Add data retention section to backend patterns.md (#22015) 2024-09-11 16:14:40 -05:00
Victor Lyuboslavsky
174b4ece05
Added created_at to fleet/scripts/results and switched to enum for install status. (#22019) 2024-09-11 15:56:49 -05:00