Feat/synthetics audit#3
Merged
Merged
Conversation
added 4 commits
July 9, 2026 17:39
Extends cleanup mode with two read-modify-write asset types: - workload_entity: removes one entity GUID from a workload's static entity list - workflow_entity: removes one entity GUID from workflow issue filter predicates; aborts if removal would leave the workflow with no predicates Adds unit tests for all previously uncovered audit fetchers (dashboards, workflows, workloads, service levels) and for the cleanup deleteAsset dispatch; audit coverage rises from ~45% to ~68%, cleanup from ~92% to ~95%. Updates README with entity removal quick-start examples and corrects the cleanup flags table to list all four supported asset types.
Audit mode now scans synthetic monitors for two finding categories: - Disabled monitors (any type): config finding flagging monitors with status=DISABLED so they can be cleaned up or re-enabled - Hardcoded IDs in scripts: SCRIPT_API and SCRIPT_BROWSER monitor scripts are scanned using the existing ScanText pattern engine; appId, entityGuid, hostId, and other hardcoded references are reported per-monitor Cleanup mode adds synthetics_monitor as a full-deletion asset type using the syntheticsDeleteMonitor NerdGraph mutation. The monitor's entity GUID (asset_id from the audit CSV) is passed directly to the mutation. All new code is covered by unit tests (fetch_synthetics.go at 97.1%). README and CLI help text updated with new skip value and cleanup type.
… endpoint SyntheticsScriptApiMonitor and SyntheticsScriptBrowserMonitor are accessible via actor.account.synthetics, not actor.entity(guid). The entity API returns SyntheticMonitorEntity which has no script field. Switch the script fetch query to actor.account.synthetics.script(monitorGuid) which returns SyntheticsMonitorScriptQueryResponse with the text field. Confirmed via NerdGraph schema introspection.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Adding Synthetic Monitoring audit and cleanup capabilities