Skip to content

Password in executable args is shown on the Resources page #7632

@DamianEdwards

Description

@DamianEdwards

I have an executable resource (dotnet ef) with arguments that contain a connection string for another resource (database) that includes a password. The connection string including password is being displayed on the dashboard on the Resources page in the table:

Image

I've tried various different ways of adding the argument but they all result in the password being shown. Note that the argument is manually escaped with quotes.

...

var chatAppDb = postgres.AddDatabase("chatappdb");

var efMigrate = builder.AddExecutable("ef-migrate", "dotnet", "../ChatApp1", "ef", "database", "update", "--no-build", "--connection")
    .WithArgs(context => context.Args.Add(ReferenceExpression.Create($"\"{chatAppDb.Resource}\"")))
    .WaitFor(postgres);

Metadata

Metadata

Assignees

Type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions