Skip to content

PEDM commands support to dotnet cli#349

Open
sgaddala-ks wants to merge 9 commits intoSDK-172-EPMfrom
SDK-172-pedm-dotnetcli
Open

PEDM commands support to dotnet cli#349
sgaddala-ks wants to merge 9 commits intoSDK-172-EPMfrom
SDK-172-pedm-dotnetcli

Conversation

@sgaddala-ks
Copy link
Contributor

No description provided.

@socket-security
Copy link

socket-security bot commented Feb 11, 2026

Review the following changes in direct dependencies. Learn more about Socket for GitHub.

Diff Package Supply Chain
Security
Vulnerability Quality Maintenance License
Addedsystem.net.http@​4.3.41001009010090

View full report

@sgaddala-ks sgaddala-ks self-assigned this Feb 11, 2026
@sgaddala-ks sgaddala-ks changed the base branch from SDK-172-pedm to SDK-172-PEDM March 5, 2026 07:51
}

public async Task ExecuteAsync(EpmAgentOptions options)
{
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

add the null validation for options
if (options == null)

if (string.IsNullOrEmpty(options.Command))
{
options.Command = "list";
}
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

use ?: for better validation

var command = string.IsNullOrEmpty(options.Command)
               ? "list"
               : options.Command.Trim().ToLowerInvariant();

return;
}

var agentUid = agentUids[0];
Copy link

@sali-ks sali-ks Mar 6, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

var agentUid = agentUids[0]?.Trim();
if (string.IsNullOrEmpty(agentUid))
{
Console.WriteLine("Agent UID is required for 'view' command.");
return;
}


bool? disabled = null;
if (!string.IsNullOrEmpty(options.Enable))
{
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

var enableValue = options.Enable?.Trim();
if (!string.IsNullOrEmpty(enableValue))
{
var enableLower = enableValue.ToLowerInvariant();

{
return;
}

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Below code block should be in try - catch?


private async Task RemoveAgentAsync(string agentUid)
{
if (string.IsNullOrEmpty(agentUid))
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

var uid = agentUid?.Trim();
if (string.IsNullOrEmpty(uid))
{

}

private void ListAgentCollections(EpmAgentOptions options)
{
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

add validation
if (options == null)
{
return;
}

var parts = data.Select(kvp => $"{kvp.Key}={kvp.Value}").ToList();
value = string.Join(", ", parts);
}
catch
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

catch (Exception){

}

public async Task ExecuteAsync(EpmApprovalOptions options)
{
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

same review points if (options == null)

if (string.IsNullOrEmpty(options.Command))
{
options.Command = "list";
}
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

var command = string.IsNullOrEmpty(options.Command)
? "list"
: options.Command.Trim().ToLowerInvariant();

@sgaddala-ks sgaddala-ks force-pushed the SDK-172-pedm-dotnetcli branch from 35bcb8e to 0aac0d0 Compare March 6, 2026 13:11
@sgaddala-ks sgaddala-ks changed the base branch from SDK-172-PEDM to SDK-172-EPM March 8, 2026 07:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants