Commit graph

9 commits

Author SHA1 Message Date
Lucas Manuel Rodriguez
53b7a0628a
Prevent IT admins from deleting a secret variable in use (#32161)
#31977

Tested with:
224 scripts, 102 Apple configuration profiles, 105 Apple declarations,
37 Windows configuration profiles. Scattered in 7 teams.

No variables on profiles/scripts:
- scan scripts: 22.079416ms
- scan apple profiles: 1.865083ms
- scan apple declarations: 683.75µs
- scan windows profiles: 531.167µs

A variable "X" on with profiles/scripts that have variable "Y":
- scan scripts: 26.305459ms
- scan apple profiles: 1.841708ms
- scan apple declarations: 756.917µs
- scan windows profiles: 571.875µs

---

## Testing

- [X] Added/updated automated tests

- [X] QA'd all new/changed functionality manually

For unreleased bug fixes in a release candidate, one of:

- [X] Confirmed that the fix is not expected to adversely impact load
test results
- [X] Alerted the release DRI if additional load testing is needed

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

## Summary by CodeRabbit

- New Features
- Prevents deleting a secret that’s still in use. The system now checks
scripts, Apple/Windows MDM profiles, and Apple declarations across teams
before allowing deletion.
- The delete dialog now shows a clear message indicating which item (and
team) is using the secret, replacing the previous generic error.
- Deletion succeeds once all references are removed, ensuring safer
secret management.

<!-- end of auto-generated comment: release notes by coderabbit.ai -->
2025-08-22 11:22:37 -03: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
bf1c6baa1f
Update osquery loadtest guide (#14886) 2023-11-02 15:13:42 -03:00
Victor Lyuboslavsky
eac0838b47
Added Linux instructions for running fleetd extension. (#14770) 2023-10-27 12:00:26 -05:00
Lucas Manuel Rodriguez
2254414d61
Add load test script for the fleetd labels feature (#14289)
This is a load test script for #14149. Adding it in case it's needed in
the near future.
2023-10-11 15:37:10 -03:00
Lucas Manuel Rodriguez
6a91bc54cf
Add tooling for load testing Windows CIS policies and fix typos in policy queries (#13384)
#11939

- This PR fixes typos in three CIS Windows queries (the queries were
failing with `invalid SQL syntax`).
- Also adds tooling to perform similar testing that we ran for macOS
(using `fleetd_tables` as an extension).
2023-08-18 17:32:22 -03:00
Lucas Manuel Rodriguez
dda5a3138a
Add fixes for loadtest guide for QA (#12750) 2023-07-18 12:27:06 -03: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
Lucas Manuel Rodriguez
e99e995f92
Add tooling to loadtest osqueryd in macOS (#12518)
#10292

This is an internal tool (for macOS) to load test the impact of queries
in osquery.

Sample output of script:

![osquery_worker_memory](https://github.com/fleetdm/fleet/assets/2073526/60bd10c3-270c-49b4-89f4-7b280b48b679)

![osquery_worker_cpu](https://github.com/fleetdm/fleet/assets/2073526/bf918359-914e-44f5-960e-ad252f78b7e0)
2023-06-27 12:02:12 -03:00