Skip to content

Commit fa0ad3f

Browse files
cel/celv2: Add path to context, add is_platform_binary/team_id to target (#99)
1 parent 6e366a0 commit fa0ad3f

2 files changed

Lines changed: 23 additions & 1 deletion

File tree

cel/v1.proto

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,12 @@ message ExecutionContext {
6666
string cwd = 5;
6767

6868
// Provided by cel v2
69-
reserved 6;
69+
reserved 6, 7;
70+
71+
// The path that the executable was run from. This will be the
72+
// full resolved path.
73+
// Using this field will prevent the result from being cached.
74+
string path = 8;
7075
}
7176

7277
// The fields in this message are provided to the CEL program and are static,
@@ -93,4 +98,10 @@ message ExecutableFile {
9398

9499
// Provided by cel v2
95100
reserved 4;
101+
102+
// Whether or not this executable is a platform binary.
103+
bool is_platform_binary = 5;
104+
105+
// The team ID of the binary, if it is validly signed.
106+
string team_id = 6;
96107
}

celv2/v2.proto

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -78,6 +78,11 @@ message ExecutionContext {
7878
// The file descriptors associated with this process.
7979
// Using this field will prevent the result from being cached.
8080
repeated FileDescriptor fds = 7;
81+
82+
// The path that the executable was run from. This will be the
83+
// full resolved path.
84+
// Using this field will prevent the result from being cached.
85+
string path = 8;
8186
}
8287

8388
// The fields in this message are provided to the CEL program and are static,
@@ -107,6 +112,12 @@ message ExecutableFile {
107112
// either a boolean or a JSON object so when comparing boolean values be sure
108113
// to use boolean strings "true" or "false".
109114
map<string, string> entitlements = 4;
115+
116+
// Whether or not this executable is a platform binary.
117+
bool is_platform_binary = 5;
118+
119+
// The team ID of the binary, if it is validly signed.
120+
string team_id = 6;
110121
}
111122

112123
message Ancestor {

0 commit comments

Comments
 (0)