fleet/pkg/spec/testdata/policies/script-policy.yml
Ian Littman 550de39a7c
Switch path resolution for scripts to happen when spec is parsed (#22782)
#22555

This resolves issues where no-team script paths are resolved relative to
the base rather than the file they're in.

There was a similar issue for software packages, which I also fixed.

This also fixes script-poolicy associations when scripts and policy
files automating those scripts need different relative paths.

Test file moves ensure that these fixes are tested.

# 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-09 17:57:08 -05:00

7 lines
No EOL
270 B
YAML

- name: 🔥 Failing policy with script
platform: linux
description: This policy should always fail.
resolution: There is no resolution for this policy.
query: SELECT 1 FROM osquery_info WHERE start_time < 0;
run_script:
path: ../lib/collect-fleetd-logs.sh