File: module_list.proto

package info (click to toggle)
chromium 138.0.7204.183-1~deb12u1
  • links: PTS, VCS
  • area: main
  • in suites: bookworm-proposed-updates
  • size: 6,080,960 kB
  • sloc: cpp: 34,937,079; ansic: 7,176,967; javascript: 4,110,704; python: 1,419,954; asm: 946,768; xml: 739,971; pascal: 187,324; sh: 89,623; perl: 88,663; objc: 79,944; sql: 50,304; cs: 41,786; fortran: 24,137; makefile: 21,811; php: 13,980; tcl: 13,166; yacc: 8,925; ruby: 7,485; awk: 3,720; lisp: 3,096; lex: 1,327; ada: 727; jsp: 228; sed: 36
file content (129 lines) | stat: -rw-r--r-- 5,217 bytes parent folder | download | duplicates (4)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
// Copyright 2017 The Chromium Authors
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

syntax = "proto2";

option optimize_for = LITE_RUNTIME;

package chrome.conflicts;

// Describes a module. A module is valid only if at least one of |basename| or
// |code_id| is specified, although both may be specified. A module must exactly
// match all specified fields in order to be considered a match.
// Next id: 5
message Module {
  // The basename of the module. This is case insensitive. If this is not
  // specified then |code_id| must be specified. On the client this actually
  // corresponds to the SHA1 hash of the basename, which has been first made
  // lowercase.
  optional string basename = 1;
  optional bytes basename_hash = 3;

  // Code ID. This is equivalent to the string generated by formatting
  // the FileHeader.TimeDateStamp and OptionalHeader.SizeOfImage with the
  // formatting string %08X%x. Comparison is case insensitive. If this is not
  // specified then |basename| must be specified. On the client this actually
  // corresponds to the SHA1 hash of the code id, which has first been made
  // lowercase.
  optional string code_id = 2;
  optional bytes code_id_hash = 4;
}

// A module group is a collection of one or more modules with shared publisher
// and/or installation directory information.
// Next id: 6
message ModuleGroup {
  // Publisher information. If specified then the modules in this group will
  // only match if they are signed by the specified publisher. This corresponds
  // to the OU specified in the signature. On the client this actually
  // corresponds to the SHA1 of the case-sensitive publisher information.
  optional string publisher = 1;
  optional bytes publisher_hash = 4;

  // The directory in which the modules are found. This may use environment
  // variables such as %LOCALAPPDATA%, %SYSTEMROOT%, etc. This is case
  // insensitive. If not specified then any path will be accepted. On the
  // client this actually corresponds to the SHA1 of the case-insensitive path.
  optional string directory = 2;
  optional bytes directory_hash = 5;

  // A list of modules.
  repeated Module modules = 3;
}

// Describes an allowlist of modules that will always be allowed to load, and
// for which there is no associated user messaging.
// Next id: 2
message ModuleAllowlist {
  // A collection of modules, grouped by publisher/installation path
  // information.
  repeated ModuleGroup module_groups = 1;
}

// The user message to display when a blocklisted module is matched at runtime.
// Next id: 3
enum BlocklistMessageType {
  // The user will be presented with a message to uninstall the software. This
  // message will only be displayed if a matching software entry with
  // uninstallation registry entries can be found. This is the default action
  // that is applied to all modules that are not specifically allowlisted.
  // It's presence in this list allows a module to remain blocklisted, but be
  // allowed to load. If this is specified then |message_url| should be empty
  // and is otherwise ignored.
  UNINSTALL = 0;
  // The user will be presented with a message about the incompatibility of
  // the related software, and provided with a link to follow for further
  // information. The URL is specified via |message_url| in an associated
  // BlocklistAction.
  FURTHER_INFORMATION = 1;
  // The user will be presented with a message about the incompatiblity of
  // the related software, and provided with a link to follow in order to
  // upgrade the software to a compatible version. The URL is specified via
  // |message_url| in an associated BlocklistAction.
  SUGGEST_UPGRADE = 2;
};

// The actions to take when a blocklisted module is encountered.
// Next id: 4
message BlocklistAction {
  // Indicates whether or not this module should be allowed to load. This can be
  // used to explicitly allow modules to load that when blocked cause problems,
  // but otherwise to allow messaging to encourage users to remove them.
  optional bool allow_load = 1;

  // The URL associated with the user message. See BlocklistMessageType for full
  // details.
  optional BlocklistMessageType message_type = 2;
  optional string message_url = 3;
}

// Describes a group in the module blocklist. Modules not allowlisted are
// blocklisted by default, but fine-grained control over the user messaging is
// possible using an explicit blocklist entry.
// Next id: 3
message BlocklistModuleGroup {
  // The action to take when modules in this group are encountered.
  optional BlocklistAction action = 1;

  // The group of modules itself.
  optional ModuleGroup modules = 2;
}

// Describes a blocklist of modules that are to be handled specially when
// encountered.
// Next id: 2
message ModuleBlocklist {
  repeated BlocklistModuleGroup module_groups = 1;
}

// The entire module list itself consists of an allowlist and a blocklist.
// Next id: 3
message ModuleList {
  // The allowlisted modules.
  optional ModuleAllowlist allowlist = 1;

  // The blocklisted modules, and the associated actions to take upon
  // encountering them.
  optional ModuleBlocklist blocklist = 2;
}