A secret can reach an external service by more than a prompt.
It can end up in tool output, in the diagnostics, in a log, in a crash
report, in shell history, in Git, in a frontend bundle, or in a telemetry
event.
Protection therefore has to cover the whole workflow.
What counts as a secret
Secrets include, among others:
- passwords;
- API keys;
- access tokens;
- refresh tokens;
- license tokens;
- private keys;
- SSH keys;
- signing secrets;
- database credentials;
- cloud credentials;
- recovery codes;
- session secrets;
- encryption keys;
- webhook secrets;
- connection strings containing a password.
The fact that a value sits in a development file does not make it safe to
send to a model.
Where secrets have to be held
Depending on the environment, the following are used:
- environment variables;
- a secrets manager;
- the protected storage of the OS;
- a corporate vault;
- temporary credentials;
- separate CI secrets.
The project documentation holds the names and the purpose of the
variables, but not their live values.
The specific supported mechanisms have to be listed for each
environment.
Where secrets must not be
Secrets must not reach:
- the source code;
- Git;
gabion.manifest.json;
- test fixtures;
- prompts;
- model responses;
- an MCP resource;
- tool output without filtering;
- the browser UI;
- a diagnostic message;
- a crash report;
- a telemetry event;
- the frontend bundle;
- a container image;
- a deployment artifact;
- public documentation;
- a recording of a Gabion Live Showcase.
Checking the repository
Before a commit and before a project is handed over, it is useful to
check for:
- known key formats;
- connection strings;
.env;
- private keys;
- credentials added by accident;
- tokens in fixtures;
- secrets in the Git history;
- values in generated files.
A secret that is found has to be:
-
revoked or rotated;
-
removed from the current files;
-
checked against the history;
-
traced to where it was transmitted;
-
checked against the logs;
-
followed by removing the cause.
Deleting a line from the latest commit does not make an exposed secret
safe.
MCP and secrets
For every MCP tool it is necessary to determine:
- whether it can read secrets;
- whether it can return a value;
- whether confirmation is required;
- whether redaction is applied;
- whether the result is retained;
-
whether the AI client can send the result to an external model.
By default a tool must not return the live value of a secret if the task
can be carried out without it.
Diagnostics
A diagnostic message has to help correct the configuration without
disclosing the value.
Preferred
The variable PAYMENT_API_KEY is missing.
Not acceptable
The key sk_live_... is in use.
Where a comparison is needed, a safe identifier, a fingerprint, or the
last characters may be displayed, but only after a separate assessment of
the risk.
Redaction
The redaction mechanism has to be applied before:
- writing to a log;
- output to the UI;
- assembling a crash report;
- sending telemetry;
- passing a tool result;
- exporting diagnostics.
Redaction has to be tested on:
- the full value;
- the value inside a URL;
- JSON;
- a stack trace;
- a multiline value;
- an encoded value;
- a partially transformed value;
- several secrets in one message.
It must not be claimed that redaction detects any unknown secret.
Local logs
Before publication a catalog of the Gabion logs has to be compiled.
For each one, determine:
- the path;
- the purpose;
- the format;
- the level;
- whether it is enabled by default;
- the data it contains;
- the maximum size;
- rotation;
- the retention period;
- the access rights;
- the deletion;
- the export.
Check separately whether the logs contain:
- file paths;
- the name of the project;
- fragments of code;
- prompts;
- model responses;
- tool calls;
- diagnostics;
- token identifiers;
- usage.
Prompt history
If Gabion does not retain prompts and responses, that has to be confirmed
by a test.
If it does retain them, it is necessary to describe:
- exactly what;
- where;
- for how long;
- who can see it;
- the encryption;
- the export;
- the deletion;
- the synchronization;
- the backups.
The history of an external AI client is governed separately and must not
be attributed to Gabion.
Telemetry
For every telemetry event it is necessary to determine:
- the name;
- the purpose;
- the fields;
- the identifiers;
- the endpoint;
- the processor;
- the retention period;
- the default mode;
- whether it can be disabled;
- the effect of disabling it.
Telemetry must not include:
- source code;
- business logic;
- a prompt;
- a model response;
- a secret;
- user data;
- free-text error output without redaction.
The network test for telemetry
A "telemetry disabled" mode has to be verified by observing the actual
connections.
The test covers:
-
a clean installation;
-
starting the Runtime;
-
opening a project;
-
running a check;
-
reproducing an error;
-
closing the Runtime;
-
analyzing the outbound connections;
-
comparing them with the documented list of endpoints.
The absence of optional telemetry does not mean the absence of a
mandatory license check or of updates. Those connections are documented
separately.
Crash reports
A crash report can contain sensitive data from:
- a stack trace;
- the environment;
- paths;
- an open file;
- tool output;
- a memory dump;
- a prompt;
- a model response.
Before automatic sending, it is necessary to determine:
- whether redaction is applied;
- whether a preview is available;
- whether consent is required;
- whether it can be disabled;
- where it is sent;
- who receives it;
- the retention period.
For the client mode, a preference for automatic sending has to be a
separate, deliberate decision rather than a hidden default.
The license check
A token verification request must not include:
- source code;
- prompts;
- responses;
- business logic;
- user data;
- the contents of files.
The following are documented:
- the endpoint;
- the license identifier;
- the project identifier, where one is used;
- the Runtime version;
- the result;
- the time;
- the logs;
- the retention period;
- the offline behavior.
The production application does not perform this check.
Updates
An update check can disclose:
- the Runtime version;
- the OS;
- the architecture;
- the edition;
- the channel;
- the installation identifier.
Before publication it is necessary to state:
- the endpoint;
- the frequency;
- whether the mode is automatic or manual;
- the fields sent;
- the signature of the package;
- the behavior on error;
- whether it can be disabled;
- the effect of disabling it.
An update to the Runtime must not send the code of the project
automatically.
Removing Gabion
The uninstall instructions have to list:
- the binary and the Runtime;
- the configuration;
- the token;
- the cache;
- the logs;
- the crash reports;
- the downloaded updates;
- the temporary files;
- the browser data;
- local model artifacts, where Gabion managed them;
- the data that stays with external providers.
Removing Gabion must not delete the directory of the client project.
Retention
A separate period is set for each category of data:
- operational logs;
- security logs;
- usage;
- crash reports;
- support materials;
- license events;
- form submissions.
"For as long as needed" is not a defined period.
A deletion request
Before external access is opened, it is necessary to determine:
- where the request is sent;
- how identity is confirmed;
- which data can be deleted;
-
which data has to be kept under a contract or by law;
- the time to completion;
- the behavior of the backups;
- the notification that it is complete.
An incident
If a secret or data has been sent in error:
-
stop any further transmission;
-
revoke the secrets;
-
identify the systems and the providers;
-
preserve the necessary evidence;
-
check the logs;
-
request deletion, where it is available;
-
assess the contractual and legal obligations;
-
notify those responsible;
-
correct the configuration;
-
run the test again.
A secret should not be masked after it is sent; it should be kept out of
the prompt, the log, and the report before anything is transmitted.