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

Add additional admin setting to match security related group policies #2772

Merged
merged 2 commits into from
Dec 15, 2022

Conversation

yao-msft
Copy link
Contributor

@yao-msft yao-msft commented Dec 15, 2022

Added corresponding admin settings for InstallerHashOverride and LocalArchivemalwareScanOverride
Also added tests.

Microsoft Reviewers: Open in CodeFlow

@yao-msft yao-msft requested a review from a team as a code owner December 15, 2022 20:27
@@ -5,6 +5,7 @@
#include "winget/Archive.h"
#include "winget/Filesystem.h"
Copy link
Contributor

Choose a reason for hiding this comment

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

Nit: Should these also use <>? I can fix when I create the PR for removing zip experimental feature

Copy link
Contributor Author

Choose a reason for hiding this comment

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

yes

@@ -27,7 +28,8 @@ namespace AppInstaller::CLI::Workflow
}
else
{
if (context.Args.Contains(Execution::Args::Type::IgnoreLocalArchiveMalwareScan))
if (context.Args.Contains(Execution::Args::Type::IgnoreLocalArchiveMalwareScan) &&
Settings::IsAdminSettingEnabled(Settings::AdminSetting::LocalArchiveMalwareScanOverride))
Copy link
Contributor

Choose a reason for hiding this comment

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

    Settings::IsAdminSettingEnabled(Settings::AdminSetting::LocalArchiveMalwareScanOverride)) [](http://example.com/codeflow?start=11&length=98)

Should there be a separate elseif block for when someone includes --ignore-local-archive-malware-scan but does not have the admin setting for LocalArchiveMalwareScanOverride enabled? If so, should there be a different error message specific to admin settings?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

This message is handled in command invocation.

@yao-msft yao-msft merged commit 81765e1 into microsoft:master Dec 15, 2022
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