How to Keep Secrets Out of Published HTML
Display is our product. We checked the Display facts against the Security page on 14 October 2026.
Display is our product. We checked the Display facts against the Security page on 14 October 2026.
What Display does with your file
Artifacts open at *.dsp.so. Scripts, styles and embedded resources get to the browser of the reader without changes. Display controls who can open an artifact. It does not change the file. A reader who can open the artifact can read all of it, including text that is in the page source only. Read the section "Scripts in artifacts run with normal browser capabilities" on the Security page.
Where secrets come from
- Environment output. The agent ran
envor printed a config file, then put the result in a summary. - Logs and stack traces. They can contain tokens, URLs with keys and email addresses.
- Customer data. A report copies rows from a database.
- Fixed values in generated code. A dashboard calls an API with a key in the script.
- Exported sessions. A transcript holds every command and its output. Read How to export and share a coding agent session.
Check the file before you publish
Search the file for common patterns:
grep -n -i -E "api[_-]?key|secret|token|password|bearer |sk-|AKIA" ./report.htmlThis list of patterns is not complete. Read the page source for URLs that contain ?key= or ?token=. You can also ask the agent: "List every credential, token, email address and customer name in report.html. Do not publish."
Publish in the safest order
- Tell the agent: "Publish report.html to Display as Private."
- Open the URL and read the page source.
- Tell the agent: "Update the page at the same link and set it to Company."
- Use Public only for a page that is for anyone.
An update keeps the same URL. Each update adds a new version, and Display keeps the older ones, so a secret that you remove in version 2 is still in version 1. Rotate every secret that was in a version. Remove the artifact if the content must be gone.
What to do if you published a secret
- Rotate the secret at its provider.
- Remove the artifact, or change it to Private.
- Check the audit log if your plan has one (Business and Enterprise: 365 days).
- Report a security incident to privacy@display.dev.
When another approach is better
If a page must call a service with a key, make that call on a server and publish only the result. Scripts in a published page run in the reader's browser. Internal apps are in private beta. On Business, the domain allowlist lets a published page call other services. Display adds no login or API key to those calls, so keep the key out of the page.
FAQ
Does Display remove secrets from a file?
No. Display serves the file as you published it. Think of every file as readable by anyone who can open it.
Are Private artifacts safe for secrets?
No. Private controls who can open the page. Anyone who can open the page can read its source. Keep secrets out of every artifact.
Can an agent publish without asking me?
An agent that has your credentials can publish. Use Private as the default, and tell the agent to ask you before it changes the visibility.
A full workspace behind every URL
Share with your team and clients
Invite people by email and give each one a role.
Go back to any version
Each publish and each edit saves a version. The link stays the same.
A Space for each team
Spaces and folders for each team and each client.
Search for people and agents
You and your agents search every doc you can open.
See who opened it
Each doc shows who opened it, and when.
Private betaInternal apps that get data from your sourcesConnectors for the tools your team uses
A URL for everything your agents make
Any agent, any model. Behind your company’s sign-in, at one flat price.
Free to start · Unlimited viewers