> For the complete documentation index, see [llms.txt](https://docs.devolutions.net/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.devolutions.net/cli/it/guide/secrets.md).

# Usare i segreti senza esporli

Scegliere il comando di Devolutions CLI che dà un segreto al programma esponendo il meno possibile del valore.

Devolutions CLI può consegnare un segreto della cassaforte a un programma in diversi modi. Si differenziano per la cosa che conta di più: se il valore finisce mai in un posto dove lei, la shell o un file possono vederlo. Inizi con `devo secret run`, e scelga un altro comando solo quando lo strumento non può funzionare con esso.

## Scegliere il comando giusto

<table><thead><tr><th width="220">SCELGA</th><th>CHE COSA SUCCEDE</th><th width="220">IL VALORE RESTA NASCOSTO?</th></tr></thead><tbody><tr><td><code>devo secret run</code></td><td>Risolve i riferimenti nell’ambiente o nell’input standard di un solo comando, lo avvia e sostituisce i valori con <code>&#x3C;concealed by Devolutions></code> in ciò che stampa.</td><td><strong>Sì.</strong> I valori esistono solo nell’ambiente di quel comando, mentre è in esecuzione.</td></tr><tr><td><code>devo secret inject</code></td><td>Sostituisce i riferimenti in un modello e scrive il risultato in un file o sull’output standard.</td><td><strong>No.</strong> Il risultato contiene i valori in testo normale.</td></tr><tr><td><code>devo secret shell enter</code></td><td>Stampa codice Bash o PowerShell che imposta variabili d’ambiente nella shell corrente. Esegue quel codice con <code>eval</code> o <code>Invoke-Expression</code>.</td><td><strong>No.</strong> I valori restano in testo normale nella sessione della shell finché non esce dall’ambito.</td></tr><tr><td><code>devo secret read</code></td><td>Risolve un riferimento e stampa il valore, oppure lo scrive in un file privato con <code>--out-file</code>.</td><td><strong>No.</strong> Ottiene il valore.</td></tr><tr><td><code>devo secret get</code></td><td>Come <code>devo secret read</code>, ma indica il campo e la voce invece di scrivere un riferimento.</td><td><strong>No.</strong> Ottiene il valore.</td></tr><tr><td><code>devo secret set</code></td><td>Scrive un nuovo valore in un campo di una voce. Il valore proviene da una variabile d’ambiente o da un file.</td><td><strong>Sì.</strong> Il nuovo valore non viene mai digitato sulla riga di comando e non viene mai stampato.</td></tr><tr><td><code>devo secretspec</code></td><td>Registra Devolutions CLI come il provider che SecretSpec chiama per gli URI del provider <code>devo://</code>.</td><td><strong>No.</strong> Devolutions CLI restituisce il valore a SecretSpec, che lo passa all’applicazione.</td></tr></tbody></table>

{% hint style="warning" %}
`devo secret read`, `devo secret get`, `devo secret inject` e `devo secret shell enter` consegnano di proposito il valore reale. Li usi solo dove è accettabile, e mai nella trascrizione di un agente IA. Consulti [Che cosa resta nascosto e che cosa no](/cli/it/guide/understand/security-model.md).
{% endhint %}

## In questa sezione

* [Trovare il riferimento a un segreto](/cli/it/guide/secrets/find-a-reference.md): elenca i riferimenti `devo://` di una voce, senza leggere alcun valore.
* [Eseguire un comando con i suoi segreti](/cli/it/guide/secrets/run-with-secrets.md): `devo secret run`, il modo più sicuro per dare un segreto a un programma.
* [Togliere le password da un file .env](/cli/it/guide/secrets/replace-env-files.md): tenga i file `.env` nel repository, con riferimenti invece dei valori.
* [Compilare un file di configurazione da un modello](/cli/it/guide/secrets/fill-a-template.md): `devo secret inject`, per gli strumenti che leggono solo un file di configurazione.
* [Usare i segreti nella shell corrente](/cli/it/guide/secrets/current-shell.md): `devo secret shell enter`, per più comandi di seguito.
* [Aggiornare un segreto da uno script](/cli/it/guide/secrets/update-a-secret.md): `devo secret set`, per ruotare una password senza digitarla.
* [Usare Devolutions CLI con SecretSpec](/cli/it/guide/secrets/secretspec.md): renda la cassaforte il backend di SecretSpec.


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://docs.devolutions.net/cli/it/guide/secrets.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
