How it fits together
SAFE has two halves.
- The endpoint agent runs on every machine you protect. It inspects prompts to AI services on the machine itself (secrets, personal data, source code, prompt injection, screenshots and documents) and allows, warns, masks or blocks before anything leaves.
- The server collects verdict metadata from every endpoint, hosts the signed policy and serves the management console. It never sees a prompt and never makes a decision: every endpoint keeps deciding on its own, even while the server is down.
Set up the server first, then the endpoints.
Platform features
Ten parts, all shipping today: four on every device, the signed policy between device and console, four in the console, and an SDK for the AI apps your teams build.
Endpoint agent
Runs in the background from boot and covers every browser, app and terminal on the machine.
- Windows 10, Windows 11 and Linux, deployed with one installer
- Tray icon shows the PC is protected
- Names the program and account behind each request
Detection engine
Rules where the format is fixed, models where it is not.
- Vendor keys with real checksums
- Personal data with Presidio and spaCy
- Injection rules plus a classifier, and hidden characters
- Your own keywords, competitors and allowed languages
Response inspection
The model's reply is checked on its way back, streamed answers included, before the user or an agent acts on it.
- ChatGPT, Claude, GitHub Copilot, Duck.ai and the OpenAI and Anthropic APIs today; Gemini, Perplexity, Google AI Mode and Microsoft 365 Copilot replies are not checked yet
- Streams flow live, minus the last 256 characters, so a leaked key is cut before any of it shows
- Images that carry data out, look-alike and script links
- Injected and invisible instructions aimed at the next agent
AI agent governance
Coding agents and AI apps lose the tools you deny before the model ever sees them.
- Deny rules like
Bashormcp__*__delete* - Poisoned tool descriptions and look-alike tool names flagged
- MCP server inventory per endpoint
- Block a server's tools in one click
Signed policy and risk
One action per detector, published from the console per endpoint group and verified on every device.
- Allow, warn, mask or block
- A signed policy per team, applied live, with one-click rollback
- Test a draft on sample text before you publish it
- Block unapproved AI services and apps
Management console
Activity flow, AI application inventory, findings and endpoints, with roles and an audit log.
- Endpoint to verdict, at a glance
- Alerts for silent, weakened or out-of-date endpoints
- Works on phones and tablets
Evidence vault
Prompts kept for incident response are sealed on the device before they are stored.
- X25519 with AES-256-GCM
- Only the IR key opens them
- Every view is logged
Governance mapping
Controls mapped to AI-governance frameworks, with event counts as evidence.
- ISO/IEC 42001 and NIST AI RMF
- ISO 27001, GDPR, OWASP, ATLAS
- CSV export for auditors
Integrations and rollout
Fits the tools a security team already runs.
- SIEM export: CEF syslog, Splunk HEC
- Intune scripts, one enrolment key per team
- Guided installer for single PCs
- Signed updates that reach your server by themselves
Developer SDK and gateway
The same detectors and policy for the AI apps your teams build.
Guard().check(text)in Python- Gateway in front of an AI API
- Point
base_urlat it; no certificate
Requirements
| Server | Endpoint | |
|---|---|---|
| Runs on | The SAFE appliance on a virtual machine or PC (64-bit x86, BIOS or UEFI), or Docker on Linux | Windows 10 or 11; 64-bit x86 Linux with systemd (Ubuntu 20.04+, Debian 11+, RHEL 8+, Fedora) |
| Memory and disk | 2 GB and 8 GB; more disk for a large fleet's events | About 450 MB while running, 1.5 GB disk |
| Network | Endpoints reach it on TCP 9100 (HTTPS). It reaches licence.safe.shyenasec.com over HTTPS, directly, through a proxy, or through its endpoints | HTTPS to the server |
| Rights | Whoever installs the appliance or runs Docker | Administrator once, to install |
Nothing is downloaded during install: the appliance ISO and the agent's MSI carry everything they need.
Install the server
The server holds policy, accounts and metadata. It is never on a prompt's path. Install it from the appliance ISO, or run it in Docker.
-
Install the appliance
Boot a virtual machine or a spare PC from
SAFE-Server-0.2.10.isoand choose Install SAFE Server. It erases the first disk. It needs no internet and asks no questions. In a virtual machine, set the network adapter to Bridged (VMware, VirtualBox) or an external switch (Hyper-V), not NAT: behind NAT the endpoints cannot reach the server.On first boot the screen asks for the network (use a fixed address or a DHCP reservation: endpoints find the server by it), a host name, the certificate names (every address and name endpoints will use, for example
192.168.1.20,safe.corp.example) and a root password. It then shows the first console sign-in once: write it down. Leave the activation code empty for now.The screen keeps showing the console address and the certificate's SHA-256 fingerprint, with a menu for network, certificate names, activation, a new first sign-in, restart and a shell.
Or in Docker, on a Linux host. Nothing to download first: Docker fetches SAFE's image.
docker run -d --name safe --restart unless-stopped -p 9100:9100 -e SAFE_HOSTNAMES=safe.corp.example,192.168.1.20 -v safe-data:/data ghcr.io/shyena-inc/safe-server:0.2.10 docker logs safeSAFE_HOSTNAMESlists every name and address endpoints use for the server. The log shows the console address and the first sign-in, once: write it down. Back up thesafe-datavolume: it holds everything. -
Sign in
Open
https://<server>:9100/console/. The browser warns about the certificate the first time, since SAFE made it: check the fingerprint against the appliance's screen. Sign in assuperadminwith the one-time password, then choose your own. -
Turn on two-factor sign-in
Under Settings → Your account, choose Set up beside Two-factor sign-in and scan the QR code with an authenticator app (Microsoft Authenticator, Google Authenticator, 1Password and others), or type the key it shows. Then, to require it of everyone who signs in with a password, open Settings → Users and choose Require. Anyone without an app is sent to set one up at their next sign-in and can do nothing else until they have. Single sign-on and the emergency break-glass sign-in are not asked for a code. For a lost phone, a Super Admin chooses Remove two-factor under Settings → Users.
-
Activate the licence
Until a licence is active the console is read-only. Open Settings → Licence and enter your activation code under Activate. To buy one, email whois@shyenasec.com. To try SAFE first, use Start a free trial on the same page: enter your work email and choose Email me a trial code. SAFE emails a code from
noreply@mail.shyenasec.comwithin a minute (check Spam the first time): 30 days and up to 3 endpoints, with the Business features. One trial per organisation; personal addresses are refused. -
Create the incident-response key, before endpoints join
Each endpoint encrypts a copy of every inspected prompt and file to this key, so only whoever holds the key file and its passphrase can read it: not the server, not a console admin. On the appliance, choose Shell in the menu:
runuser -u safe -- /opt/safe/safe-server --data-dir /var/lib/safe ir-keygen --out /var/lib/safe/ir-key.jsonIn Docker:
docker exec -it safe safe-entrypoint ir-keygen --out /data/ir-key.json docker cp safe:/data/ir-key.json .Choose a passphrase of 12 or more characters. Copy the key file off the server, delete it there, and keep the passphrase separately. Endpoints pin the key they joined with, so create it first. If the file or the passphrase is lost, nobody can read the evidence.
-
Get an enrolment key
In Endpoints, create a group per team that needs its own policy (New group), then open Enrolment keys and choose Copy key for the group the next machines should join. The key is shown once; the server keeps only its hash, and you can rotate or remove keys on the same page. A key can enrol new computer names only, so a leaked key cannot take over an existing endpoint.
-
Get the server's certificate
Every endpoint needs
server-cert.pemto trust the server. In a browser, openhttps://<server>:9100/server-cert.pem, accept the certificate warning as you did for the console, and the file downloads. Then check it is your server's: in PowerShell, in the folder holding the file, run$c = New-Object Security.Cryptography.X509Certificates.X509Certificate2 "$PWD\server-cert.pem"; ($c.GetCertHashString("SHA256") -split "(..)" -ne "") -join ":"and compare the result with the SHA-256 on the appliance's screen. In Docker, copy it straight from the server instead, with no check needed:
docker cp safe:/data/tls/server-cert.pem .
Running from the source folder, for development or a demo on one PC: dev\server-setup.bat (add lan <IP> for other machines), then dev\start-server.bat. A source build needs no licence and says Development build.
Install an endpoint
You need the server address, an enrolment key and server-cert.pem, all from the steps above.
-
Install with the MSI
Put
server-cert.pembesideSAFE-Agent-0.2.10.msiand double-click the MSI. On Connect to your SAFE server, enter the server address (for examplehttps://192.168.1.20:9100) and the enrolment key; the certificate file is filled in from the folder. Choose Install and approve the administrator prompt. No reboot is needed.For many machines, install it silently from a script or your management tool:
msiexec /i SAFE-Agent-0.2.10.msi /qn SERVER=https://192.168.1.20:9100 ENROLLKEYFILE=C:\path\enroll-key.txt SERVERCERT=C:\path\server-cert.pemWith Microsoft Intune, use the scripts in
deploy/intune: one Win32 app per group, each carrying that group's key, withDetect-SAFE.ps1as the detection rule.If antivirus flags the agent. To see every program's traffic, the agent uses WinDivert, a signed packet-capture driver that mitmproxy ships (
WinDivert64.sysandwindows-redirector.exe). Malware can use the same driver, so some products label any program carrying it a “risk tool” rather than malware. In a VirusTotal scan of the 0.2.9 MSI, 2 of 59 flagged it, both for WinDivert alone: Kaspersky and VBA32. Microsoft Defender did not. If yours is one of them, allow SAFE in its central console before you deploy: excludeC:\Program Files\SAFE\Agentfrom scanning, and marksafe-agent.exeandmitmproxy_windows\windows-redirector.exein it as trusted applications. If the installer was already blocked, restore it from quarantine or add the exclusion and run the MSI again. -
Start protection
The agent runs as a Windows service from boot and protects every browser and app on the machine (Chrome, Edge, Firefox, Brave, Claude Desktop, VS Code, command-line tools) with no proxy settings anywhere. It decrypts only the AI services SAFE inspects and relays everything else untouched. Restart browsers that were already open.
-
Check it works
In any browser, on claude.ai or chatgpt.com:
Try Expected my password is 7#k2mabqBlocked what's the capital of France?Goes through A screenshot containing a password or API key Blocked A PDF, Word or Excel file containing an API key Blocked A password-protected PDF or an old .docBlocked it cannot be read, so it is not let through An AI service your policy blocks SAFE's block page Within a minute the console shows the endpoint under Endpoints and its verdicts under Findings. If it does not appear,
C:\ProgramData\SAFE\setup.logsays why the join was refused.
On Linux
Copy safe-agent-0.2.4-linux-x86_64.tar.gz, server-cert.pem and the enrolment key (saved as enroll-key.txt) to the machine, then:
tar -xzf safe-agent-0.2.4-linux-x86_64.tar.gz
sudo ./safe-agent/install.sh --server https://192.168.1.20:9100 --enroll-key-file enroll-key.txt --server-cert server-cert.pem
The machine joins under its host name (--device-id NAME for another) and is protected from boot by the safe-agent systemd service. It trusts SAFE's certificate system-wide, in Chrome and Chromium (install libnss3-tools first) and in Firefox, and turns off QUIC and Encrypted Client Hello in browsers. Sign out and back in afterwards. On a server, restart services that call AI APIs so they pick up the new settings.
By default it captures every program on the machine. If that breaks name resolution on your kernel, or under WSL, or sudo is not installed, it falls back to a proxy on 127.0.0.1:8080. Choose yourself with --mode local or --mode regular.
To upgrade, unpack the new package and run its install.sh with no options; the machine stays joined. Linux agents do not update themselves from the server.
| Command | Does |
|---|---|
sudo /opt/safe-agent/safe-agent --safe-run setup status | Service state, CA trust, last log lines |
journalctl -u safe-agent -f | The agent's log |
sudo /opt/safe-agent/uninstall.sh | Removes the agent; --purge also untrusts the certificate and deletes /var/lib/safe |
Set the policy
Everything is under Policies in the console. Pick the group first: each group runs its own policy. To see what your teams send before you block anything, start with Monitor only for a week.
- Detection rules
- One action per detector: Log only, Warn, Mask or Block. Presets: Balanced, Strict, Monitor only, Mask instead of block. Mask works in every AI service SAFE inspects; a value read from an image or a document is blocked instead, as it cannot be replaced there.
- Custom rules
- Your own keywords and regular expressions (code names, customers, internal hosts), reported as Custom entity or Competitor.
- Languages
- Allow only some languages, or flag some, for what people type. Off until you choose.
- Test a prompt
- Paste sample text and see what your unpublished changes would do, with each finding highlighted. The text is not stored.
- AI services
- Allow or block whole services, with a page pointing people to your approved tool.
- Agent tools
- Tools AI coding agents may not call. They are removed before the model sees them.
- User messages and evidence
- What people see when a prompt is warned, masked or blocked, and which prompts are sealed for incident response.
- Review & publish
- Lists every change before it goes out. Publish to <group> signs it. Endpoints pick it up on their next check (every 60 seconds by default) and verify the signature before applying it.
- History
- Every published version, and a rollback to any of them in one click.
Day to day
- Overview
- How much AI your fleet uses and how much is stopped.
- Activity
- The flow from endpoint to application, AI service and model to verdict. Point at a node to trace it; click to filter.
- Findings
- Each request that was warned, masked or blocked, with its detectors. Export CSV for a report.
- AI applications
- Every program seen using AI, with its risk. Allow or block it per group.
- Audit log (Settings)
- Who changed what, including every update downloaded, installed or skipped.
Users and roles
Add people under Settings → Users → Add user. Each gets a one-time password to give them privately, and every sign-in and change is recorded in the Audit log.
| Role | Can |
|---|---|
| Super Admin | Everything: users and roles, evidence settings, opening evidence, the licence |
| Admin | Change policy, enrol and revoke endpoints, read the audit log |
| IR Analyst | Read everything, open evidence with the IR key file |
| Analyst | Read everything, change nothing |
| Auditor | Read everything, and the audit log |
Sign-in and alerts
-
Sign in with your organisation's accounts
Single sign-on works with any OpenID Connect provider: Entra ID, Google Workspace, Okta. Register the console as a web application there, with the redirect address
https://<this server>:9100/admin/sso/callback, and put its client secret in a file on the server. Then run, and restart the server:safe-server sso --issuer https://login.microsoftonline.com/<tenant id>/v2.0 --client-id <client id> --client-secret-file /root/sso-secret --redirect-uri https://safe.corp.example:9100/admin/sso/callback --username-claim preferred_username --allowed-domain corp.example --checkThe sign-in page then shows the provider's button. Each person still needs a console user whose name is the part of their sign-in name before the @; the role comes from that user.
--allowed-domainis required, so an account elsewhere with the same name cannot sign in. With Entra ID use--username-claim preferred_usernameas above; with Google and Okta the default email claim works, accepted only when the provider says the address is verified. Settings → Single sign-on shows whether it is on. -
Be told without watching the console
The server can email, or post to Slack or Teams, when an endpoint's protection is weakened and, at most every 15 minutes, a summary of what was blocked. Messages never include what was typed. Run on the server (Docker:
docker exec safe safe-entrypoint alerts ...), then restart it:safe-server alerts --email-to it@company.com --smtp-host mail.company.com --smtp-from "SAFE <safe@company.com>" --smtp-user safe --smtp-password-file /root/smtp-password safe-server alerts --slack https://hooks.slack.com/services/... safe-server alerts --test
Licences
Each packaged server runs under a licence made for it. After activation the server renews it by itself, checking in with SAFE licensing every six hours over HTTPS (through HTTPS_PROXY if set). A check-in sends the licence id, the server's install id, a one-time token, the number of active endpoints and the SAFE version, nothing else. The Licence page shows the plan, endpoints used of the limit, the features included, the dates and the last contact with SAFE; Renew now checks in at once.
A server with no internet of its own needs nothing extra: its endpoints, or your browser while the console is open, carry the check-in to SAFE and the answer back. The server signs each request and SAFE signs each answer, so nothing carried can be changed. If the server was locked while every endpoint was away, the first one back renews it.
A code activates one server. To move to new hardware, activate the same code on the new server once the old one is off: three days after its last check-in, or at once if SAFE releases it.
| Licence state | Endpoints | Console |
|---|---|---|
| Active | Protect and report | Everything your plan includes. A feature outside it says which plan has it |
| Locked | Keep protecting with their last policy and keep reporting. New endpoints cannot join | Read-only, with the reason on every page. SIEM export pauses and resumes where it stopped |
A server locks when it has no licence, the licence was issued for another server, its clock was set back, it could not reach SAFE licensing for three days, or the subscription ended. The next successful check-in or activation unlocks it, without a restart.
Updates
New releases reach your server by themselves. Each time it checks in with SAFE licensing, every six hours, it learns of any newer release and downloads it. The server and every endpoint check SAFE's signature and each file's checksum themselves, and refuse a version older than the one they run.
-
Choose how updates install
Open Settings → Updates (Super Admin; it stays open while the licence is locked, so a locked server can still take a fix). With Wait for an admin to approve each update, a new release waits at the top of the page as SAFE <version> is available, with what changed. With Install new updates automatically, it installs as soon as it is downloaded.
-
Update the server
Choose Install on this server, or Skip this version. The appliance backs up its data, installs the release and restarts; if the new version does not come up within a minute, it puts the old one and the data back. In Docker, run the new image in place of the old one; the data stays in its volume:
docker pull ghcr.io/shyena-inc/safe-server:<version> docker rm -f safe docker run -d --name safe --restart unless-stopped -p 9100:9100 -e SAFE_HOSTNAMES=safe.corp.example,192.168.1.20 -v safe-data:/data ghcr.io/shyena-inc/safe-server:<version> -
Roll out the agent
Under Offer it to, choose one group first as a pilot, then Every endpoint, and Save rollout. Each agent waits a random 0 to 30 minutes so the fleet does not download at once, checks the installer and upgrades itself, keeping its join. The page shows each endpoint's version and state.
A server that cannot reach SAFE shows a Download it here link: download the file in your browser and choose Upload an update. Downloads, installs, skips and rollouts are in the audit log.
What leaves the machine
Detection runs on the endpoint. The server receives only the metadata of each inspected request: the decision, detector categories and counts, risk score, sizes, timings and policy version.
If the server has an incident-response key, each inspected prompt and its files are also kept as evidence, encrypted on the endpoint to that key before being stored or sent. The server cannot read them. Capture can be limited to warned and blocked prompts, or switched off, under Policies → Evidence for incident response.
If the server is unreachable, endpoints keep protecting with the last policy they verified and send queued events when it is back.
Security notes
- The server holds the signing key. Whoever controls it can publish policy to every endpoint. For a server that cannot write policy at all, sign offline with
tools\policy_author.pyand upload under Policies → Advanced. - Evidence is personal data. Tell users that AI use is recorded. Every opening is listed in the evidence access log.
- Back up
data\server\. Losingsigning-key.pemmeans re-joining every endpoint; losingdevices.dbmeans issuing new tokens. - Revoke a lost or retired endpoint under Endpoints. Its token stops working immediately.
Troubleshooting
Endpoint
| Symptom | Fix |
|---|---|
| The join is refused | The enrolment key is mistyped, removed or rotated, or the computer name is already enrolled. Copy a key again from Endpoints → Enrolment keys; revoke an old endpoint of the same name first. C:\ProgramData\SAFE\setup.log says which. |
| The server's certificate is not trusted | Install again with server-cert.pem beside the MSI, or SERVERCERT= on the command line. |
cannot reach … | The server is not running, the address is wrong, or its firewall rule is missing. |
| AI sites show certificate errors | Repair SAFE Agent in Settings → Apps (from source: run dev\install-cert.bat as Administrator), then restart the browser. |
Antivirus quarantines the MSI or windows-redirector.exe | Allow SAFE in the antivirus first: see If antivirus flags the agent under Install an endpoint. |
| A password goes through in one browser | It was open before protection started. Restart it. |
| An app shows certificate errors | Quit it completely and start it again. Apps that pin certificates, such as the ChatGPT desktop app, cannot be inspected. |
| Events refused as agent-mismatch | The machine's id changed. Revoke it in the console and install the MSI again. |
Server
| Symptom | Fix |
|---|---|
Something is already listening on port 9100 | The server is already running, or another program uses 9100. |
| Endpoints cannot connect | Check the server's address and TCP 9100 on any firewall between them. If the address changed, update the certificate names (appliance menu; in Docker run docker exec safe rm -r /data/tls, then start the container again with the new SAFE_HOSTNAMES) and give endpoints the new certificate. |
| An update was rolled back | Settings → Updates shows why. The old version runs on, with its data. |
| An update could not be downloaded | The server needs HTTPS to licence.safe.shyenasec.com (or HTTPS_PROXY). It tries again within the hour; or use Download it here, then Upload an update. |
| The trial email does not arrive | Check Spam. Personal addresses are refused, and there is one trial per organisation: if a colleague already started one, contact SAFE. |
| Console says TAMPERED | Someone edited the published policy file. Publish again to repair it. |
Forgot the superadmin password | Appliance: new one-time password in the screen's menu. Docker: docker exec -it safe safe-entrypoint user reset superadmin. |
| Every Super Admin is locked out | Use Emergency sign-in with the server's admin-token file, then replace it with safe-server break-glass. |
| Console says Not licensed | Read the reason under Settings → Licence. No licence: activate with your code. Clock: correct the date and time. Not renewed: check Last contact with SAFE, then Renew now. Ended: contact SAFE. |
| "could not be reached" | Allow HTTPS from the server to licence.safe.shyenasec.com, set HTTPS_PROXY, or let an endpoint that can reach it carry the check-in: it does so on its own. |
| "active on another server" | The code is in use by another SAFE server. Switch it off; the code works here three days later, or at once if SAFE releases it. |
| "the licence allows N active endpoints" | Revoke an endpoint you no longer use, or extend the licence. |
Remove SAFE
| Command | Undoes |
|---|---|
Settings → Apps → SAFE Agent → Uninstall, or msiexec /x SAFE-Agent-0.2.10.msi /qn | The agent, its service, its certificate trust and its browser settings (Windows, MSI). Revoke the endpoint in the console too |
dev\device-capture.bat /remove | The QUIC firewall rule and the browser policies (Windows, from source) |
dev\install-cert.bat /remove | Trust in SAFE's certificate (Windows, from source) |
sudo /opt/safe-agent/uninstall.sh --purge | The agent, its data and, with --purge, the CA trust (Linux) |
The step-by-step guide ships with SAFE in docs/setup-guide.md.