How to Configure Protection Policy Servicenow

Published
Length
3 min read

Luis Felipe Dias

All posts

A protection policy ServiceNow rule stops other users from changing or reading your custom app files. You set it up on each script or flow before you publish your app. Teams build custom apps and share them across many company instances. Without file rules, local admins can change your core logic and break future updates. Setting up the right rule keeps your code safe and easy to support. How a protection policy ServiceNow rule works When you build an app in ServiceNow, you create scripts, t

Your coding agents run with your access.

Claude Code reaches prod with a developer's credentials, and approval prompts get clicked through. hoop.dev checks every query, masks sensitive data, and holds risky changes for a human.

A protection policy ServiceNow rule stops other users from changing or reading your custom app files. You set it up on each script or flow before you publish your app.

Teams build custom apps and share them across many company instances. Without file rules, local admins can change your core logic and break future updates. Setting up the right rule keeps your code safe and easy to support.

How a protection policy ServiceNow rule works

When you build an app in ServiceNow, you create scripts, tables, and logic records. Each file has a rule field that controls what happens on other instances. The rule does not change what you can do in your own dev instance. Instead, it takes effect when another team installs your app from a repo.

You can choose between three main levels for each app file. Leaving the field blank lets anyone on the next instance edit the file. Setting the rule to read-only lets local admins see the code but blocks edits. Setting the rule to protected hides the source logic and blocks all local changes.

Safe defaults help your team avoid broken updates down the road. You should make core business scripts read-only by default. This lets local teams read the logic to debug issues on their own. At the same time, it stops them from making local changes that block upgrades.

Reserve the protected level for secret logic or private business rules. If local admins cannot read a script, they must ask your team for help. Use blank rules only for template files that local teams must change.

How to plan file rules across your team

Good file rules start with a clear plan before you write any code. Split your app into two parts during the design phase. Put your core logic in one set of scripts and lock them down. Put local settings in separate files that admins can edit freely.

Service-to-Service Authentication: architecture patterns and best practices

Continue reading? Get the full guide.

Free. No spam. Unsubscribe anytime.

This split design gives local teams the power to adjust the app safely. They can change lookup values or local rules without touching your main code. When you push a new version, the platform updates your locked scripts cleanly. Your team spends less time fixing broken upgrades across different company instances.

Review these file settings during every peer code check. Make sure no dev leaves a core script blank by mistake. A quick check before you publish saves hours of support work later.

Checking rules and limits of static settings

Before you publish an app, check the rule field on every key file. You can build a simple report on the app file table to check them. Look for scripts with blank rules and fix them before you push the build. Next, install the app on a test instance to check how it works. Log in with a standard admin role on that test instance. Try to edit a locked script to confirm the rule blocks the change.

Keep in mind that a static file rule only locks the code record itself. It does not control what happens when a user or script runs a session. Once a role logs in to ServiceNow, it can still query raw table data. Static file rules do not mask emails, phone numbers, or card numbers in results.

Also, local admins with high roles can still change table data or system properties. Audit logs show when a file changes, but they miss many live data queries. To protect live data, you need controls that check every command and mask results.

Check database and API queries on the wire

Identity tools, roles, and network rules decide who opens a session. Setup alone cannot check what each query does or mask sensitive values in a response once a session starts. When workflows touch Postgres, MySQL, SQL Server, MongoDB, ClickHouse, Kubernetes APIs, SSH, or internal HTTP APIs, hoop.dev runs beside those services as an open-source proxy, a sidecar for your Postgres or API. It inspects requests coming in and results going back on the wire.

Your login details and client tools stay as they are while hoop.dev guardrails refuse bad deletes or drops before they run. On responses, hoop.dev data masking rewrites matched sensitive values in memory. Furthermore, hoop.dev holds SOC 2 Type II, is MIT licensed, and writes every query and decision to an audit trail that generates evidence for HIPAA, GDPR, and PCI DSS. See the source on GitHub.

Frequently asked questions

When does a file rule start working?

The rule starts working only after you install the app on another instance. In your own dev instance, you can still read and edit every file.

Can I change a file from read-only to open later?

Yes, you can change the rule in your dev instance and publish an update. Once the permissions instance updates the app, local admins can edit the file.

Does a file rule hide table data from admins?

No, the rule only locks the app code and script records. Admins with table permissions can still read and change the rows inside your tables.

The query runs. The emails stay hidden.