Skip to content

Commit

Permalink
Merge pull request #148 from microsoft/gg/redact
Browse files Browse the repository at this point in the history
Mark RunCommand source and parameters as sensitive
  • Loading branch information
ggaurav10 committed Feb 24, 2023
2 parents 18d6898 + 2c9501b commit 482db09
Show file tree
Hide file tree
Showing 4 changed files with 97 additions and 76 deletions.
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ require (
github.com/stretchr/testify v1.7.0
golang.org/x/net v0.0.0-20220909164309-bea034e7d591 // indirect
golang.org/x/sys v0.0.0-20220915200043-7b5979e65e41 // indirect
golang.org/x/text v0.5.0 // indirect
golang.org/x/text v0.7.0 // indirect
golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1 // indirect
google.golang.org/grpc v1.26.0
google.golang.org/protobuf v1.28.1 // indirect
Expand Down
4 changes: 2 additions & 2 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -56,8 +56,8 @@ golang.org/x/term v0.0.0-20210927222741-03fcf44c2211/go.mod h1:jbD1KX2456YbFQfuX
golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ=
golang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ=
golang.org/x/text v0.3.7/go.mod h1:u+2+/6zg+i71rQMx5EYifcz6MCKuco9NR6JIITiCfzQ=
golang.org/x/text v0.5.0 h1:OLmvp0KP+FVG99Ct/qFiL/Fhk4zp4QQnZ7b2U+5piUM=
golang.org/x/text v0.5.0/go.mod h1:mrYo+phRRbMaCq/xk9113O4dZlRixOauAjOtrjsXDZ8=
golang.org/x/text v0.7.0 h1:4BRB4x83lYWy72KwLD/qYDuTu7q9PjSagHvijDw7cLo=
golang.org/x/text v0.7.0/go.mod h1:mrYo+phRRbMaCq/xk9113O4dZlRixOauAjOtrjsXDZ8=
golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ=
golang.org/x/tools v0.0.0-20190226205152-f727befe758c/go.mod h1:9Yl7xja0Znq3iFh3HoIrodX9oNMXvdceNzlUR8zjMvY=
golang.org/x/tools v0.0.0-20191119224855-298f0cb1881e/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo=
Expand Down
158 changes: 87 additions & 71 deletions rpc/common/moc_common_computecommon.pb.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

9 changes: 7 additions & 2 deletions rpc/common/moc_common_computecommon.proto
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ syntax = "proto3";
option go_package = "github.com/microsoft/moc/rpc/common";

package moc;
import "google/protobuf/descriptor.proto";

enum UserType {
ROOT = 0;
Expand Down Expand Up @@ -115,11 +116,11 @@ enum VirtualMachineRunCommandExecutionState {

message VirtualMachineRunCommandInputParameter {
string Name = 1;
string Value = 2;
string Value = 2 [(sensitivecompute) = true];
}

message VirtualMachineRunCommandScriptSource {
string Script = 1;
string Script = 1 [(sensitivecompute) = true];
string ScriptURI = 2;
string CommandID = 3;
}
Expand All @@ -145,3 +146,7 @@ enum Architecture {
x64 = 9;
ARM64_Architecture = 12;
}

extend google.protobuf.FieldOptions {
bool sensitivecompute = 50002;
}

0 comments on commit 482db09

Please sign in to comment.