Aspire CLI security considerations
The Aspire CLI builds, runs, and deploys applications from your development machine. It can execute repository code and writes diagnostic logs that can contain sensitive information. Take care when choosing which repositories to trust and when storing or sharing logs.
Run commands in trusted repositories
Section titled “Run commands in trusted repositories”Only run Aspire commands from directories and repositories you trust. Repository configuration and build steps can affect what the CLI executes.
Building or running an AppHost executes code with the permissions of your user account. That code can read local files and environment variables, access credentials available to your account, and start other processes. The CLI doesn’t sandbox AppHost code.
Before running commands in a third-party repository, review its AppHost, build scripts, dependencies, and Aspire configuration.
Protect diagnostic logs
Section titled “Protect diagnostic logs”Diagnostic logs can contain sensitive data, including dashboard login URLs captured from AppHost output. The CLI writes file logs independently of console verbosity, so reducing console output doesn’t prevent sensitive information from being written to a log file.
By default, the CLI stores logs in the Aspire home directory’s logs folder, typically ~/.aspire/logs/.
- On Linux and macOS, access to log files and the logs directory is restricted to the current user account.
- On Windows, log files and directories inherit file system permissions from your user profile directory.
If you specify a custom path with --log-file, choose a secure location.
Review logs before sharing them in an issue, support request, or chat.