Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Issue] Security Policies prevent azd from executing correctly. #4737

Open
1 task done
arend-miller-vgm opened this issue Jan 28, 2025 · 0 comments
Open
1 task done

Comments

@arend-miller-vgm
Copy link

Output from azd version
azd version 1.11.1 (commit ae08ceb)

Describe the bug
My employer uses BeyondTrust to manage what software can be installed and run by all users. With approval and assistance from our Security dept, I was able to install azd. However, attempts to run azd init in an Aspire AppHost project always fail. azd appears to generate and attempt to execute .cmd files from a 'MSBuildTemp' directory. One of my organization's active security policies prevents the execution of batch files (including .cmd files).

To Reproduce

  1. On a computer with a policy preventing execution of .cmd files, open Terminal.
  2. navigate to the directory of an existing Visual Studio 2022 Aspire AppHost project.
  3. Run azd init
  4. Choose '> Use code in the current directory' at the 'How do you want to initialize your app?' prompt
  5. A BeyondTrust "IT Security Policy" dialog appears, with the following details:

Batch File Blocked
This Batch File has been blocked by IT
Program Name: tmp[hash].exec.cmd
Program Publisher: Unknown
Program Path: absolute path to /MSBuildTmp\tmp[hash].exec.cmd

  1. Close the dialog.
  2. Back in Terminal, azd init appears to be stuck endlessly waiting for .cmd execution that never happens.

Expected behavior
Running azd init should either execute using code-signed .cmd files (whose signature can be added to an allow-list), or it should fail with an appropriate error message if its .cmd execution fails.

Environment
Information on your environment:
* aspire 8.2.2/8.0.100 SDK 9.0.100, VS 17.12.35707.178

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants