-
Notifications
You must be signed in to change notification settings - Fork 431
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Policy automations: run script - Backend main #22115
Comments
Since this is "install software, but with scripts", here are the relevant PRs, including fixes: https://github.com/fleetdm/fleet/pull/21650/files |
API docs PR: https://github.com/fleetdm/fleet/pull/22315/files |
"No team" policies PR: |
#22115, #22116 # 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. --> No changes file, as FE changes file covers the entire feature - [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 --------- Co-authored-by: Jacob Shandling <[email protected]> Co-authored-by: Tim Lee <[email protected]>
@xpkoala Test plan: Migration
Regression avoidance
UI
Policy automation execution
No-ops
GitOps
controls:
scripts:
- path: ../path/to/script.sh
policies
- # normal policy
run_script:
path: ../path/to/script.sh
^^ I think this will fail right now. Will test this as part of the other known issue on GitOps paths Changing existing configuration
Validation errors
|
Script links in view, |
Checklist inspired by what we needed for #19551 on the backend
API documentation
See https://github.com/fleetdm/fleet/pull/22315/files
API
DB migrations
See server/datastore/mysql/migrations/tables/20240829170024_PolicyAutomaticInstallSoftware.go
- [ ] Potentially script author info, potentially with join table for user tombstones?Script activities don't have an author, so we can skip thisPolicies service
Global policies service
Team policies service
Orbit service
- [ ] Save authorship on script execution, with nil fallbackScript run activities don't have a script author, so nothing needed hereosquery service
Policies datastore
Scripts datastore
Teams data store
Testing client
The text was updated successfully, but these errors were encountered: