Documentation

Create, test, version, and run scripts

Build an executable library entry with explicit parameters, test the current editor contents on one device, and inspect saved versions and results.

Access Operators can create and run scripts; administrative and policy checks govern sensitive changes.Console path /app/scriptsReviewed

Before you start

  • Know the target OS and interpreter required by the script.
  • Use a suitable enrolled device for a real test; a test executes the current code on that device.

Screenshots show the current Rapport interface with fictional example data. Use your organization’s devices and values. Select an image to enlarge it.

Find a script before creating one

Open Scripts and search by name. Filter Platform, Language, Origin, State, or Purpose. Open a script to inspect its body and metadata. Built-in scripts are read-only; use Duplicate to customize a copy.

Find a script before creating one. Example organization and device data.

Create or draft a script

Use New script, Starter scripts, or Draft with AI. An AI draft or starter is a starting point: review the executable body, supported platform, parameters, and intended effects before testing or saving it.

Set identity, purpose, risk, and execution context

In Details, enter Name, Key, and Description. Choose Purpose, Risk, Platform, Language, Timeout (seconds), and Runs as. Check the language availability message. A script that runs as Device uses SYSTEM or root; Signed-in user depends on supported user-context execution.

Fields and controls for Set identity, purpose, risk, and execution context
Field or controlWhat to do
PurposeClassifies the script as a fix, check, report, or setup workflow.
RiskDescribe the actual impact; this does not bypass policy or approval.
EnabledDisabled scripts cannot be dispatched by a new run.
Check scriptsReturn the expected present/clear result and inspect the test evidence before using the script in a detection.

Define parameters and review the body

Use Add parameter for each input. Set a unique name, type, default, and required state. Follow Parameters at runtime for the chosen interpreter. Keep secrets out of source and output; a masked input cannot protect a value deliberately printed by the script.

Test the current draft on one device

Use Test on device, choose a compatible endpoint, enter parameter values, and run the test. This executes the editor’s current draft, including unsaved edits. It is real device work and follows policy and approval. Review output, exit status, and the resulting device state.

Save a reviewed revision

Choose Create script or Save changes. Review a revision confirmation when shown. A save creates the next revision; check the impact on rules and detections that use the script. If another editor changed it, reload and reconcile instead of overwriting.

Run or reuse the saved script

On the script detail page, choose Run on devices and review the task’s targets and parameters. Use Used by to inspect dependent rules, or Add a rule for a detection-triggered or scheduled workflow. Use Runs for execution records and Revisions for the recorded versions.

Retire a script without breaking dependencies

Inspect Used by before disabling or deleting a script. Deleting a custom script can leave rules and checks with a missing-script dependency; change those dependents first. Retained run history is separate from the active script definition.

If something doesn’t work

A built-in script cannot be edited.

Choose Duplicate and edit the organization copy. Keep the original available for comparing future built-in changes.

The test works but a saved run does not.

Confirm the saved revision, runtime, parameters, platform, and Runs as context. Editor tests execute draft code; task runs execute the saved script.

No compatible device is offered.

Check platform and language support, current device reporting, and the required execution context. Do not change the platform label without making the script compatible.

Still need help? Contact Rapport support with the page, action, time, and error message. Do not include passwords or secret tokens.

All documentation