fleet/pkg/spec
Ian Littman 0a8a396643
Ensure scripts set in no-team.yml can be used in run-script actions for No Team (#22809)
For #22787

Also revises the spec check to explain that scripts have to be defined
"controls" when used in policies for the same team, with an explicit
call-out for no-team.yml since this fix doesn't support pulling scripts
from the global file. This is because parsing and script-matching
happens early enough that we can't throw an error in the part of the
code where we bail when controls are defined in both no-team and default
files.

To minimize diff size, we're both "passing-by-ref" and returning the
maps-by-team of scripts and installers, though the former would be
sufficient on its own.

# 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. -->

- N/A 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 (sorta)
- [x] Manual QA for all new/changed functionality
2024-10-10 06:12:24 -05:00
..
testdata Switch path resolution for scripts to happen when spec is parsed (#22782) 2024-10-09 17:57:08 -05:00
gitops.go Ensure scripts set in no-team.yml can be used in run-script actions for No Team (#22809) 2024-10-10 06:12:24 -05:00
gitops_test.go Ensure scripts set in no-team.yml can be used in run-script actions for No Team (#22809) 2024-10-10 06:12:24 -05:00
spec.go no team software gitops (#20847) 2024-08-05 14:39:10 -03:00
spec_test.go Add support for escaping $ in gitops yamls (#18845) 2024-05-09 12:29:16 -03:00